diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000..5f0e5d39 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:a9b83a276c82987d284b733713fe86a3c8a2cc457933767eeb2688b882e54c6a + image: gcr.io/repo-automation-bots/owlbot-java:latest \ No newline at end of file diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 00000000..4c6efe92 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,32 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/datafusion/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-data-fusion-$1/src" +- source: "/google/cloud/datafusion/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-data-fusion-$1/src" +- source: "/google/cloud/datafusion/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-data-fusion/src" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..30fdb7b9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..9c518a19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/java-data-fusion/issues + - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform + +If you are still having issues, please include as much information as possible: + +#### Environment details + +1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). + General, Core, and Other are also allowed as types +2. OS type and version: +3. Java version: +4. data-fusion version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..754e30c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..9ea039c0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-data-fusion/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 00000000..1a23ea42 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 00000000..c644a24e --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,12 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..8ca7f9ca --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true +releaseType: java-yoshi diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..e100454f --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..7513acae --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 00000000..9b4fd4d8 --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..0195b32f --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,79 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 00000000..c46230a7 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..069d08fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ + +.flattened-pom.xml diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 00000000..05826ad9 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..549dc94c --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Maven & Java version +mvn -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +samples) + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] + then + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do + [[ -f "$FILE" ]] || continue + source "$FILE" + done + + pushd ${SAMPLES_DIR} + mvn -B \ + -Penable-samples \ + -ntp \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? + ;; +*) + ;; +esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-data-fusion +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 00000000..46edbf7f --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 00000000..6fff9620 --- /dev/null +++ b/.kokoro/common.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..ace89f45 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..4469d72b --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..b15a8052 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..9030ba8f --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +shopt -s nullglob + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# this should run maven enforcer +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in **/.flattened-pom.xml +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 00000000..4469d72b --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 00000000..0048c8ec --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# 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: "ENABLE_BUILD_COP" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 00000000..39fc1bdb --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-data-fusion/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..8e949968 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-data-fusion/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 00000000..f2542931 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 00000000..f5251425 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 00000000..ec572442 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..3b12b402 --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 00000000..ec54e270 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..dded67a9 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 00000000..39fc1bdb --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-data-fusion/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..8e949968 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-data-fusion/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 00000000..7577cf0b --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 00000000..01e09600 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 00000000..441f3423 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-data-fusion + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool + +set +e +python3.6 -m autosynth.synth \ + --repository=googleapis/java-data-fusion \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..f9a1645d --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..d8753ad8 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-data-fusion/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 00000000..6e3f6599 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 00000000..53ecbc65 --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 00000000..5c4551ef --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 00000000..f2345361 --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 00000000..1fa95fa5 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 00000000..590fad87 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,23 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 00000000..62c9a3fb --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-data-fusion +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B -q + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 00000000..42328e0b --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 00000000..f55b7008 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-data-fusion +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +cp CHANGELOG.md target/docfx-yml/history.md + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..a0db10fc --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 00000000..1f55b770 --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 00000000..3968b8f8 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-data-fusion/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-data-fusion/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-data-fusion" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 00000000..8a103384 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 00000000..9da0f839 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.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. +set -eo pipefail +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT + +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 00000000..774ae5db --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "name": "data-fusion", + "name_pretty": "Cloud Data Fusion", + "product_documentation": "https://cloud.google.com/data-fusion/docs", + "api_description": "is a fully managed, cloud-native, enterprise data integration service for quickly building and managing data pipelines.", + "client_documentation": "https://googleapis.dev/java/google-cloud-data-fusion/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-data-fusion", + "repo_short": "java-data-fusion", + "distribution_name": "com.google.cloud:google-cloud-data-fusion", + "api_id": "data-fusion.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..2add2547 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f2dbdee0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +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 +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.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. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..8b58ae9c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-data-fusion-bom/pom.xml b/google-cloud-data-fusion-bom/pom.xml new file mode 100644 index 00000000..5483966a --- /dev/null +++ b/google-cloud-data-fusion-bom/pom.xml @@ -0,0 +1,95 @@ + + + 4.0.0 + com.google.cloud + google-cloud-data-fusion-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + Google Cloud Data Fusion BOM + https://github.com/googleapis/java-data-fusion + + BOM for Cloud Data Fusion + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-data-fusion.git + scm:git:git@github.com:googleapis/java-data-fusion.git + https://github.com/googleapis/java-data-fusion + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-data-fusion + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-data-fusion/pom.xml b/google-cloud-data-fusion/pom.xml new file mode 100644 index 00000000..af1332c2 --- /dev/null +++ b/google-cloud-data-fusion/pom.xml @@ -0,0 +1,120 @@ + + + 4.0.0 + com.google.cloud + google-cloud-data-fusion + 0.0.1-SNAPSHOT + jar + Google Cloud Data Fusion + https://github.com/googleapis/java-data-fusion + Cloud Data Fusion is a fully managed, cloud-native, enterprise data integration service for quickly building and managing data pipelines. + + com.google.cloud + google-cloud-data-fusion-parent + 0.0.1-SNAPSHOT + + + google-cloud-data-fusion + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1beta1 + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.2 + + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1beta1 + test + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java new file mode 100644 index 00000000..91d53f13 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionClient.java @@ -0,0 +1,975 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1.stub.DataFusionStub; +import com.google.cloud.datafusion.v1.stub.DataFusionStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for creating and managing Data Fusion instances. Data Fusion enables + * ETL developers to build code-free, data integration pipelines via a point-and-click UI. + * + *

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

{@code
+ * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = dataFusionClient.getInstance(request);
+ * }
+ * }
+ * + *

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

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * DataFusionSettings dataFusionSettings =
+ *     DataFusionSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataFusionClient dataFusionClient = DataFusionClient.create(dataFusionSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * DataFusionSettings dataFusionSettings =
+ *     DataFusionSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataFusionClient dataFusionClient = DataFusionClient.create(dataFusionSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataFusionClient implements BackgroundResource { + private final DataFusionSettings settings; + private final DataFusionStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataFusionClient with default settings. */ + public static final DataFusionClient create() throws IOException { + return create(DataFusionSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataFusionClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DataFusionClient create(DataFusionSettings settings) throws IOException { + return new DataFusionClient(settings); + } + + /** + * Constructs an instance of DataFusionClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(DataFusionSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataFusionClient create(DataFusionStub stub) { + return new DataFusionClient(stub); + } + + /** + * Constructs an instance of DataFusionClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected DataFusionClient(DataFusionSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataFusionStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataFusionClient(DataFusionStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataFusionSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataFusionStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve instance information in + * the format projects/{project}/locations/{location}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions(String parent) { + ListAvailableVersionsRequest request = + ListAvailableVersionsRequest.newBuilder().setParent(parent).build(); + return listAvailableVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   for (Version element : dataFusionClient.listAvailableVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions( + ListAvailableVersionsRequest request) { + return listAvailableVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listAvailableVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Version element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAvailableVersionsPagedCallable() { + return stub.listAvailableVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   while (true) {
+   *     ListAvailableVersionsResponse response =
+   *         dataFusionClient.listAvailableVersionsCallable().call(request);
+   *     for (Version element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAvailableVersionsCallable() { + return stub.listAvailableVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Instance element : dataFusionClient.listInstances(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = dataFusionClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = dataFusionClient.getInstance(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent The instance's project and location in the format + * projects/{project}/locations/{location}. + * @param instance An instance resource. + * @param instanceId The name of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + String parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   Instance response = dataFusionClient.createInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + CreateInstanceRequest request) { + return createInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       dataFusionClient.createInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInstanceOperationCallable() { + return stub.createInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataFusionClient.createInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createInstanceCallable() { + return stub.createInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Date Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String name = "name3373707";
+   *   dataFusionClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name The instance resource name in the format + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Date Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   dataFusionClient.deleteInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Date Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       dataFusionClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Date Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   Instance instance = Instance.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Instance response = dataFusionClient.updateInstanceAsync(instance, updateMask).get();
+   * }
+   * }
+ * + * @param instance The instance resource that replaces the resource on the server. Currently, Data + * Fusion only allows replacing labels, options, and stack driver settings. All other fields + * will be ignored. + * @param updateMask Field mask is used to specify the fields that the update will overwrite in an + * instance resource. The fields specified in the update_mask are relative to the resource, + * not the full request. A field will be overwritten if it is in the mask. If the user does + * not provide a mask, all the supported fields (labels, options, and version currently) will + * be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateInstanceAsync( + Instance instance, FieldMask updateMask) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder().setInstance(instance).setUpdateMask(updateMask).build(); + return updateInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Instance response = dataFusionClient.updateInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateInstanceAsync( + UpdateInstanceRequest request) { + return updateInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       dataFusionClient.updateInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateInstanceOperationCallable() { + return stub.updateInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataFusionClient.updateInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateInstanceCallable() { + return stub.updateInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = dataFusionClient.restartInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture restartInstanceAsync( + RestartInstanceRequest request) { + return restartInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       dataFusionClient.restartInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restartInstanceOperationCallable() { + return stub.restartInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.restartInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restartInstanceCallable() { + return stub.restartInstanceCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAvailableVersionsPagedResponse + extends AbstractPagedListResponse< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage, + ListAvailableVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAvailableVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAvailableVersionsPagedResponse apply(ListAvailableVersionsPage input) { + return new ListAvailableVersionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAvailableVersionsPagedResponse(ListAvailableVersionsPage page) { + super(page, ListAvailableVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAvailableVersionsPage + extends AbstractPage< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage> { + + private ListAvailableVersionsPage( + PageContext context, + ListAvailableVersionsResponse response) { + super(context, response); + } + + private static ListAvailableVersionsPage createEmptyPage() { + return new ListAvailableVersionsPage(null, null); + } + + @Override + protected ListAvailableVersionsPage createPage( + PageContext context, + ListAvailableVersionsResponse response) { + return new ListAvailableVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAvailableVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage, + ListAvailableVersionsFixedSizeCollection> { + + private ListAvailableVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAvailableVersionsFixedSizeCollection createEmptyCollection() { + return new ListAvailableVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListAvailableVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAvailableVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListInstancesPagedResponse apply(ListInstancesPage input) { + return new ListInstancesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionSettings.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionSettings.java new file mode 100644 index 00000000..7b63173c --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/DataFusionSettings.java @@ -0,0 +1,306 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1; + +import static com.google.cloud.datafusion.v1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1.DataFusionClient.ListInstancesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datafusion.v1.stub.DataFusionStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataFusionClient}. + * + *

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

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

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

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

{@code
+ * DataFusionSettings.Builder dataFusionSettingsBuilder = DataFusionSettings.newBuilder();
+ * dataFusionSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         dataFusionSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataFusionSettings dataFusionSettings = dataFusionSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataFusionSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAvailableVersions. */ + public PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return ((DataFusionStubSettings) getStubSettings()).listAvailableVersionsSettings(); + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((DataFusionStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).createInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).createInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).updateInstanceSettings(); + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).updateInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public UnaryCallSettings restartInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).restartInstanceSettings(); + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public OperationCallSettings + restartInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).restartInstanceOperationSettings(); + } + + public static final DataFusionSettings create(DataFusionStubSettings stub) throws IOException { + return new DataFusionSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataFusionStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataFusionStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataFusionStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataFusionStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataFusionStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataFusionStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataFusionStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataFusionSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataFusionSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataFusionStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataFusionSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataFusionStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataFusionStubSettings.newBuilder()); + } + + public DataFusionStubSettings.Builder getStubSettingsBuilder() { + return ((DataFusionStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listAvailableVersions. */ + public PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return getStubSettingsBuilder().listAvailableVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return getStubSettingsBuilder().createInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return getStubSettingsBuilder().createInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return getStubSettingsBuilder().updateInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return getStubSettingsBuilder().updateInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public UnaryCallSettings.Builder restartInstanceSettings() { + return getStubSettingsBuilder().restartInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public OperationCallSettings.Builder + restartInstanceOperationSettings() { + return getStubSettingsBuilder().restartInstanceOperationSettings(); + } + + @Override + public DataFusionSettings build() throws IOException { + return new DataFusionSettings(this); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json new file mode 100644 index 00000000..1f175c39 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/gapic_metadata.json @@ -0,0 +1,39 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.datafusion.v1", + "libraryPackage": "com.google.cloud.datafusion.v1", + "services": { + "DataFusion": { + "clients": { + "grpc": { + "libraryClient": "DataFusionClient", + "rpcs": { + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstanceCallable"] + }, + "ListAvailableVersions": { + "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "RestartInstance": { + "methods": ["restartInstanceAsync", "restartInstanceOperationCallable", "restartInstanceCallable"] + }, + "UpdateInstance": { + "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java new file mode 100644 index 00000000..4df6433d --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= DataFusionClient ======================= + * + *

Service Description: Service for creating and managing Data Fusion instances. Data Fusion + * enables ETL developers to build code-free, data integration pipelines via a point-and-click UI. + * + *

Sample for DataFusionClient: + * + *

{@code
+ * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = dataFusionClient.getInstance(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.datafusion.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStub.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStub.java new file mode 100644 index 00000000..12868473 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStub.java @@ -0,0 +1,116 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1.stub; + +import static com.google.cloud.datafusion.v1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1.DataFusionClient.ListInstancesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1.GetInstanceRequest; +import com.google.cloud.datafusion.v1.Instance; +import com.google.cloud.datafusion.v1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1.ListInstancesRequest; +import com.google.cloud.datafusion.v1.ListInstancesResponse; +import com.google.cloud.datafusion.v1.OperationMetadata; +import com.google.cloud.datafusion.v1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1.UpdateInstanceRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataFusion service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataFusionStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listAvailableVersionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAvailableVersionsPagedCallable()"); + } + + public UnaryCallable + listAvailableVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listAvailableVersionsCallable()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable + createInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); + } + + public UnaryCallable createInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public OperationCallable + updateInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceOperationCallable()"); + } + + public UnaryCallable updateInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); + } + + public OperationCallable + restartInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restartInstanceOperationCallable()"); + } + + public UnaryCallable restartInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: restartInstanceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStubSettings.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStubSettings.java new file mode 100644 index 00000000..15c62400 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/DataFusionStubSettings.java @@ -0,0 +1,752 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1.stub; + +import static com.google.cloud.datafusion.v1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1.DataFusionClient.ListInstancesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +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.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1.GetInstanceRequest; +import com.google.cloud.datafusion.v1.Instance; +import com.google.cloud.datafusion.v1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1.ListInstancesRequest; +import com.google.cloud.datafusion.v1.ListInstancesResponse; +import com.google.cloud.datafusion.v1.OperationMetadata; +import com.google.cloud.datafusion.v1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1.UpdateInstanceRequest; +import com.google.cloud.datafusion.v1.Version; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataFusionStub}. + * + *

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

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

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

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

{@code
+ * DataFusionStubSettings.Builder dataFusionSettingsBuilder = DataFusionStubSettings.newBuilder();
+ * dataFusionSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         dataFusionSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataFusionStubSettings dataFusionSettings = dataFusionSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataFusionStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings; + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings createInstanceSettings; + private final OperationCallSettings + createInstanceOperationSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings updateInstanceSettings; + private final OperationCallSettings + updateInstanceOperationSettings; + private final UnaryCallSettings restartInstanceSettings; + private final OperationCallSettings + restartInstanceOperationSettings; + + private static final PagedListDescriptor< + ListAvailableVersionsRequest, ListAvailableVersionsResponse, Version> + LIST_AVAILABLE_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAvailableVersionsRequest, ListAvailableVersionsResponse, Version>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAvailableVersionsRequest injectToken( + ListAvailableVersionsRequest payload, String token) { + return ListAvailableVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAvailableVersionsRequest injectPageSize( + ListAvailableVersionsRequest payload, int pageSize) { + return ListAvailableVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAvailableVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAvailableVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAvailableVersionsResponse payload) { + return payload.getAvailableVersionsList() == null + ? ImmutableList.of() + : payload.getAvailableVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList() == null + ? ImmutableList.of() + : payload.getInstancesList(); + } + }; + + private static final PagedListResponseFactory< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + LIST_AVAILABLE_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAvailableVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AVAILABLE_VERSIONS_PAGE_STR_DESC, request, context); + return ListAvailableVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAvailableVersions. */ + public PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return listAvailableVersionsSettings; + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public UnaryCallSettings restartInstanceSettings() { + return restartInstanceSettings; + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public OperationCallSettings + restartInstanceOperationSettings() { + return restartInstanceOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataFusionStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataFusionStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datafusion.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "datafusion.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataFusionStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataFusionStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAvailableVersionsSettings = settingsBuilder.listAvailableVersionsSettings().build(); + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + createInstanceSettings = settingsBuilder.createInstanceSettings().build(); + createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); + updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); + restartInstanceSettings = settingsBuilder.restartInstanceSettings().build(); + restartInstanceOperationSettings = settingsBuilder.restartInstanceOperationSettings().build(); + } + + /** Builder for DataFusionStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + createInstanceSettings; + private final OperationCallSettings.Builder + createInstanceOperationSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder + updateInstanceSettings; + private final OperationCallSettings.Builder + updateInstanceOperationSettings; + private final UnaryCallSettings.Builder + restartInstanceSettings; + private final OperationCallSettings.Builder + restartInstanceOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listAvailableVersionsSettings = + PagedCallSettings.newBuilder(LIST_AVAILABLE_VERSIONS_PAGE_STR_FACT); + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceOperationSettings = OperationCallSettings.newBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceOperationSettings = OperationCallSettings.newBuilder(); + restartInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restartInstanceOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAvailableVersionsSettings, + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + deleteInstanceSettings, + updateInstanceSettings, + restartInstanceSettings); + initDefaults(this); + } + + protected Builder(DataFusionStubSettings settings) { + super(settings); + + listAvailableVersionsSettings = settings.listAvailableVersionsSettings.toBuilder(); + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + createInstanceSettings = settings.createInstanceSettings.toBuilder(); + createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); + updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); + restartInstanceSettings = settings.restartInstanceSettings.toBuilder(); + restartInstanceOperationSettings = settings.restartInstanceOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAvailableVersionsSettings, + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + deleteInstanceSettings, + updateInstanceSettings, + restartInstanceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAvailableVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .restartInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .restartInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listAvailableVersions. */ + public PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return listAvailableVersionsSettings; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public UnaryCallSettings.Builder restartInstanceSettings() { + return restartInstanceSettings; + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restartInstanceOperationSettings() { + return restartInstanceOperationSettings; + } + + @Override + public DataFusionStubSettings build() throws IOException { + return new DataFusionStubSettings(this); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionCallableFactory.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionCallableFactory.java new file mode 100644 index 00000000..4608f696 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DataFusion service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataFusionCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionStub.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionStub.java new file mode 100644 index 00000000..42b54b24 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1/stub/GrpcDataFusionStub.java @@ -0,0 +1,452 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1.stub; + +import static com.google.cloud.datafusion.v1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1.DataFusionClient.ListInstancesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1.GetInstanceRequest; +import com.google.cloud.datafusion.v1.Instance; +import com.google.cloud.datafusion.v1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1.ListInstancesRequest; +import com.google.cloud.datafusion.v1.ListInstancesResponse; +import com.google.cloud.datafusion.v1.OperationMetadata; +import com.google.cloud.datafusion.v1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1.UpdateInstanceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataFusion service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataFusionStub extends DataFusionStub { + private static final MethodDescriptor + listAvailableVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/ListAvailableVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAvailableVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAvailableVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/CreateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/UpdateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restartInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1.DataFusion/RestartInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(RestartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listAvailableVersionsCallable; + private final UnaryCallable + listAvailableVersionsPagedCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable updateInstanceCallable; + private final OperationCallable + updateInstanceOperationCallable; + private final UnaryCallable restartInstanceCallable; + private final OperationCallable + restartInstanceOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataFusionStub create(DataFusionStubSettings settings) + throws IOException { + return new GrpcDataFusionStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataFusionStub create(ClientContext clientContext) throws IOException { + return new GrpcDataFusionStub(DataFusionStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataFusionStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataFusionStub( + DataFusionStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataFusionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataFusionStub(DataFusionStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataFusionCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataFusionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataFusionStub( + DataFusionStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listAvailableVersionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAvailableVersionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAvailableVersionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInstancesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("instance.name", String.valueOf(request.getInstance().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings restartInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restartInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestartInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listAvailableVersionsCallable = + callableFactory.createUnaryCallable( + listAvailableVersionsTransportSettings, + settings.listAvailableVersionsSettings(), + clientContext); + this.listAvailableVersionsPagedCallable = + callableFactory.createPagedCallable( + listAvailableVersionsTransportSettings, + settings.listAvailableVersionsSettings(), + clientContext); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + operationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.updateInstanceCallable = + callableFactory.createUnaryCallable( + updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); + this.updateInstanceOperationCallable = + callableFactory.createOperationCallable( + updateInstanceTransportSettings, + settings.updateInstanceOperationSettings(), + clientContext, + operationsStub); + this.restartInstanceCallable = + callableFactory.createUnaryCallable( + restartInstanceTransportSettings, settings.restartInstanceSettings(), clientContext); + this.restartInstanceOperationCallable = + callableFactory.createOperationCallable( + restartInstanceTransportSettings, + settings.restartInstanceOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listAvailableVersionsCallable() { + return listAvailableVersionsCallable; + } + + @Override + public UnaryCallable + listAvailableVersionsPagedCallable() { + return listAvailableVersionsPagedCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable updateInstanceCallable() { + return updateInstanceCallable; + } + + @Override + public OperationCallable + updateInstanceOperationCallable() { + return updateInstanceOperationCallable; + } + + @Override + public UnaryCallable restartInstanceCallable() { + return restartInstanceCallable; + } + + @Override + public OperationCallable + restartInstanceOperationCallable() { + return restartInstanceOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java new file mode 100644 index 00000000..e12ba606 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java @@ -0,0 +1,1665 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1beta1.stub.DataFusionStub; +import com.google.cloud.datafusion.v1beta1.stub.DataFusionStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for creating and managing Data Fusion instances. Data Fusion enables + * ETL developers to build code-free, data integration pipelines via a point-and-click UI. + * + *

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

{@code
+ * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = dataFusionClient.getInstance(request);
+ * }
+ * }
+ * + *

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

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

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

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

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

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

To customize credentials: + * + *

{@code
+ * DataFusionSettings dataFusionSettings =
+ *     DataFusionSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataFusionClient dataFusionClient = DataFusionClient.create(dataFusionSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * DataFusionSettings dataFusionSettings =
+ *     DataFusionSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataFusionClient dataFusionClient = DataFusionClient.create(dataFusionSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataFusionClient implements BackgroundResource { + private final DataFusionSettings settings; + private final DataFusionStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataFusionClient with default settings. */ + public static final DataFusionClient create() throws IOException { + return create(DataFusionSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataFusionClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DataFusionClient create(DataFusionSettings settings) throws IOException { + return new DataFusionClient(settings); + } + + /** + * Constructs an instance of DataFusionClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(DataFusionSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataFusionClient create(DataFusionStub stub) { + return new DataFusionClient(stub); + } + + /** + * Constructs an instance of DataFusionClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected DataFusionClient(DataFusionSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataFusionStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataFusionClient(DataFusionStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataFusionSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataFusionStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Version element : dataFusionClient.listAvailableVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve instance information in + * the format projects/{project}/locations/{location}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions(String parent) { + ListAvailableVersionsRequest request = + ListAvailableVersionsRequest.newBuilder().setParent(parent).build(); + return listAvailableVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   for (Version element : dataFusionClient.listAvailableVersions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAvailableVersionsPagedResponse listAvailableVersions( + ListAvailableVersionsRequest request) { + return listAvailableVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listAvailableVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Version element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAvailableVersionsPagedCallable() { + return stub.listAvailableVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists possible versions for Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListAvailableVersionsRequest request =
+   *       ListAvailableVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLatestPatchOnly(true)
+   *           .build();
+   *   while (true) {
+   *     ListAvailableVersionsResponse response =
+   *         dataFusionClient.listAvailableVersionsCallable().call(request);
+   *     for (Version element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAvailableVersionsCallable() { + return stub.listAvailableVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Instance element : dataFusionClient.listInstances(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Fusion instances in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = dataFusionClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = dataFusionClient.getInstance(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response = dataFusionClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent The instance's project and location in the format + * projects/{project}/locations/{location}. + * @param instance An instance resource. + * @param instanceId The name of the instance to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + String parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   Instance response = dataFusionClient.createInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + CreateInstanceRequest request) { + return createInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       dataFusionClient.createInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInstanceOperationCallable() { + return stub.createInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Data Fusion instance in the specified project and location. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataFusionClient.createInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createInstanceCallable() { + return stub.createInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String name = "name3373707";
+   *   dataFusionClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name The instance resource name in the format + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   dataFusionClient.deleteInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       dataFusionClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   Instance instance = Instance.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Instance response = dataFusionClient.updateInstanceAsync(instance, updateMask).get();
+   * }
+   * }
+ * + * @param instance The instance resource that replaces the resource on the server. Currently, Data + * Fusion only allows replacing labels, options, and stack driver settings. All other fields + * will be ignored. + * @param updateMask Field mask is used to specify the fields that the update will overwrite in an + * instance resource. The fields specified in the update_mask are relative to the resource, + * not the full request. A field will be overwritten if it is in the mask. If the user does + * not provide a mask, all the supported fields (labels and options currently) will be + * overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateInstanceAsync( + Instance instance, FieldMask updateMask) { + UpdateInstanceRequest request = + UpdateInstanceRequest.newBuilder().setInstance(instance).setUpdateMask(updateMask).build(); + return updateInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Instance response = dataFusionClient.updateInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateInstanceAsync( + UpdateInstanceRequest request) { + return updateInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       dataFusionClient.updateInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateInstanceOperationCallable() { + return stub.updateInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single Data Fusion instance. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpdateInstanceRequest request =
+   *       UpdateInstanceRequest.newBuilder()
+   *           .setInstance(Instance.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = dataFusionClient.updateInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateInstanceCallable() { + return stub.updateInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = dataFusionClient.restartInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture restartInstanceAsync( + RestartInstanceRequest request) { + return restartInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       dataFusionClient.restartInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restartInstanceOperationCallable() { + return stub.restartInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart a single Data Fusion instance. At the end of an operation instance is fully restarted. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RestartInstanceRequest request =
+   *       RestartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.restartInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restartInstanceCallable() { + return stub.restartInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrade a single Data Fusion instance. At the end of an operation instance is fully upgraded. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = dataFusionClient.upgradeInstanceAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture upgradeInstanceAsync( + UpgradeInstanceRequest request) { + return upgradeInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrade a single Data Fusion instance. At the end of an operation instance is fully upgraded. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       dataFusionClient.upgradeInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + upgradeInstanceOperationCallable() { + return stub.upgradeInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrade a single Data Fusion instance. At the end of an operation instance is fully upgraded. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = dataFusionClient.upgradeInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable upgradeInstanceCallable() { + return stub.upgradeInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove IAM policy that is currently set on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder().setResource("resource-341064690").build();
+   *   RemoveIamPolicyResponse response = dataFusionClient.removeIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RemoveIamPolicyResponse removeIamPolicy(RemoveIamPolicyRequest request) { + return removeIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove IAM policy that is currently set on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RemoveIamPolicyRequest request =
+   *       RemoveIamPolicyRequest.newBuilder().setResource("resource-341064690").build();
+   *   ApiFuture future =
+   *       dataFusionClient.removeIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveIamPolicyResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeIamPolicyCallable() { + return stub.removeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List namespaces in a given instance + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   for (Namespace element : dataFusionClient.listNamespaces(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance to list its namespaces. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNamespacesPagedResponse listNamespaces(InstanceName parent) { + ListNamespacesRequest request = + ListNamespacesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNamespaces(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List namespaces in a given instance + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   for (Namespace element : dataFusionClient.listNamespaces(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance to list its namespaces. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNamespacesPagedResponse listNamespaces(String parent) { + ListNamespacesRequest request = ListNamespacesRequest.newBuilder().setParent(parent).build(); + return listNamespaces(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List namespaces in a given instance + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListNamespacesRequest request =
+   *       ListNamespacesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(NamespaceView.forNumber(0))
+   *           .build();
+   *   for (Namespace element : dataFusionClient.listNamespaces(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNamespacesPagedResponse listNamespaces(ListNamespacesRequest request) { + return listNamespacesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List namespaces in a given instance + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListNamespacesRequest request =
+   *       ListNamespacesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(NamespaceView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listNamespacesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Namespace element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNamespacesPagedCallable() { + return stub.listNamespacesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List namespaces in a given instance + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListNamespacesRequest request =
+   *       ListNamespacesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(NamespaceView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListNamespacesResponse response = dataFusionClient.listNamespacesCallable().call(request);
+   *     for (Namespace element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNamespacesCallable() { + return stub.listNamespacesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   AddDnsPeeringResponse response = dataFusionClient.addDnsPeering(parent);
+   * }
+   * }
+ * + * @param parent The resource on which DNS peering will be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddDnsPeeringResponse addDnsPeering(String parent) { + AddDnsPeeringRequest request = AddDnsPeeringRequest.newBuilder().setParent(parent).build(); + return addDnsPeering(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   AddDnsPeeringRequest request =
+   *       AddDnsPeeringRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDnsPeering(DnsPeering.newBuilder().build())
+   *           .build();
+   *   AddDnsPeeringResponse response = dataFusionClient.addDnsPeering(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddDnsPeeringResponse addDnsPeering(AddDnsPeeringRequest request) { + return addDnsPeeringCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   AddDnsPeeringRequest request =
+   *       AddDnsPeeringRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDnsPeering(DnsPeering.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.addDnsPeeringCallable().futureCall(request);
+   *   // Do something.
+   *   AddDnsPeeringResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable addDnsPeeringCallable() { + return stub.addDnsPeeringCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = "parent-995424086";
+   *   RemoveDnsPeeringResponse response = dataFusionClient.removeDnsPeering(parent);
+   * }
+   * }
+ * + * @param parent The resource on which DNS peering will be removed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RemoveDnsPeeringResponse removeDnsPeering(String parent) { + RemoveDnsPeeringRequest request = + RemoveDnsPeeringRequest.newBuilder().setParent(parent).build(); + return removeDnsPeering(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RemoveDnsPeeringRequest request =
+   *       RemoveDnsPeeringRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setZone("zone3744684")
+   *           .build();
+   *   RemoveDnsPeeringResponse response = dataFusionClient.removeDnsPeering(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RemoveDnsPeeringResponse removeDnsPeering(RemoveDnsPeeringRequest request) { + return removeDnsPeeringCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove DNS peering on the given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   RemoveDnsPeeringRequest request =
+   *       RemoveDnsPeeringRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setZone("zone3744684")
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.removeDnsPeeringCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveDnsPeeringResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeDnsPeeringCallable() { + return stub.removeDnsPeeringCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DNS peering for a given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   for (DnsPeering element : dataFusionClient.listDnsPeerings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource on which dns peering will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDnsPeeringsPagedResponse listDnsPeerings(InstanceName parent) { + ListDnsPeeringsRequest request = + ListDnsPeeringsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDnsPeerings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DNS peering for a given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   for (DnsPeering element : dataFusionClient.listDnsPeerings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource on which dns peering will be listed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDnsPeeringsPagedResponse listDnsPeerings(String parent) { + ListDnsPeeringsRequest request = ListDnsPeeringsRequest.newBuilder().setParent(parent).build(); + return listDnsPeerings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DNS peering for a given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListDnsPeeringsRequest request =
+   *       ListDnsPeeringsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DnsPeering element : dataFusionClient.listDnsPeerings(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDnsPeeringsPagedResponse listDnsPeerings(ListDnsPeeringsRequest request) { + return listDnsPeeringsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DNS peering for a given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListDnsPeeringsRequest request =
+   *       ListDnsPeeringsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataFusionClient.listDnsPeeringsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DnsPeering element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDnsPeeringsPagedCallable() { + return stub.listDnsPeeringsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DNS peering for a given resource. + * + *

Sample code: + * + *

{@code
+   * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+   *   ListDnsPeeringsRequest request =
+   *       ListDnsPeeringsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDnsPeeringsResponse response = dataFusionClient.listDnsPeeringsCallable().call(request);
+   *     for (DnsPeering element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDnsPeeringsCallable() { + return stub.listDnsPeeringsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAvailableVersionsPagedResponse + extends AbstractPagedListResponse< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage, + ListAvailableVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAvailableVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAvailableVersionsPagedResponse apply(ListAvailableVersionsPage input) { + return new ListAvailableVersionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAvailableVersionsPagedResponse(ListAvailableVersionsPage page) { + super(page, ListAvailableVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAvailableVersionsPage + extends AbstractPage< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage> { + + private ListAvailableVersionsPage( + PageContext context, + ListAvailableVersionsResponse response) { + super(context, response); + } + + private static ListAvailableVersionsPage createEmptyPage() { + return new ListAvailableVersionsPage(null, null); + } + + @Override + protected ListAvailableVersionsPage createPage( + PageContext context, + ListAvailableVersionsResponse response) { + return new ListAvailableVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAvailableVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + Version, + ListAvailableVersionsPage, + ListAvailableVersionsFixedSizeCollection> { + + private ListAvailableVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAvailableVersionsFixedSizeCollection createEmptyCollection() { + return new ListAvailableVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListAvailableVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAvailableVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListInstancesPagedResponse apply(ListInstancesPage input) { + return new ListInstancesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNamespacesPagedResponse + extends AbstractPagedListResponse< + ListNamespacesRequest, + ListNamespacesResponse, + Namespace, + ListNamespacesPage, + ListNamespacesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNamespacesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListNamespacesPagedResponse apply(ListNamespacesPage input) { + return new ListNamespacesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListNamespacesPagedResponse(ListNamespacesPage page) { + super(page, ListNamespacesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNamespacesPage + extends AbstractPage< + ListNamespacesRequest, ListNamespacesResponse, Namespace, ListNamespacesPage> { + + private ListNamespacesPage( + PageContext context, + ListNamespacesResponse response) { + super(context, response); + } + + private static ListNamespacesPage createEmptyPage() { + return new ListNamespacesPage(null, null); + } + + @Override + protected ListNamespacesPage createPage( + PageContext context, + ListNamespacesResponse response) { + return new ListNamespacesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNamespacesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNamespacesRequest, + ListNamespacesResponse, + Namespace, + ListNamespacesPage, + ListNamespacesFixedSizeCollection> { + + private ListNamespacesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNamespacesFixedSizeCollection createEmptyCollection() { + return new ListNamespacesFixedSizeCollection(null, 0); + } + + @Override + protected ListNamespacesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNamespacesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDnsPeeringsPagedResponse + extends AbstractPagedListResponse< + ListDnsPeeringsRequest, + ListDnsPeeringsResponse, + DnsPeering, + ListDnsPeeringsPage, + ListDnsPeeringsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDnsPeeringsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDnsPeeringsPagedResponse apply(ListDnsPeeringsPage input) { + return new ListDnsPeeringsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDnsPeeringsPagedResponse(ListDnsPeeringsPage page) { + super(page, ListDnsPeeringsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDnsPeeringsPage + extends AbstractPage< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, DnsPeering, ListDnsPeeringsPage> { + + private ListDnsPeeringsPage( + PageContext context, + ListDnsPeeringsResponse response) { + super(context, response); + } + + private static ListDnsPeeringsPage createEmptyPage() { + return new ListDnsPeeringsPage(null, null); + } + + @Override + protected ListDnsPeeringsPage createPage( + PageContext context, + ListDnsPeeringsResponse response) { + return new ListDnsPeeringsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDnsPeeringsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDnsPeeringsRequest, + ListDnsPeeringsResponse, + DnsPeering, + ListDnsPeeringsPage, + ListDnsPeeringsFixedSizeCollection> { + + private ListDnsPeeringsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDnsPeeringsFixedSizeCollection createEmptyCollection() { + return new ListDnsPeeringsFixedSizeCollection(null, 0); + } + + @Override + protected ListDnsPeeringsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDnsPeeringsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionSettings.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionSettings.java new file mode 100644 index 00000000..5cba6d80 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionSettings.java @@ -0,0 +1,394 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListDnsPeeringsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListInstancesPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListNamespacesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datafusion.v1beta1.stub.DataFusionStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataFusionClient}. + * + *

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

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

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

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

{@code
+ * DataFusionSettings.Builder dataFusionSettingsBuilder = DataFusionSettings.newBuilder();
+ * dataFusionSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         dataFusionSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataFusionSettings dataFusionSettings = dataFusionSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataFusionSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAvailableVersions. */ + public PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return ((DataFusionStubSettings) getStubSettings()).listAvailableVersionsSettings(); + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((DataFusionStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).createInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).createInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).updateInstanceSettings(); + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).updateInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public UnaryCallSettings restartInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).restartInstanceSettings(); + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public OperationCallSettings + restartInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).restartInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return ((DataFusionStubSettings) getStubSettings()).upgradeInstanceSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public OperationCallSettings + upgradeInstanceOperationSettings() { + return ((DataFusionStubSettings) getStubSettings()).upgradeInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return ((DataFusionStubSettings) getStubSettings()).removeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to listNamespaces. */ + public PagedCallSettings< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings() { + return ((DataFusionStubSettings) getStubSettings()).listNamespacesSettings(); + } + + /** Returns the object with the settings used for calls to addDnsPeering. */ + public UnaryCallSettings addDnsPeeringSettings() { + return ((DataFusionStubSettings) getStubSettings()).addDnsPeeringSettings(); + } + + /** Returns the object with the settings used for calls to removeDnsPeering. */ + public UnaryCallSettings + removeDnsPeeringSettings() { + return ((DataFusionStubSettings) getStubSettings()).removeDnsPeeringSettings(); + } + + /** Returns the object with the settings used for calls to listDnsPeerings. */ + public PagedCallSettings< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings() { + return ((DataFusionStubSettings) getStubSettings()).listDnsPeeringsSettings(); + } + + public static final DataFusionSettings create(DataFusionStubSettings stub) throws IOException { + return new DataFusionSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataFusionStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataFusionStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataFusionStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataFusionStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataFusionStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataFusionStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataFusionStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataFusionSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataFusionSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataFusionStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataFusionSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataFusionStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataFusionStubSettings.newBuilder()); + } + + public DataFusionStubSettings.Builder getStubSettingsBuilder() { + return ((DataFusionStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listAvailableVersions. */ + public PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return getStubSettingsBuilder().listAvailableVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return getStubSettingsBuilder().createInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return getStubSettingsBuilder().createInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return getStubSettingsBuilder().updateInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return getStubSettingsBuilder().updateInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public UnaryCallSettings.Builder restartInstanceSettings() { + return getStubSettingsBuilder().restartInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public OperationCallSettings.Builder + restartInstanceOperationSettings() { + return getStubSettingsBuilder().restartInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return getStubSettingsBuilder().upgradeInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return getStubSettingsBuilder().upgradeInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return getStubSettingsBuilder().removeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to listNamespaces. */ + public PagedCallSettings.Builder< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings() { + return getStubSettingsBuilder().listNamespacesSettings(); + } + + /** Returns the builder for the settings used for calls to addDnsPeering. */ + public UnaryCallSettings.Builder + addDnsPeeringSettings() { + return getStubSettingsBuilder().addDnsPeeringSettings(); + } + + /** Returns the builder for the settings used for calls to removeDnsPeering. */ + public UnaryCallSettings.Builder + removeDnsPeeringSettings() { + return getStubSettingsBuilder().removeDnsPeeringSettings(); + } + + /** Returns the builder for the settings used for calls to listDnsPeerings. */ + public PagedCallSettings.Builder< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings() { + return getStubSettingsBuilder().listDnsPeeringsSettings(); + } + + @Override + public DataFusionSettings build() throws IOException { + return new DataFusionSettings(this); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json new file mode 100644 index 00000000..34af1c69 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/gapic_metadata.json @@ -0,0 +1,57 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.datafusion.v1beta1", + "libraryPackage": "com.google.cloud.datafusion.v1beta1", + "services": { + "DataFusion": { + "clients": { + "grpc": { + "libraryClient": "DataFusionClient", + "rpcs": { + "AddDnsPeering": { + "methods": ["addDnsPeering", "addDnsPeering", "addDnsPeeringCallable"] + }, + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstanceCallable"] + }, + "ListAvailableVersions": { + "methods": ["listAvailableVersions", "listAvailableVersions", "listAvailableVersionsPagedCallable", "listAvailableVersionsCallable"] + }, + "ListDnsPeerings": { + "methods": ["listDnsPeerings", "listDnsPeerings", "listDnsPeerings", "listDnsPeeringsPagedCallable", "listDnsPeeringsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "ListNamespaces": { + "methods": ["listNamespaces", "listNamespaces", "listNamespaces", "listNamespacesPagedCallable", "listNamespacesCallable"] + }, + "RemoveDnsPeering": { + "methods": ["removeDnsPeering", "removeDnsPeering", "removeDnsPeeringCallable"] + }, + "RemoveIamPolicy": { + "methods": ["removeIamPolicy", "removeIamPolicyCallable"] + }, + "RestartInstance": { + "methods": ["restartInstanceAsync", "restartInstanceOperationCallable", "restartInstanceCallable"] + }, + "UpdateInstance": { + "methods": ["updateInstanceAsync", "updateInstanceAsync", "updateInstanceOperationCallable", "updateInstanceCallable"] + }, + "UpgradeInstance": { + "methods": ["upgradeInstanceAsync", "upgradeInstanceOperationCallable", "upgradeInstanceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java new file mode 100644 index 00000000..2ac06ab2 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/package-info.java @@ -0,0 +1,37 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= DataFusionClient ======================= + * + *

Service Description: Service for creating and managing Data Fusion instances. Data Fusion + * enables ETL developers to build code-free, data integration pipelines via a point-and-click UI. + * + *

Sample for DataFusionClient: + * + *

{@code
+ * try (DataFusionClient dataFusionClient = DataFusionClient.create()) {
+ *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ *   Instance response = dataFusionClient.getInstance(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.datafusion.v1beta1; + +import javax.annotation.Generated; diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStub.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStub.java new file mode 100644 index 00000000..66f2f32c --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStub.java @@ -0,0 +1,171 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1.stub; + +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListDnsPeeringsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListInstancesPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListNamespacesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1beta1.GetInstanceRequest; +import com.google.cloud.datafusion.v1beta1.Instance; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse; +import com.google.cloud.datafusion.v1beta1.ListInstancesRequest; +import com.google.cloud.datafusion.v1beta1.ListInstancesResponse; +import com.google.cloud.datafusion.v1beta1.ListNamespacesRequest; +import com.google.cloud.datafusion.v1beta1.ListNamespacesResponse; +import com.google.cloud.datafusion.v1beta1.OperationMetadata; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse; +import com.google.cloud.datafusion.v1beta1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataFusion service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DataFusionStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listAvailableVersionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAvailableVersionsPagedCallable()"); + } + + public UnaryCallable + listAvailableVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listAvailableVersionsCallable()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable + createInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); + } + + public UnaryCallable createInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public OperationCallable + updateInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceOperationCallable()"); + } + + public UnaryCallable updateInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); + } + + public OperationCallable + restartInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restartInstanceOperationCallable()"); + } + + public UnaryCallable restartInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: restartInstanceCallable()"); + } + + public OperationCallable + upgradeInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceOperationCallable()"); + } + + public UnaryCallable upgradeInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceCallable()"); + } + + public UnaryCallable removeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: removeIamPolicyCallable()"); + } + + public UnaryCallable + listNamespacesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNamespacesPagedCallable()"); + } + + public UnaryCallable listNamespacesCallable() { + throw new UnsupportedOperationException("Not implemented: listNamespacesCallable()"); + } + + public UnaryCallable addDnsPeeringCallable() { + throw new UnsupportedOperationException("Not implemented: addDnsPeeringCallable()"); + } + + public UnaryCallable + removeDnsPeeringCallable() { + throw new UnsupportedOperationException("Not implemented: removeDnsPeeringCallable()"); + } + + public UnaryCallable + listDnsPeeringsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDnsPeeringsPagedCallable()"); + } + + public UnaryCallable listDnsPeeringsCallable() { + throw new UnsupportedOperationException("Not implemented: listDnsPeeringsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStubSettings.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStubSettings.java new file mode 100644 index 00000000..13a45d28 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/DataFusionStubSettings.java @@ -0,0 +1,1083 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1.stub; + +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListDnsPeeringsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListInstancesPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListNamespacesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +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.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1beta1.DnsPeering; +import com.google.cloud.datafusion.v1beta1.GetInstanceRequest; +import com.google.cloud.datafusion.v1beta1.Instance; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse; +import com.google.cloud.datafusion.v1beta1.ListInstancesRequest; +import com.google.cloud.datafusion.v1beta1.ListInstancesResponse; +import com.google.cloud.datafusion.v1beta1.ListNamespacesRequest; +import com.google.cloud.datafusion.v1beta1.ListNamespacesResponse; +import com.google.cloud.datafusion.v1beta1.Namespace; +import com.google.cloud.datafusion.v1beta1.OperationMetadata; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse; +import com.google.cloud.datafusion.v1beta1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest; +import com.google.cloud.datafusion.v1beta1.Version; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataFusionStub}. + * + *

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

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

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

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

{@code
+ * DataFusionStubSettings.Builder dataFusionSettingsBuilder = DataFusionStubSettings.newBuilder();
+ * dataFusionSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         dataFusionSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataFusionStubSettings dataFusionSettings = dataFusionSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataFusionStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings; + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings createInstanceSettings; + private final OperationCallSettings + createInstanceOperationSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings updateInstanceSettings; + private final OperationCallSettings + updateInstanceOperationSettings; + private final UnaryCallSettings restartInstanceSettings; + private final OperationCallSettings + restartInstanceOperationSettings; + private final UnaryCallSettings upgradeInstanceSettings; + private final OperationCallSettings + upgradeInstanceOperationSettings; + private final UnaryCallSettings + removeIamPolicySettings; + private final PagedCallSettings< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings; + private final UnaryCallSettings + addDnsPeeringSettings; + private final UnaryCallSettings + removeDnsPeeringSettings; + private final PagedCallSettings< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings; + + private static final PagedListDescriptor< + ListAvailableVersionsRequest, ListAvailableVersionsResponse, Version> + LIST_AVAILABLE_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAvailableVersionsRequest, ListAvailableVersionsResponse, Version>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAvailableVersionsRequest injectToken( + ListAvailableVersionsRequest payload, String token) { + return ListAvailableVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAvailableVersionsRequest injectPageSize( + ListAvailableVersionsRequest payload, int pageSize) { + return ListAvailableVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAvailableVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAvailableVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAvailableVersionsResponse payload) { + return payload.getAvailableVersionsList() == null + ? ImmutableList.of() + : payload.getAvailableVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList() == null + ? ImmutableList.of() + : payload.getInstancesList(); + } + }; + + private static final PagedListDescriptor + LIST_NAMESPACES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNamespacesRequest injectToken(ListNamespacesRequest payload, String token) { + return ListNamespacesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNamespacesRequest injectPageSize( + ListNamespacesRequest payload, int pageSize) { + return ListNamespacesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNamespacesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNamespacesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNamespacesResponse payload) { + return payload.getNamespacesList() == null + ? ImmutableList.of() + : payload.getNamespacesList(); + } + }; + + private static final PagedListDescriptor< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, DnsPeering> + LIST_DNS_PEERINGS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDnsPeeringsRequest injectToken( + ListDnsPeeringsRequest payload, String token) { + return ListDnsPeeringsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDnsPeeringsRequest injectPageSize( + ListDnsPeeringsRequest payload, int pageSize) { + return ListDnsPeeringsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDnsPeeringsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDnsPeeringsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDnsPeeringsResponse payload) { + return payload.getDnsPeeringsList() == null + ? ImmutableList.of() + : payload.getDnsPeeringsList(); + } + }; + + private static final PagedListResponseFactory< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + LIST_AVAILABLE_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAvailableVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AVAILABLE_VERSIONS_PAGE_STR_DESC, request, context); + return ListAvailableVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + LIST_NAMESPACES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNamespacesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NAMESPACES_PAGE_STR_DESC, request, context); + return ListNamespacesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + LIST_DNS_PEERINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDnsPeeringsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DNS_PEERINGS_PAGE_STR_DESC, request, context); + return ListDnsPeeringsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAvailableVersions. */ + public PagedCallSettings< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return listAvailableVersionsSettings; + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the object with the settings used for calls to updateInstance. */ + public OperationCallSettings + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public UnaryCallSettings restartInstanceSettings() { + return restartInstanceSettings; + } + + /** Returns the object with the settings used for calls to restartInstance. */ + public OperationCallSettings + restartInstanceOperationSettings() { + return restartInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public OperationCallSettings + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to listNamespaces. */ + public PagedCallSettings< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings() { + return listNamespacesSettings; + } + + /** Returns the object with the settings used for calls to addDnsPeering. */ + public UnaryCallSettings addDnsPeeringSettings() { + return addDnsPeeringSettings; + } + + /** Returns the object with the settings used for calls to removeDnsPeering. */ + public UnaryCallSettings + removeDnsPeeringSettings() { + return removeDnsPeeringSettings; + } + + /** Returns the object with the settings used for calls to listDnsPeerings. */ + public PagedCallSettings< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings() { + return listDnsPeeringsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataFusionStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataFusionStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datafusion.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "datafusion.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataFusionStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataFusionStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAvailableVersionsSettings = settingsBuilder.listAvailableVersionsSettings().build(); + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + createInstanceSettings = settingsBuilder.createInstanceSettings().build(); + createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); + updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); + restartInstanceSettings = settingsBuilder.restartInstanceSettings().build(); + restartInstanceOperationSettings = settingsBuilder.restartInstanceOperationSettings().build(); + upgradeInstanceSettings = settingsBuilder.upgradeInstanceSettings().build(); + upgradeInstanceOperationSettings = settingsBuilder.upgradeInstanceOperationSettings().build(); + removeIamPolicySettings = settingsBuilder.removeIamPolicySettings().build(); + listNamespacesSettings = settingsBuilder.listNamespacesSettings().build(); + addDnsPeeringSettings = settingsBuilder.addDnsPeeringSettings().build(); + removeDnsPeeringSettings = settingsBuilder.removeDnsPeeringSettings().build(); + listDnsPeeringsSettings = settingsBuilder.listDnsPeeringsSettings().build(); + } + + /** Builder for DataFusionStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + createInstanceSettings; + private final OperationCallSettings.Builder + createInstanceOperationSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder + updateInstanceSettings; + private final OperationCallSettings.Builder + updateInstanceOperationSettings; + private final UnaryCallSettings.Builder + restartInstanceSettings; + private final OperationCallSettings.Builder + restartInstanceOperationSettings; + private final UnaryCallSettings.Builder + upgradeInstanceSettings; + private final OperationCallSettings.Builder + upgradeInstanceOperationSettings; + private final UnaryCallSettings.Builder + removeIamPolicySettings; + private final PagedCallSettings.Builder< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings; + private final UnaryCallSettings.Builder + addDnsPeeringSettings; + private final UnaryCallSettings.Builder + removeDnsPeeringSettings; + private final PagedCallSettings.Builder< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listAvailableVersionsSettings = + PagedCallSettings.newBuilder(LIST_AVAILABLE_VERSIONS_PAGE_STR_FACT); + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceOperationSettings = OperationCallSettings.newBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceOperationSettings = OperationCallSettings.newBuilder(); + restartInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restartInstanceOperationSettings = OperationCallSettings.newBuilder(); + upgradeInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeInstanceOperationSettings = OperationCallSettings.newBuilder(); + removeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNamespacesSettings = PagedCallSettings.newBuilder(LIST_NAMESPACES_PAGE_STR_FACT); + addDnsPeeringSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeDnsPeeringSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDnsPeeringsSettings = PagedCallSettings.newBuilder(LIST_DNS_PEERINGS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAvailableVersionsSettings, + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + deleteInstanceSettings, + updateInstanceSettings, + restartInstanceSettings, + upgradeInstanceSettings, + removeIamPolicySettings, + listNamespacesSettings, + addDnsPeeringSettings, + removeDnsPeeringSettings, + listDnsPeeringsSettings); + initDefaults(this); + } + + protected Builder(DataFusionStubSettings settings) { + super(settings); + + listAvailableVersionsSettings = settings.listAvailableVersionsSettings.toBuilder(); + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + createInstanceSettings = settings.createInstanceSettings.toBuilder(); + createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); + updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); + restartInstanceSettings = settings.restartInstanceSettings.toBuilder(); + restartInstanceOperationSettings = settings.restartInstanceOperationSettings.toBuilder(); + upgradeInstanceSettings = settings.upgradeInstanceSettings.toBuilder(); + upgradeInstanceOperationSettings = settings.upgradeInstanceOperationSettings.toBuilder(); + removeIamPolicySettings = settings.removeIamPolicySettings.toBuilder(); + listNamespacesSettings = settings.listNamespacesSettings.toBuilder(); + addDnsPeeringSettings = settings.addDnsPeeringSettings.toBuilder(); + removeDnsPeeringSettings = settings.removeDnsPeeringSettings.toBuilder(); + listDnsPeeringsSettings = settings.listDnsPeeringsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listAvailableVersionsSettings, + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + deleteInstanceSettings, + updateInstanceSettings, + restartInstanceSettings, + upgradeInstanceSettings, + removeIamPolicySettings, + listNamespacesSettings, + addDnsPeeringSettings, + removeDnsPeeringSettings, + listDnsPeeringsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAvailableVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .restartInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .upgradeInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .removeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listNamespacesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .addDnsPeeringSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .removeDnsPeeringSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listDnsPeeringsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .restartInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .upgradeInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listAvailableVersions. */ + public PagedCallSettings.Builder< + ListAvailableVersionsRequest, + ListAvailableVersionsResponse, + ListAvailableVersionsPagedResponse> + listAvailableVersionsSettings() { + return listAvailableVersionsSettings; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return updateInstanceSettings; + } + + /** Returns the builder for the settings used for calls to updateInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateInstanceOperationSettings() { + return updateInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + public UnaryCallSettings.Builder restartInstanceSettings() { + return restartInstanceSettings; + } + + /** Returns the builder for the settings used for calls to restartInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restartInstanceOperationSettings() { + return restartInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeIamPolicy. */ + public UnaryCallSettings.Builder + removeIamPolicySettings() { + return removeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to listNamespaces. */ + public PagedCallSettings.Builder< + ListNamespacesRequest, ListNamespacesResponse, ListNamespacesPagedResponse> + listNamespacesSettings() { + return listNamespacesSettings; + } + + /** Returns the builder for the settings used for calls to addDnsPeering. */ + public UnaryCallSettings.Builder + addDnsPeeringSettings() { + return addDnsPeeringSettings; + } + + /** Returns the builder for the settings used for calls to removeDnsPeering. */ + public UnaryCallSettings.Builder + removeDnsPeeringSettings() { + return removeDnsPeeringSettings; + } + + /** Returns the builder for the settings used for calls to listDnsPeerings. */ + public PagedCallSettings.Builder< + ListDnsPeeringsRequest, ListDnsPeeringsResponse, ListDnsPeeringsPagedResponse> + listDnsPeeringsSettings() { + return listDnsPeeringsSettings; + } + + @Override + public DataFusionStubSettings build() throws IOException { + return new DataFusionStubSettings(this); + } + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionCallableFactory.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionCallableFactory.java new file mode 100644 index 00000000..1dc034e4 --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DataFusion service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataFusionCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionStub.java b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionStub.java new file mode 100644 index 00000000..7f79b03a --- /dev/null +++ b/google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/stub/GrpcDataFusionStub.java @@ -0,0 +1,708 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1.stub; + +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListDnsPeeringsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListInstancesPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListNamespacesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.CreateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest; +import com.google.cloud.datafusion.v1beta1.GetInstanceRequest; +import com.google.cloud.datafusion.v1beta1.Instance; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest; +import com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest; +import com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse; +import com.google.cloud.datafusion.v1beta1.ListInstancesRequest; +import com.google.cloud.datafusion.v1beta1.ListInstancesResponse; +import com.google.cloud.datafusion.v1beta1.ListNamespacesRequest; +import com.google.cloud.datafusion.v1beta1.ListNamespacesResponse; +import com.google.cloud.datafusion.v1beta1.OperationMetadata; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest; +import com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest; +import com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse; +import com.google.cloud.datafusion.v1beta1.RestartInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest; +import com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataFusion service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataFusionStub extends DataFusionStub { + private static final MethodDescriptor + listAvailableVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/ListAvailableVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAvailableVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAvailableVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/CreateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/UpdateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restartInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/RestartInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(RestartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + upgradeInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/UpgradeInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/RemoveIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveIamPolicyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNamespacesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/ListNamespaces") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNamespacesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNamespacesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addDnsPeeringMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/AddDnsPeering") + .setRequestMarshaller( + ProtoUtils.marshaller(AddDnsPeeringRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AddDnsPeeringResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeDnsPeeringMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/RemoveDnsPeering") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveDnsPeeringRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveDnsPeeringResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDnsPeeringsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datafusion.v1beta1.DataFusion/ListDnsPeerings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDnsPeeringsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDnsPeeringsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listAvailableVersionsCallable; + private final UnaryCallable + listAvailableVersionsPagedCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable updateInstanceCallable; + private final OperationCallable + updateInstanceOperationCallable; + private final UnaryCallable restartInstanceCallable; + private final OperationCallable + restartInstanceOperationCallable; + private final UnaryCallable upgradeInstanceCallable; + private final OperationCallable + upgradeInstanceOperationCallable; + private final UnaryCallable + removeIamPolicyCallable; + private final UnaryCallable listNamespacesCallable; + private final UnaryCallable + listNamespacesPagedCallable; + private final UnaryCallable addDnsPeeringCallable; + private final UnaryCallable + removeDnsPeeringCallable; + private final UnaryCallable + listDnsPeeringsCallable; + private final UnaryCallable + listDnsPeeringsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataFusionStub create(DataFusionStubSettings settings) + throws IOException { + return new GrpcDataFusionStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataFusionStub create(ClientContext clientContext) throws IOException { + return new GrpcDataFusionStub(DataFusionStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataFusionStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataFusionStub( + DataFusionStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataFusionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataFusionStub(DataFusionStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDataFusionCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataFusionStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDataFusionStub( + DataFusionStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listAvailableVersionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAvailableVersionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAvailableVersionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInstancesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("instance.name", String.valueOf(request.getInstance().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings restartInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restartInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestartInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings upgradeInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeInstanceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpgradeInstanceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + removeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RemoveIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listNamespacesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNamespacesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListNamespacesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings addDnsPeeringTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addDnsPeeringMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(AddDnsPeeringRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + removeDnsPeeringTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeDnsPeeringMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RemoveDnsPeeringRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listDnsPeeringsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDnsPeeringsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDnsPeeringsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listAvailableVersionsCallable = + callableFactory.createUnaryCallable( + listAvailableVersionsTransportSettings, + settings.listAvailableVersionsSettings(), + clientContext); + this.listAvailableVersionsPagedCallable = + callableFactory.createPagedCallable( + listAvailableVersionsTransportSettings, + settings.listAvailableVersionsSettings(), + clientContext); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + operationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.updateInstanceCallable = + callableFactory.createUnaryCallable( + updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); + this.updateInstanceOperationCallable = + callableFactory.createOperationCallable( + updateInstanceTransportSettings, + settings.updateInstanceOperationSettings(), + clientContext, + operationsStub); + this.restartInstanceCallable = + callableFactory.createUnaryCallable( + restartInstanceTransportSettings, settings.restartInstanceSettings(), clientContext); + this.restartInstanceOperationCallable = + callableFactory.createOperationCallable( + restartInstanceTransportSettings, + settings.restartInstanceOperationSettings(), + clientContext, + operationsStub); + this.upgradeInstanceCallable = + callableFactory.createUnaryCallable( + upgradeInstanceTransportSettings, settings.upgradeInstanceSettings(), clientContext); + this.upgradeInstanceOperationCallable = + callableFactory.createOperationCallable( + upgradeInstanceTransportSettings, + settings.upgradeInstanceOperationSettings(), + clientContext, + operationsStub); + this.removeIamPolicyCallable = + callableFactory.createUnaryCallable( + removeIamPolicyTransportSettings, settings.removeIamPolicySettings(), clientContext); + this.listNamespacesCallable = + callableFactory.createUnaryCallable( + listNamespacesTransportSettings, settings.listNamespacesSettings(), clientContext); + this.listNamespacesPagedCallable = + callableFactory.createPagedCallable( + listNamespacesTransportSettings, settings.listNamespacesSettings(), clientContext); + this.addDnsPeeringCallable = + callableFactory.createUnaryCallable( + addDnsPeeringTransportSettings, settings.addDnsPeeringSettings(), clientContext); + this.removeDnsPeeringCallable = + callableFactory.createUnaryCallable( + removeDnsPeeringTransportSettings, settings.removeDnsPeeringSettings(), clientContext); + this.listDnsPeeringsCallable = + callableFactory.createUnaryCallable( + listDnsPeeringsTransportSettings, settings.listDnsPeeringsSettings(), clientContext); + this.listDnsPeeringsPagedCallable = + callableFactory.createPagedCallable( + listDnsPeeringsTransportSettings, settings.listDnsPeeringsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listAvailableVersionsCallable() { + return listAvailableVersionsCallable; + } + + @Override + public UnaryCallable + listAvailableVersionsPagedCallable() { + return listAvailableVersionsPagedCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable updateInstanceCallable() { + return updateInstanceCallable; + } + + @Override + public OperationCallable + updateInstanceOperationCallable() { + return updateInstanceOperationCallable; + } + + @Override + public UnaryCallable restartInstanceCallable() { + return restartInstanceCallable; + } + + @Override + public OperationCallable + restartInstanceOperationCallable() { + return restartInstanceOperationCallable; + } + + @Override + public UnaryCallable upgradeInstanceCallable() { + return upgradeInstanceCallable; + } + + @Override + public OperationCallable + upgradeInstanceOperationCallable() { + return upgradeInstanceOperationCallable; + } + + @Override + public UnaryCallable removeIamPolicyCallable() { + return removeIamPolicyCallable; + } + + @Override + public UnaryCallable listNamespacesCallable() { + return listNamespacesCallable; + } + + @Override + public UnaryCallable + listNamespacesPagedCallable() { + return listNamespacesPagedCallable; + } + + @Override + public UnaryCallable addDnsPeeringCallable() { + return addDnsPeeringCallable; + } + + @Override + public UnaryCallable + removeDnsPeeringCallable() { + return removeDnsPeeringCallable; + } + + @Override + public UnaryCallable listDnsPeeringsCallable() { + return listDnsPeeringsCallable; + } + + @Override + public UnaryCallable + listDnsPeeringsPagedCallable() { + return listDnsPeeringsPagedCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java new file mode 100644 index 00000000..98422809 --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/DataFusionClientTest.java @@ -0,0 +1,522 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1; + +import static com.google.cloud.datafusion.v1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1.DataFusionClient.ListInstancesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataFusionClientTest { + private static MockDataFusion mockDataFusion; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataFusionClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataFusion = new MockDataFusion(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataFusion)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataFusionSettings settings = + DataFusionSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataFusionClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAvailableVersionsTest() throws Exception { + Version responsesElement = Version.newBuilder().build(); + ListAvailableVersionsResponse expectedResponse = + ListAvailableVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllAvailableVersions(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAvailableVersionsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAvailableVersionsRequest actualRequest = + ((ListAvailableVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAvailableVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAvailableVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + client.listInstances(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + mockDataFusion.addResponse(expectedResponse); + + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.getInstance(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + client.getInstance(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInstanceRequest actualRequest = ((UpdateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInstanceAsync(instance, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restartInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restartInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + RestartInstanceRequest request = + RestartInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.restartInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestartInstanceRequest actualRequest = ((RestartInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restartInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + RestartInstanceRequest request = + RestartInstanceRequest.newBuilder().setName("name3373707").build(); + client.restartInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusion.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusion.java new file mode 100644 index 00000000..216625bf --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusion.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataFusion implements MockGrpcService { + private final MockDataFusionImpl serviceImpl; + + public MockDataFusion() { + serviceImpl = new MockDataFusionImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusionImpl.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusionImpl.java new file mode 100644 index 00000000..f9f769c6 --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1/MockDataFusionImpl.java @@ -0,0 +1,208 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datafusion.v1.DataFusionGrpc.DataFusionImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataFusionImpl extends DataFusionImplBase { + private List requests; + private Queue responses; + + public MockDataFusionImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listAvailableVersions( + ListAvailableVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAvailableVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListAvailableVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAvailableVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAvailableVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInstance( + CreateInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInstance( + UpdateInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restartInstance( + RestartInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestartInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java new file mode 100644 index 00000000..1b5a7431 --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/DataFusionClientTest.java @@ -0,0 +1,879 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListAvailableVersionsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListDnsPeeringsPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListInstancesPagedResponse; +import static com.google.cloud.datafusion.v1beta1.DataFusionClient.ListNamespacesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataFusionClientTest { + private static MockDataFusion mockDataFusion; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataFusionClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataFusion = new MockDataFusion(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataFusion)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataFusionSettings settings = + DataFusionSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataFusionClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAvailableVersionsTest() throws Exception { + Version responsesElement = Version.newBuilder().build(); + ListAvailableVersionsResponse expectedResponse = + ListAvailableVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllAvailableVersions(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAvailableVersionsPagedResponse pagedListResponse = client.listAvailableVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAvailableVersionsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAvailableVersionsRequest actualRequest = + ((ListAvailableVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAvailableVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAvailableVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + client.listInstances(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + mockDataFusion.addResponse(expectedResponse); + + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.getInstance(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build(); + client.getInstance(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Instance actualResponse = client.updateInstanceAsync(instance, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInstanceRequest actualRequest = ((UpdateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + Instance instance = Instance.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInstanceAsync(instance, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restartInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restartInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + RestartInstanceRequest request = + RestartInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.restartInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestartInstanceRequest actualRequest = ((RestartInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restartInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + RestartInstanceRequest request = + RestartInstanceRequest.newBuilder().setName("name3373707").build(); + client.restartInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setDescription("description-1724546052") + .setEnableStackdriverLogging(true) + .setEnableStackdriverMonitoring(true) + .setPrivateInstance(true) + .setNetworkConfig(NetworkConfig.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllOptions(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setStateMessage("stateMessage1128185398") + .setServiceEndpoint("serviceEndpoint-1323187350") + .setZone("zone3744684") + .setVersion("version351608024") + .setServiceAccount("serviceAccount1079137720") + .setDisplayName("displayName1714148973") + .addAllAvailableVersion(new ArrayList()) + .setApiEndpoint("apiEndpoint-2038677041") + .setGcsBucket("gcsBucket239654881") + .addAllAccelerators(new ArrayList()) + .setP4ServiceAccount("p4ServiceAccount-184825700") + .setTenantProjectId("tenantProjectId674318474") + .setDataprocServiceAccount("dataprocServiceAccount-1287630888") + .setEnableRbac(true) + .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataFusion.addResponse(resultOperation); + + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.upgradeInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeInstanceRequest actualRequest = ((UpgradeInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + client.upgradeInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void removeIamPolicyTest() throws Exception { + RemoveIamPolicyResponse expectedResponse = RemoveIamPolicyResponse.newBuilder().build(); + mockDataFusion.addResponse(expectedResponse); + + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder().setResource("resource-341064690").build(); + + RemoveIamPolicyResponse actualResponse = client.removeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveIamPolicyRequest actualRequest = ((RemoveIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + RemoveIamPolicyRequest request = + RemoveIamPolicyRequest.newBuilder().setResource("resource-341064690").build(); + client.removeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNamespacesTest() throws Exception { + Namespace responsesElement = Namespace.newBuilder().build(); + ListNamespacesResponse expectedResponse = + ListNamespacesResponse.newBuilder() + .setNextPageToken("") + .addAllNamespaces(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListNamespacesPagedResponse pagedListResponse = client.listNamespaces(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNamespacesList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNamespacesRequest actualRequest = ((ListNamespacesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNamespacesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listNamespaces(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNamespacesTest2() throws Exception { + Namespace responsesElement = Namespace.newBuilder().build(); + ListNamespacesResponse expectedResponse = + ListNamespacesResponse.newBuilder() + .setNextPageToken("") + .addAllNamespaces(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNamespacesPagedResponse pagedListResponse = client.listNamespaces(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNamespacesList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNamespacesRequest actualRequest = ((ListNamespacesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNamespacesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNamespaces(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addDnsPeeringTest() throws Exception { + AddDnsPeeringResponse expectedResponse = AddDnsPeeringResponse.newBuilder().build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + AddDnsPeeringResponse actualResponse = client.addDnsPeering(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddDnsPeeringRequest actualRequest = ((AddDnsPeeringRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addDnsPeeringExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.addDnsPeering(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeDnsPeeringTest() throws Exception { + RemoveDnsPeeringResponse expectedResponse = RemoveDnsPeeringResponse.newBuilder().build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + RemoveDnsPeeringResponse actualResponse = client.removeDnsPeering(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveDnsPeeringRequest actualRequest = ((RemoveDnsPeeringRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeDnsPeeringExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.removeDnsPeering(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDnsPeeringsTest() throws Exception { + DnsPeering responsesElement = DnsPeering.newBuilder().build(); + ListDnsPeeringsResponse expectedResponse = + ListDnsPeeringsResponse.newBuilder() + .setNextPageToken("") + .addAllDnsPeerings(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListDnsPeeringsPagedResponse pagedListResponse = client.listDnsPeerings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDnsPeeringsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDnsPeeringsRequest actualRequest = ((ListDnsPeeringsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDnsPeeringsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listDnsPeerings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDnsPeeringsTest2() throws Exception { + DnsPeering responsesElement = DnsPeering.newBuilder().build(); + ListDnsPeeringsResponse expectedResponse = + ListDnsPeeringsResponse.newBuilder() + .setNextPageToken("") + .addAllDnsPeerings(Arrays.asList(responsesElement)) + .build(); + mockDataFusion.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDnsPeeringsPagedResponse pagedListResponse = client.listDnsPeerings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDnsPeeringsList().get(0), resources.get(0)); + + List actualRequests = mockDataFusion.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDnsPeeringsRequest actualRequest = ((ListDnsPeeringsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDnsPeeringsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataFusion.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDnsPeerings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusion.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusion.java new file mode 100644 index 00000000..58d2a172 --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusion.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataFusion implements MockGrpcService { + private final MockDataFusionImpl serviceImpl; + + public MockDataFusion() { + serviceImpl = new MockDataFusionImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusionImpl.java b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusionImpl.java new file mode 100644 index 00000000..260e88cb --- /dev/null +++ b/google-cloud-data-fusion/src/test/java/com/google/cloud/datafusion/v1beta1/MockDataFusionImpl.java @@ -0,0 +1,334 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datafusion.v1beta1.DataFusionGrpc.DataFusionImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataFusionImpl extends DataFusionImplBase { + private List requests; + private Queue responses; + + public MockDataFusionImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listAvailableVersions( + ListAvailableVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAvailableVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListAvailableVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAvailableVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAvailableVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInstance( + CreateInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInstance( + UpdateInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restartInstance( + RestartInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestartInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void upgradeInstance( + UpgradeInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpgradeInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeIamPolicy( + RemoveIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveIamPolicyResponse) { + requests.add(request); + responseObserver.onNext(((RemoveIamPolicyResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveIamPolicyResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNamespaces( + ListNamespacesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNamespacesResponse) { + requests.add(request); + responseObserver.onNext(((ListNamespacesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListNamespaces, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNamespacesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addDnsPeering( + AddDnsPeeringRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AddDnsPeeringResponse) { + requests.add(request); + responseObserver.onNext(((AddDnsPeeringResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddDnsPeering, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AddDnsPeeringResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeDnsPeering( + RemoveDnsPeeringRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveDnsPeeringResponse) { + requests.add(request); + responseObserver.onNext(((RemoveDnsPeeringResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveDnsPeering, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveDnsPeeringResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDnsPeerings( + ListDnsPeeringsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDnsPeeringsResponse) { + requests.add(request); + responseObserver.onNext(((ListDnsPeeringsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDnsPeerings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDnsPeeringsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-data-fusion-v1/pom.xml b/grpc-google-cloud-data-fusion-v1/pom.xml new file mode 100644 index 00000000..1dfc20d6 --- /dev/null +++ b/grpc-google-cloud-data-fusion-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-data-fusion-v1 + GRPC library for google-cloud-data-fusion + + com.google.cloud + google-cloud-data-fusion-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DataFusionGrpc.java b/grpc-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DataFusionGrpc.java new file mode 100644 index 00000000..c0856d84 --- /dev/null +++ b/grpc-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DataFusionGrpc.java @@ -0,0 +1,1061 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datafusion.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for creating and managing Data Fusion instances.
+ * Data Fusion enables ETL developers to build code-free, data integration
+ * pipelines via a point-and-click UI.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datafusion/v1/datafusion.proto") +public final class DataFusionGrpc { + + private DataFusionGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datafusion.v1.DataFusion"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAvailableVersions", + requestType = com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.class, + responseType = com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod; + if ((getListAvailableVersionsMethod = DataFusionGrpc.getListAvailableVersionsMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListAvailableVersionsMethod = DataFusionGrpc.getListAvailableVersionsMethod) + == null) { + DataFusionGrpc.getListAvailableVersionsMethod = + getListAvailableVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAvailableVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("ListAvailableVersions")) + .build(); + } + } + } + return getListAvailableVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListInstancesRequest, + com.google.cloud.datafusion.v1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.datafusion.v1.ListInstancesRequest.class, + responseType = com.google.cloud.datafusion.v1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListInstancesRequest, + com.google.cloud.datafusion.v1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.ListInstancesRequest, + com.google.cloud.datafusion.v1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = DataFusionGrpc.getListInstancesMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListInstancesMethod = DataFusionGrpc.getListInstancesMethod) == null) { + DataFusionGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.ListInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.ListInstancesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.GetInstanceRequest, + com.google.cloud.datafusion.v1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.datafusion.v1.GetInstanceRequest.class, + responseType = com.google.cloud.datafusion.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.GetInstanceRequest, + com.google.cloud.datafusion.v1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.GetInstanceRequest, + com.google.cloud.datafusion.v1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = DataFusionGrpc.getGetInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getGetInstanceMethod = DataFusionGrpc.getGetInstanceMethod) == null) { + DataFusionGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.GetInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstance", + requestType = com.google.cloud.datafusion.v1.CreateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + if ((getCreateInstanceMethod = DataFusionGrpc.getCreateInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getCreateInstanceMethod = DataFusionGrpc.getCreateInstanceMethod) == null) { + DataFusionGrpc.getCreateInstanceMethod = + getCreateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.CreateInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("CreateInstance")) + .build(); + } + } + } + return getCreateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.cloud.datafusion.v1.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = DataFusionGrpc.getDeleteInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getDeleteInstanceMethod = DataFusionGrpc.getDeleteInstanceMethod) == null) { + DataFusionGrpc.getDeleteInstanceMethod = + getDeleteInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.DeleteInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.UpdateInstanceRequest, com.google.longrunning.Operation> + getUpdateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", + requestType = com.google.cloud.datafusion.v1.UpdateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.UpdateInstanceRequest, com.google.longrunning.Operation> + getUpdateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.UpdateInstanceRequest, com.google.longrunning.Operation> + getUpdateInstanceMethod; + if ((getUpdateInstanceMethod = DataFusionGrpc.getUpdateInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getUpdateInstanceMethod = DataFusionGrpc.getUpdateInstanceMethod) == null) { + DataFusionGrpc.getUpdateInstanceMethod = + getUpdateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.UpdateInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("UpdateInstance")) + .build(); + } + } + } + return getUpdateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.RestartInstanceRequest, com.google.longrunning.Operation> + getRestartInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestartInstance", + requestType = com.google.cloud.datafusion.v1.RestartInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.RestartInstanceRequest, com.google.longrunning.Operation> + getRestartInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1.RestartInstanceRequest, com.google.longrunning.Operation> + getRestartInstanceMethod; + if ((getRestartInstanceMethod = DataFusionGrpc.getRestartInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getRestartInstanceMethod = DataFusionGrpc.getRestartInstanceMethod) == null) { + DataFusionGrpc.getRestartInstanceMethod = + getRestartInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestartInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1.RestartInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("RestartInstance")) + .build(); + } + } + } + return getRestartInstanceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataFusionStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionStub(channel, callOptions); + } + }; + return DataFusionStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataFusionBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionBlockingStub(channel, callOptions); + } + }; + return DataFusionBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataFusionFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionFutureStub(channel, callOptions); + } + }; + return DataFusionFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public abstract static class DataFusionImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public void listAvailableVersions( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAvailableVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.datafusion.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.datafusion.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.datafusion.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Date Fusion instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.datafusion.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public void updateInstance( + com.google.cloud.datafusion.v1.UpdateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public void restartInstance( + com.google.cloud.datafusion.v1.RestartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestartInstanceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAvailableVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse>( + this, METHODID_LIST_AVAILABLE_VERSIONS))) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.ListInstancesRequest, + com.google.cloud.datafusion.v1.ListInstancesResponse>( + this, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.GetInstanceRequest, + com.google.cloud.datafusion.v1.Instance>(this, METHODID_GET_INSTANCE))) + .addMethod( + getCreateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.CreateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_INSTANCE))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.DeleteInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_INSTANCE))) + .addMethod( + getUpdateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.UpdateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE))) + .addMethod( + getRestartInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1.RestartInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_RESTART_INSTANCE))) + .build(); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionStub extends io.grpc.stub.AbstractAsyncStub { + private DataFusionStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public void listAvailableVersions( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAvailableVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.datafusion.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.datafusion.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.datafusion.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Date Fusion instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.datafusion.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public void updateInstance( + com.google.cloud.datafusion.v1.UpdateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public void restartInstance( + com.google.cloud.datafusion.v1.RestartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestartInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataFusionBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public com.google.cloud.datafusion.v1.ListAvailableVersionsResponse listAvailableVersions( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAvailableVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public com.google.cloud.datafusion.v1.ListInstancesResponse listInstances( + com.google.cloud.datafusion.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public com.google.cloud.datafusion.v1.Instance getInstance( + com.google.cloud.datafusion.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInstance( + com.google.cloud.datafusion.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Date Fusion instance.
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.cloud.datafusion.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public com.google.longrunning.Operation updateInstance( + com.google.cloud.datafusion.v1.UpdateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public com.google.longrunning.Operation restartInstance( + com.google.cloud.datafusion.v1.RestartInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestartInstanceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataFusionFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse> + listAvailableVersions(com.google.cloud.datafusion.v1.ListAvailableVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAvailableVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1.ListInstancesResponse> + listInstances(com.google.cloud.datafusion.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1.Instance> + getInstance(com.google.cloud.datafusion.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstance(com.google.cloud.datafusion.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Date Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstance(com.google.cloud.datafusion.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateInstance(com.google.cloud.datafusion.v1.UpdateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restartInstance(com.google.cloud.datafusion.v1.RestartInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestartInstanceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_AVAILABLE_VERSIONS = 0; + private static final int METHODID_LIST_INSTANCES = 1; + private static final int METHODID_GET_INSTANCE = 2; + private static final int METHODID_CREATE_INSTANCE = 3; + private static final int METHODID_DELETE_INSTANCE = 4; + private static final int METHODID_UPDATE_INSTANCE = 5; + private static final int METHODID_RESTART_INSTANCE = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DataFusionImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataFusionImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_AVAILABLE_VERSIONS: + serviceImpl.listAvailableVersions( + (com.google.cloud.datafusion.v1.ListAvailableVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse>) + responseObserver); + break; + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.datafusion.v1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.datafusion.v1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INSTANCE: + serviceImpl.createInstance( + (com.google.cloud.datafusion.v1.CreateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance( + (com.google.cloud.datafusion.v1.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INSTANCE: + serviceImpl.updateInstance( + (com.google.cloud.datafusion.v1.UpdateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTART_INSTANCE: + serviceImpl.restartInstance( + (com.google.cloud.datafusion.v1.RestartInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DataFusionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataFusionBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataFusion"); + } + } + + private static final class DataFusionFileDescriptorSupplier + extends DataFusionBaseDescriptorSupplier { + DataFusionFileDescriptorSupplier() {} + } + + private static final class DataFusionMethodDescriptorSupplier + extends DataFusionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataFusionMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataFusionGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataFusionFileDescriptorSupplier()) + .addMethod(getListAvailableVersionsMethod()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getCreateInstanceMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getUpdateInstanceMethod()) + .addMethod(getRestartInstanceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-data-fusion-v1beta1/pom.xml b/grpc-google-cloud-data-fusion-v1beta1/pom.xml new file mode 100644 index 00000000..5175b675 --- /dev/null +++ b/grpc-google-cloud-data-fusion-v1beta1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + grpc-google-cloud-data-fusion-v1beta1 + GRPC library for google-cloud-data-fusion + + com.google.cloud + google-cloud-data-fusion-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1beta1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionGrpc.java b/grpc-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionGrpc.java new file mode 100644 index 00000000..3c840853 --- /dev/null +++ b/grpc-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionGrpc.java @@ -0,0 +1,1806 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datafusion.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for creating and managing Data Fusion instances.
+ * Data Fusion enables ETL developers to build code-free, data integration
+ * pipelines via a point-and-click UI.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/datafusion/v1beta1/v1beta1.proto") +public final class DataFusionGrpc { + + private DataFusionGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datafusion.v1beta1.DataFusion"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAvailableVersions", + requestType = com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + getListAvailableVersionsMethod; + if ((getListAvailableVersionsMethod = DataFusionGrpc.getListAvailableVersionsMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListAvailableVersionsMethod = DataFusionGrpc.getListAvailableVersionsMethod) + == null) { + DataFusionGrpc.getListAvailableVersionsMethod = + getListAvailableVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAvailableVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("ListAvailableVersions")) + .build(); + } + } + } + return getListAvailableVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListInstancesRequest, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.datafusion.v1beta1.ListInstancesRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListInstancesRequest, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListInstancesRequest, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = DataFusionGrpc.getListInstancesMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListInstancesMethod = DataFusionGrpc.getListInstancesMethod) == null) { + DataFusionGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListInstancesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.GetInstanceRequest, + com.google.cloud.datafusion.v1beta1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.datafusion.v1beta1.GetInstanceRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.GetInstanceRequest, + com.google.cloud.datafusion.v1beta1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.GetInstanceRequest, + com.google.cloud.datafusion.v1beta1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = DataFusionGrpc.getGetInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getGetInstanceMethod = DataFusionGrpc.getGetInstanceMethod) == null) { + DataFusionGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest, + com.google.longrunning.Operation> + getCreateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstance", + requestType = com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest, + com.google.longrunning.Operation> + getCreateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest, + com.google.longrunning.Operation> + getCreateInstanceMethod; + if ((getCreateInstanceMethod = DataFusionGrpc.getCreateInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getCreateInstanceMethod = DataFusionGrpc.getCreateInstanceMethod) == null) { + DataFusionGrpc.getCreateInstanceMethod = + getCreateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("CreateInstance")) + .build(); + } + } + } + return getCreateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest, + com.google.longrunning.Operation> + getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest, + com.google.longrunning.Operation> + getDeleteInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest, + com.google.longrunning.Operation> + getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = DataFusionGrpc.getDeleteInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getDeleteInstanceMethod = DataFusionGrpc.getDeleteInstanceMethod) == null) { + DataFusionGrpc.getDeleteInstanceMethod = + getDeleteInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest, + com.google.longrunning.Operation> + getUpdateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", + requestType = com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest, + com.google.longrunning.Operation> + getUpdateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest, + com.google.longrunning.Operation> + getUpdateInstanceMethod; + if ((getUpdateInstanceMethod = DataFusionGrpc.getUpdateInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getUpdateInstanceMethod = DataFusionGrpc.getUpdateInstanceMethod) == null) { + DataFusionGrpc.getUpdateInstanceMethod = + getUpdateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("UpdateInstance")) + .build(); + } + } + } + return getUpdateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest, + com.google.longrunning.Operation> + getRestartInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestartInstance", + requestType = com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest, + com.google.longrunning.Operation> + getRestartInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest, + com.google.longrunning.Operation> + getRestartInstanceMethod; + if ((getRestartInstanceMethod = DataFusionGrpc.getRestartInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getRestartInstanceMethod = DataFusionGrpc.getRestartInstanceMethod) == null) { + DataFusionGrpc.getRestartInstanceMethod = + getRestartInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestartInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("RestartInstance")) + .build(); + } + } + } + return getRestartInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest, + com.google.longrunning.Operation> + getUpgradeInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeInstance", + requestType = com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest, + com.google.longrunning.Operation> + getUpgradeInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest, + com.google.longrunning.Operation> + getUpgradeInstanceMethod; + if ((getUpgradeInstanceMethod = DataFusionGrpc.getUpgradeInstanceMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getUpgradeInstanceMethod = DataFusionGrpc.getUpgradeInstanceMethod) == null) { + DataFusionGrpc.getUpgradeInstanceMethod = + getUpgradeInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpgradeInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("UpgradeInstance")) + .build(); + } + } + } + return getUpgradeInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse> + getRemoveIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveIamPolicy", + requestType = com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse> + getRemoveIamPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse> + getRemoveIamPolicyMethod; + if ((getRemoveIamPolicyMethod = DataFusionGrpc.getRemoveIamPolicyMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getRemoveIamPolicyMethod = DataFusionGrpc.getRemoveIamPolicyMethod) == null) { + DataFusionGrpc.getRemoveIamPolicyMethod = + getRemoveIamPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("RemoveIamPolicy")) + .build(); + } + } + } + return getRemoveIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse> + getListNamespacesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNamespaces", + requestType = com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse> + getListNamespacesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse> + getListNamespacesMethod; + if ((getListNamespacesMethod = DataFusionGrpc.getListNamespacesMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListNamespacesMethod = DataFusionGrpc.getListNamespacesMethod) == null) { + DataFusionGrpc.getListNamespacesMethod = + getListNamespacesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNamespaces")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("ListNamespaces")) + .build(); + } + } + } + return getListNamespacesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse> + getAddDnsPeeringMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddDnsPeering", + requestType = com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse> + getAddDnsPeeringMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse> + getAddDnsPeeringMethod; + if ((getAddDnsPeeringMethod = DataFusionGrpc.getAddDnsPeeringMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getAddDnsPeeringMethod = DataFusionGrpc.getAddDnsPeeringMethod) == null) { + DataFusionGrpc.getAddDnsPeeringMethod = + getAddDnsPeeringMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddDnsPeering")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse + .getDefaultInstance())) + .setSchemaDescriptor(new DataFusionMethodDescriptorSupplier("AddDnsPeering")) + .build(); + } + } + } + return getAddDnsPeeringMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse> + getRemoveDnsPeeringMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveDnsPeering", + requestType = com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse> + getRemoveDnsPeeringMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse> + getRemoveDnsPeeringMethod; + if ((getRemoveDnsPeeringMethod = DataFusionGrpc.getRemoveDnsPeeringMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getRemoveDnsPeeringMethod = DataFusionGrpc.getRemoveDnsPeeringMethod) == null) { + DataFusionGrpc.getRemoveDnsPeeringMethod = + getRemoveDnsPeeringMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDnsPeering")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("RemoveDnsPeering")) + .build(); + } + } + } + return getRemoveDnsPeeringMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse> + getListDnsPeeringsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDnsPeerings", + requestType = com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.class, + responseType = com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse> + getListDnsPeeringsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse> + getListDnsPeeringsMethod; + if ((getListDnsPeeringsMethod = DataFusionGrpc.getListDnsPeeringsMethod) == null) { + synchronized (DataFusionGrpc.class) { + if ((getListDnsPeeringsMethod = DataFusionGrpc.getListDnsPeeringsMethod) == null) { + DataFusionGrpc.getListDnsPeeringsMethod = + getListDnsPeeringsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDnsPeerings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataFusionMethodDescriptorSupplier("ListDnsPeerings")) + .build(); + } + } + } + return getListDnsPeeringsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataFusionStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionStub(channel, callOptions); + } + }; + return DataFusionStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataFusionBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionBlockingStub(channel, callOptions); + } + }; + return DataFusionBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataFusionFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataFusionFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionFutureStub(channel, callOptions); + } + }; + return DataFusionFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public abstract static class DataFusionImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public void listAvailableVersions( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAvailableVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Data Fusion instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public void updateInstance( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public void restartInstance( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestartInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Upgrade a single Data Fusion instance.
+     * At the end of an operation instance is fully upgraded.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpgradeInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove IAM policy that is currently set on the given resource.
+     * 
+ */ + public void removeIamPolicy( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * List namespaces in a given instance
+     * 
+ */ + public void listNamespaces( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNamespacesMethod(), responseObserver); + } + + /** + * + * + *
+     * Add DNS peering on the given resource.
+     * 
+ */ + public void addDnsPeering( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAddDnsPeeringMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove DNS peering on the given resource.
+     * 
+ */ + public void removeDnsPeering( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveDnsPeeringMethod(), responseObserver); + } + + /** + * + * + *
+     * List DNS peering for a given resource.
+     * 
+ */ + public void listDnsPeerings( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDnsPeeringsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListAvailableVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse>( + this, METHODID_LIST_AVAILABLE_VERSIONS))) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.ListInstancesRequest, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse>( + this, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.GetInstanceRequest, + com.google.cloud.datafusion.v1beta1.Instance>(this, METHODID_GET_INSTANCE))) + .addMethod( + getCreateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_INSTANCE))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_INSTANCE))) + .addMethod( + getUpdateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE))) + .addMethod( + getRestartInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_RESTART_INSTANCE))) + .addMethod( + getUpgradeInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPGRADE_INSTANCE))) + .addMethod( + getRemoveIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse>( + this, METHODID_REMOVE_IAM_POLICY))) + .addMethod( + getListNamespacesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse>( + this, METHODID_LIST_NAMESPACES))) + .addMethod( + getAddDnsPeeringMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse>( + this, METHODID_ADD_DNS_PEERING))) + .addMethod( + getRemoveDnsPeeringMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse>( + this, METHODID_REMOVE_DNS_PEERING))) + .addMethod( + getListDnsPeeringsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse>( + this, METHODID_LIST_DNS_PEERINGS))) + .build(); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionStub extends io.grpc.stub.AbstractAsyncStub { + private DataFusionStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public void listAvailableVersions( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAvailableVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Data Fusion instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public void updateInstance( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public void restartInstance( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestartInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upgrade a single Data Fusion instance.
+     * At the end of an operation instance is fully upgraded.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove IAM policy that is currently set on the given resource.
+     * 
+ */ + public void removeIamPolicy( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List namespaces in a given instance
+     * 
+ */ + public void listNamespaces( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNamespacesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Add DNS peering on the given resource.
+     * 
+ */ + public void addDnsPeering( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddDnsPeeringMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove DNS peering on the given resource.
+     * 
+ */ + public void removeDnsPeering( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveDnsPeeringMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List DNS peering for a given resource.
+     * 
+ */ + public void listDnsPeerings( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDnsPeeringsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataFusionBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse listAvailableVersions( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAvailableVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.ListInstancesResponse listInstances( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.Instance getInstance( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInstance( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Data Fusion instance.
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public com.google.longrunning.Operation updateInstance( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public com.google.longrunning.Operation restartInstance( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestartInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upgrade a single Data Fusion instance.
+     * At the end of an operation instance is fully upgraded.
+     * 
+ */ + public com.google.longrunning.Operation upgradeInstance( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove IAM policy that is currently set on the given resource.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse removeIamPolicy( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List namespaces in a given instance
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.ListNamespacesResponse listNamespaces( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNamespacesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Add DNS peering on the given resource.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse addDnsPeering( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddDnsPeeringMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove DNS peering on the given resource.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse removeDnsPeering( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveDnsPeeringMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List DNS peering for a given resource.
+     * 
+ */ + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse listDnsPeerings( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDnsPeeringsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for creating and managing Data Fusion instances.
+   * Data Fusion enables ETL developers to build code-free, data integration
+   * pipelines via a point-and-click UI.
+   * 
+ */ + public static final class DataFusionFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataFusionFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataFusionFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataFusionFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists possible versions for Data Fusion instances in the specified project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse> + listAvailableVersions( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAvailableVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Data Fusion instances in the specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.ListInstancesResponse> + listInstances(com.google.cloud.datafusion.v1beta1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Data Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.Instance> + getInstance(com.google.cloud.datafusion.v1beta1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Data Fusion instance in the specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstance(com.google.cloud.datafusion.v1beta1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Data Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstance(com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a single Data Fusion instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateInstance(com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restart a single Data Fusion instance.
+     * At the end of an operation instance is fully restarted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restartInstance(com.google.cloud.datafusion.v1beta1.RestartInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestartInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upgrade a single Data Fusion instance.
+     * At the end of an operation instance is fully upgraded.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeInstance(com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove IAM policy that is currently set on the given resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse> + removeIamPolicy(com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List namespaces in a given instance
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse> + listNamespaces(com.google.cloud.datafusion.v1beta1.ListNamespacesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNamespacesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Add DNS peering on the given resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse> + addDnsPeering(com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddDnsPeeringMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove DNS peering on the given resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse> + removeDnsPeering(com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveDnsPeeringMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List DNS peering for a given resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse> + listDnsPeerings(com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDnsPeeringsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_AVAILABLE_VERSIONS = 0; + private static final int METHODID_LIST_INSTANCES = 1; + private static final int METHODID_GET_INSTANCE = 2; + private static final int METHODID_CREATE_INSTANCE = 3; + private static final int METHODID_DELETE_INSTANCE = 4; + private static final int METHODID_UPDATE_INSTANCE = 5; + private static final int METHODID_RESTART_INSTANCE = 6; + private static final int METHODID_UPGRADE_INSTANCE = 7; + private static final int METHODID_REMOVE_IAM_POLICY = 8; + private static final int METHODID_LIST_NAMESPACES = 9; + private static final int METHODID_ADD_DNS_PEERING = 10; + private static final int METHODID_REMOVE_DNS_PEERING = 11; + private static final int METHODID_LIST_DNS_PEERINGS = 12; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DataFusionImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataFusionImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_AVAILABLE_VERSIONS: + serviceImpl.listAvailableVersions( + (com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse>) + responseObserver); + break; + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.datafusion.v1beta1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListInstancesResponse>) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.datafusion.v1beta1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INSTANCE: + serviceImpl.createInstance( + (com.google.cloud.datafusion.v1beta1.CreateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance( + (com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INSTANCE: + serviceImpl.updateInstance( + (com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTART_INSTANCE: + serviceImpl.restartInstance( + (com.google.cloud.datafusion.v1beta1.RestartInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPGRADE_INSTANCE: + serviceImpl.upgradeInstance( + (com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_IAM_POLICY: + serviceImpl.removeIamPolicy( + (com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse>) + responseObserver); + break; + case METHODID_LIST_NAMESPACES: + serviceImpl.listNamespaces( + (com.google.cloud.datafusion.v1beta1.ListNamespacesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse>) + responseObserver); + break; + case METHODID_ADD_DNS_PEERING: + serviceImpl.addDnsPeering( + (com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse>) + responseObserver); + break; + case METHODID_REMOVE_DNS_PEERING: + serviceImpl.removeDnsPeering( + (com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse>) + responseObserver); + break; + case METHODID_LIST_DNS_PEERINGS: + serviceImpl.listDnsPeerings( + (com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DataFusionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataFusionBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataFusion"); + } + } + + private static final class DataFusionFileDescriptorSupplier + extends DataFusionBaseDescriptorSupplier { + DataFusionFileDescriptorSupplier() {} + } + + private static final class DataFusionMethodDescriptorSupplier + extends DataFusionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataFusionMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataFusionGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataFusionFileDescriptorSupplier()) + .addMethod(getListAvailableVersionsMethod()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getCreateInstanceMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getUpdateInstanceMethod()) + .addMethod(getRestartInstanceMethod()) + .addMethod(getUpgradeInstanceMethod()) + .addMethod(getRemoveIamPolicyMethod()) + .addMethod(getListNamespacesMethod()) + .addMethod(getAddDnsPeeringMethod()) + .addMethod(getRemoveDnsPeeringMethod()) + .addMethod(getListDnsPeeringsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 00000000..3a9b503a --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..77243461 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..47c46945 --- /dev/null +++ b/pom.xml @@ -0,0 +1,200 @@ + + + 4.0.0 + com.google.cloud + google-cloud-data-fusion-parent + pom + 0.0.1-SNAPSHOT + Google Cloud Data Fusion Parent + https://github.com/googleapis/java-data-fusion + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.12.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-data-fusion.git + scm:git:git@github.com:googleapis/java-data-fusion.git + https://github.com/googleapis/java-data-fusion + HEAD + + + https://github.com/googleapis/java-data-fusion/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-data-fusion-parent + + + + + + com.google.cloud + google-cloud-data-fusion + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 1.3.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-data-fusion + grpc-google-cloud-data-fusion-v1beta1 + grpc-google-cloud-data-fusion-v1 + proto-google-cloud-data-fusion-v1beta1 + proto-google-cloud-data-fusion-v1 + google-cloud-data-fusion-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-data-fusion-v1/clirr-ignored-differences.xml b/proto-google-cloud-data-fusion-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..aef005f6 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/datafusion/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/datafusion/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/datafusion/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-data-fusion-v1/pom.xml b/proto-google-cloud-data-fusion-v1/pom.xml new file mode 100644 index 00000000..2e2dc8c3 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-data-fusion-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-data-fusion-v1 + Proto library for google-cloud-data-fusion + + com.google.cloud + google-cloud-data-fusion-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Accelerator.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Accelerator.java new file mode 100644 index 00000000..38eaf5a0 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Accelerator.java @@ -0,0 +1,1135 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Identifies Data Fusion accelerators for an instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Accelerator} + */ +public final class Accelerator extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.Accelerator) + AcceleratorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Accelerator.newBuilder() to construct. + private Accelerator(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Accelerator() { + acceleratorType_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Accelerator(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Accelerator( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + acceleratorType_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Accelerator.class, + com.google.cloud.datafusion.v1.Accelerator.Builder.class); + } + + /** + * + * + *
+   * Each type represents an Accelerator (Add-On) supported by Cloud Data Fusion
+   * service.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Accelerator.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, if unspecified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Change Data Capture accelerator for CDF.
+     * 
+ * + * CDC = 1; + */ + CDC(1), + /** + * + * + *
+     * Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud
+     * Healthcare specific CDF plugins developed by Healthcare team.
+     * 
+ * + * HEALTHCARE = 2; + */ + HEALTHCARE(2), + /** + * + * + *
+     * Contact Center AI Insights
+     * This accelerator is used to enable import and export pipelines
+     * custom built to streamline CCAI Insights processing.
+     * 
+ * + * CCAI_INSIGHTS = 3; + */ + CCAI_INSIGHTS(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value, if unspecified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Change Data Capture accelerator for CDF.
+     * 
+ * + * CDC = 1; + */ + public static final int CDC_VALUE = 1; + /** + * + * + *
+     * Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud
+     * Healthcare specific CDF plugins developed by Healthcare team.
+     * 
+ * + * HEALTHCARE = 2; + */ + public static final int HEALTHCARE_VALUE = 2; + /** + * + * + *
+     * Contact Center AI Insights
+     * This accelerator is used to enable import and export pipelines
+     * custom built to streamline CCAI Insights processing.
+     * 
+ * + * CCAI_INSIGHTS = 3; + */ + public static final int CCAI_INSIGHTS_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType 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 AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return CDC; + case 2: + return HEALTHCARE; + case 3: + return CCAI_INSIGHTS; + 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 AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Accelerator.getDescriptor().getEnumTypes().get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType 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 AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1.Accelerator.AcceleratorType) + } + + /** + * + * + *
+   * Different values possible for the state of an accelerator
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Accelerator.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, do not use
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Indicates that the accelerator is enabled and available to use
+     * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+     * Indicates that the accelerator is disabled and not available to use
+     * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + /** + * + * + *
+     * Indicates that accelerator state is currently unknown.
+     * Requests for enable, disable could be retried while in this state
+     * 
+ * + * UNKNOWN = 3; + */ + UNKNOWN(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value, do not use
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indicates that the accelerator is enabled and available to use
+     * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + /** + * + * + *
+     * Indicates that the accelerator is disabled and not available to use
+     * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + /** + * + * + *
+     * Indicates that accelerator state is currently unknown.
+     * Requests for enable, disable could be retried while in this state
+     * 
+ * + * UNKNOWN = 3; + */ + public static final int UNKNOWN_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 ENABLED; + case 2: + return DISABLED; + case 3: + return UNKNOWN; + 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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Accelerator.getDescriptor().getEnumTypes().get(1); + } + + 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.cloud.datafusion.v1.Accelerator.State) + } + + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 1; + private int acceleratorType_; + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType result = + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.valueOf(acceleratorType_); + return result == null + ? com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_; + /** + * + * + *
+   * The state of the accelerator
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the accelerator
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Accelerator.State result = + com.google.cloud.datafusion.v1.Accelerator.State.valueOf(state_); + return result == null ? com.google.cloud.datafusion.v1.Accelerator.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 (acceleratorType_ + != com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, acceleratorType_); + } + if (state_ != com.google.cloud.datafusion.v1.Accelerator.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (acceleratorType_ + != com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, acceleratorType_); + } + if (state_ != com.google.cloud.datafusion.v1.Accelerator.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.Accelerator)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.Accelerator other = + (com.google.cloud.datafusion.v1.Accelerator) obj; + + if (acceleratorType_ != other.acceleratorType_) return false; + if (state_ != other.state_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + acceleratorType_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.Accelerator prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Identifies Data Fusion accelerators for an instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Accelerator} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.Accelerator) + com.google.cloud.datafusion.v1.AcceleratorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Accelerator.class, + com.google.cloud.datafusion.v1.Accelerator.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.Accelerator.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + acceleratorType_ = 0; + + state_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Accelerator_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.Accelerator.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator build() { + com.google.cloud.datafusion.v1.Accelerator result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator buildPartial() { + com.google.cloud.datafusion.v1.Accelerator result = + new com.google.cloud.datafusion.v1.Accelerator(this); + result.acceleratorType_ = acceleratorType_; + result.state_ = state_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.Accelerator) { + return mergeFrom((com.google.cloud.datafusion.v1.Accelerator) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.Accelerator other) { + if (other == com.google.cloud.datafusion.v1.Accelerator.getDefaultInstance()) return this; + if (other.acceleratorType_ != 0) { + setAcceleratorTypeValue(other.getAcceleratorTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.Accelerator parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.Accelerator) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int acceleratorType_ = 0; + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @param value The enum numeric value on the wire for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeValue(int value) { + + acceleratorType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType result = + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.valueOf(acceleratorType_); + return result == null + ? com.google.cloud.datafusion.v1.Accelerator.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType( + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + acceleratorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + + acceleratorType_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The state of the accelerator
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the accelerator
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the accelerator
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Accelerator.State result = + com.google.cloud.datafusion.v1.Accelerator.State.valueOf(state_); + return result == null + ? com.google.cloud.datafusion.v1.Accelerator.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The state of the accelerator
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.datafusion.v1.Accelerator.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the accelerator
+     * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.Accelerator) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.Accelerator) + private static final com.google.cloud.datafusion.v1.Accelerator DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.Accelerator(); + } + + public static com.google.cloud.datafusion.v1.Accelerator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Accelerator parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Accelerator(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/AcceleratorOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/AcceleratorOrBuilder.java new file mode 100644 index 00000000..afc36f0b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/AcceleratorOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface AcceleratorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.Accelerator) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The enum numeric value on the wire for acceleratorType. + */ + int getAcceleratorTypeValue(); + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The acceleratorType. + */ + com.google.cloud.datafusion.v1.Accelerator.AcceleratorType getAcceleratorType(); + + /** + * + * + *
+   * The state of the accelerator
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the accelerator
+   * 
+ * + * .google.cloud.datafusion.v1.Accelerator.State state = 2; + * + * @return The state. + */ + com.google.cloud.datafusion.v1.Accelerator.State getState(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java new file mode 100644 index 00000000..9f35ce63 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequest.java @@ -0,0 +1,1099 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Request message for creating a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.CreateInstanceRequest} + */ +public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.CreateInstanceRequest) + CreateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstanceRequest.newBuilder() to construct. + private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + case 26: + { + com.google.cloud.datafusion.v1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.datafusion.v1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.CreateInstanceRequest.class, + com.google.cloud.datafusion.v1.CreateInstanceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private com.google.cloud.datafusion.v1.Instance instance_; + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (instance_ != null) { + output.writeMessage(3, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.CreateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.CreateInstanceRequest other = + (com.google.cloud.datafusion.v1.CreateInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.CreateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for creating a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.CreateInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.CreateInstanceRequest) + com.google.cloud.datafusion.v1.CreateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.CreateInstanceRequest.class, + com.google.cloud.datafusion.v1.CreateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.CreateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + instanceId_ = ""; + + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CreateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.CreateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CreateInstanceRequest build() { + com.google.cloud.datafusion.v1.CreateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CreateInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1.CreateInstanceRequest result = + new com.google.cloud.datafusion.v1.CreateInstanceRequest(this); + result.parent_ = parent_; + result.instanceId_ = instanceId_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.CreateInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.CreateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.CreateInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1.CreateInstanceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.CreateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.CreateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return The instance. + */ + public com.google.cloud.datafusion.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public Builder setInstance(com.google.cloud.datafusion.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public Builder setInstance(com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public Builder mergeInstance(com.google.cloud.datafusion.v1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.datafusion.v1.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public com.google.cloud.datafusion.v1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.CreateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.CreateInstanceRequest) + private static final com.google.cloud.datafusion.v1.CreateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.CreateInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1.CreateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CreateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java new file mode 100644 index 00000000..79e1d827 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CreateInstanceRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface CreateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.CreateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + * + * @return The instance. + */ + com.google.cloud.datafusion.v1.Instance getInstance(); + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 3; + */ + com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java new file mode 100644 index 00000000..460e2f59 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfig.java @@ -0,0 +1,650 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * The crypto key configuration. This field is used by the Customer-managed
+ * encryption keys (CMEK) feature.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.CryptoKeyConfig} + */ +public final class CryptoKeyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.CryptoKeyConfig) + CryptoKeyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CryptoKeyConfig.newBuilder() to construct. + private CryptoKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CryptoKeyConfig() { + keyReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CryptoKeyConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CryptoKeyConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + keyReference_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.CryptoKeyConfig.class, + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder.class); + } + + public static final int KEY_REFERENCE_FIELD_NUMBER = 1; + private volatile java.lang.Object keyReference_; + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + @java.lang.Override + public java.lang.String getKeyReference() { + java.lang.Object ref = keyReference_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyReference_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyReferenceBytes() { + java.lang.Object ref = keyReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyReference_ = 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 (!getKeyReferenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyReference_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyReferenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyReference_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.CryptoKeyConfig)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.CryptoKeyConfig other = + (com.google.cloud.datafusion.v1.CryptoKeyConfig) obj; + + if (!getKeyReference().equals(other.getKeyReference())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getKeyReference().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.CryptoKeyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-managed
+   * encryption keys (CMEK) feature.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.CryptoKeyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.CryptoKeyConfig) + com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.CryptoKeyConfig.class, + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.CryptoKeyConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + keyReference_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfig getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.CryptoKeyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfig build() { + com.google.cloud.datafusion.v1.CryptoKeyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfig buildPartial() { + com.google.cloud.datafusion.v1.CryptoKeyConfig result = + new com.google.cloud.datafusion.v1.CryptoKeyConfig(this); + result.keyReference_ = keyReference_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.CryptoKeyConfig) { + return mergeFrom((com.google.cloud.datafusion.v1.CryptoKeyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.CryptoKeyConfig other) { + if (other == com.google.cloud.datafusion.v1.CryptoKeyConfig.getDefaultInstance()) return this; + if (!other.getKeyReference().isEmpty()) { + keyReference_ = other.keyReference_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.CryptoKeyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.CryptoKeyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyReference_ = ""; + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + public java.lang.String getKeyReference() { + java.lang.Object ref = keyReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + public com.google.protobuf.ByteString getKeyReferenceBytes() { + java.lang.Object ref = keyReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @param value The keyReference to set. + * @return This builder for chaining. + */ + public Builder setKeyReference(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyReference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return This builder for chaining. + */ + public Builder clearKeyReference() { + + keyReference_ = getDefaultInstance().getKeyReference(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @param value The bytes for keyReference to set. + * @return This builder for chaining. + */ + public Builder setKeyReferenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyReference_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.CryptoKeyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.CryptoKeyConfig) + private static final com.google.cloud.datafusion.v1.CryptoKeyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.CryptoKeyConfig(); + } + + public static com.google.cloud.datafusion.v1.CryptoKeyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoKeyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoKeyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java new file mode 100644 index 00000000..c0f113b8 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/CryptoKeyConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface CryptoKeyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.CryptoKeyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + java.lang.String getKeyReference(); + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + com.google.protobuf.ByteString getKeyReferenceBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java new file mode 100644 index 00000000..3f69c093 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Datafusion.java @@ -0,0 +1,456 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public final class Datafusion { + private Datafusion() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_NetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_Version_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_Version_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_Accelerator_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_Accelerator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_CryptoKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_Instance_OptionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_Instance_OptionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_CreateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1_OperationMetadata_AdditionalStatusEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1_OperationMetadata_AdditionalStatusEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/datafusion/v1/datafusion." + + "proto\022\032google.cloud.datafusion.v1\032\034googl" + + "e/api/annotations.proto\032\027google/api/clie" + + "nt.proto\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032#google/lon" + + "grunning/operations.proto\032 google/protob" + + "uf/field_mask.proto\032\037google/protobuf/tim" + + "estamp.proto\"7\n\rNetworkConfig\022\017\n\007network" + + "\030\001 \001(\t\022\025\n\rip_allocation\030\002 \001(\t\"V\n\007Version" + + "\022\026\n\016version_number\030\001 \001(\t\022\027\n\017default_vers" + + "ion\030\002 \001(\010\022\032\n\022available_features\030\003 \003(\t\"\307\002" + + "\n\013Accelerator\022Q\n\020accelerator_type\030\001 \001(\0162" + + "7.google.cloud.datafusion.v1.Accelerator" + + ".AcceleratorType\022<\n\005state\030\002 \001(\0162-.google" + + ".cloud.datafusion.v1.Accelerator.State\"_" + + "\n\017AcceleratorType\022 \n\034ACCELERATOR_TYPE_UN" + + "SPECIFIED\020\000\022\007\n\003CDC\020\001\022\016\n\nHEALTHCARE\020\002\022\021\n\r" + + "CCAI_INSIGHTS\020\003\"F\n\005State\022\025\n\021STATE_UNSPEC" + + "IFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002\022\013\n\007UN" + + "KNOWN\020\003\"(\n\017CryptoKeyConfig\022\025\n\rkey_refere" + + "nce\030\001 \001(\t\"\204\014\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\003\022\023\n\013description\030\002 \001(\t\022<\n\004type\030\003 \001(\0162).g" + + "oogle.cloud.datafusion.v1.Instance.TypeB" + + "\003\340A\002\022\"\n\032enable_stackdriver_logging\030\004 \001(\010" + + "\022%\n\035enable_stackdriver_monitoring\030\005 \001(\010\022" + + "\030\n\020private_instance\030\006 \001(\010\022A\n\016network_con" + + "fig\030\007 \001(\0132).google.cloud.datafusion.v1.N" + + "etworkConfig\022@\n\006labels\030\010 \003(\01320.google.cl" + + "oud.datafusion.v1.Instance.LabelsEntry\022B" + + "\n\007options\030\t \003(\01321.google.cloud.datafusio" + + "n.v1.Instance.OptionsEntry\0224\n\013create_tim" + + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\013 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022>\n\005state\030\014 \001(\0162*.google.c" + + "loud.datafusion.v1.Instance.StateB\003\340A\003\022\032" + + "\n\rstate_message\030\r \001(\tB\003\340A\003\022\035\n\020service_en" + + "dpoint\030\016 \001(\tB\003\340A\003\022\014\n\004zone\030\017 \001(\t\022\017\n\007versi" + + "on\030\020 \001(\t\022\036\n\017service_account\030\021 \001(\tB\005\030\001\340A\003" + + "\022\024\n\014display_name\030\022 \001(\t\022>\n\021available_vers" + + "ion\030\023 \003(\0132#.google.cloud.datafusion.v1.V" + + "ersion\022\031\n\014api_endpoint\030\024 \001(\tB\003\340A\003\022\027\n\ngcs" + + "_bucket\030\025 \001(\tB\003\340A\003\022=\n\014accelerators\030\026 \003(\013" + + "2\'.google.cloud.datafusion.v1.Accelerato" + + "r\022\037\n\022p4_service_account\030\027 \001(\tB\003\340A\003\022\036\n\021te" + + "nant_project_id\030\030 \001(\tB\003\340A\003\022 \n\030dataproc_s" + + "ervice_account\030\031 \001(\t\022\023\n\013enable_rbac\030\033 \001(" + + "\010\022F\n\021crypto_key_config\030\034 \001(\0132+.google.cl" + + "oud.datafusion.v1.CryptoKeyConfig\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"F\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t" + + "\n\005BASIC\020\001\022\016\n\nENTERPRISE\020\002\022\r\n\tDEVELOPER\020\003" + + "\"\246\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CRE" + + "ATING\020\001\022\n\n\006ACTIVE\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELET" + + "ING\020\004\022\r\n\tUPGRADING\020\005\022\016\n\nRESTARTING\020\006\022\014\n\010" + + "UPDATING\020\007\022\021\n\rAUTO_UPDATING\020\010\022\022\n\016AUTO_UP" + + "GRADING\020\t:e\352Ab\n\"datafusion.googleapis.co" + + "m/Instance\022 + * Request message for deleting a Data Fusion instance. + * + * + * Protobuf type {@code google.cloud.datafusion.v1.DeleteInstanceRequest} + */ +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.DeleteInstanceRequest.class, + com.google.cloud.datafusion.v1.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.DeleteInstanceRequest other = + (com.google.cloud.datafusion.v1.DeleteInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.DeleteInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for deleting a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.DeleteInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.DeleteInstanceRequest) + com.google.cloud.datafusion.v1.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.DeleteInstanceRequest.class, + com.google.cloud.datafusion.v1.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.DeleteInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.DeleteInstanceRequest build() { + com.google.cloud.datafusion.v1.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.DeleteInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1.DeleteInstanceRequest result = + new com.google.cloud.datafusion.v1.DeleteInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.DeleteInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.DeleteInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.DeleteInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1.DeleteInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.DeleteInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.DeleteInstanceRequest) + private static final com.google.cloud.datafusion.v1.DeleteInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.DeleteInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 00000000..a69a1fc4 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/DeleteInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface DeleteInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java new file mode 100644 index 00000000..cd50c3e7 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Request message for getting details about a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.GetInstanceRequest.class, + com.google.cloud.datafusion.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.GetInstanceRequest other = + (com.google.cloud.datafusion.v1.GetInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.GetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for getting details about a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.GetInstanceRequest) + com.google.cloud.datafusion.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.GetInstanceRequest.class, + com.google.cloud.datafusion.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.GetInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.GetInstanceRequest build() { + com.google.cloud.datafusion.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.GetInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1.GetInstanceRequest result = + new com.google.cloud.datafusion.v1.GetInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.GetInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1.GetInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.GetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.GetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.GetInstanceRequest) + private static final com.google.cloud.datafusion.v1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.GetInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 00000000..8b0909ce --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java new file mode 100644 index 00000000..5c657dfa --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Instance.java @@ -0,0 +1,6891 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Represents a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + stateMessage_ = ""; + serviceEndpoint_ = ""; + zone_ = ""; + version_ = ""; + serviceAccount_ = ""; + displayName_ = ""; + availableVersion_ = java.util.Collections.emptyList(); + apiEndpoint_ = ""; + gcsBucket_ = ""; + accelerators_ = java.util.Collections.emptyList(); + p4ServiceAccount_ = ""; + tenantProjectId_ = ""; + dataprocServiceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 32: + { + enableStackdriverLogging_ = input.readBool(); + break; + } + case 40: + { + enableStackdriverMonitoring_ = input.readBool(); + break; + } + case 48: + { + privateInstance_ = input.readBool(); + break; + } + case 58: + { + com.google.cloud.datafusion.v1.NetworkConfig.Builder subBuilder = null; + if (networkConfig_ != null) { + subBuilder = networkConfig_.toBuilder(); + } + networkConfig_ = + input.readMessage( + com.google.cloud.datafusion.v1.NetworkConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkConfig_); + networkConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + options_ = + com.google.protobuf.MapField.newMapField( + OptionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry options__ = + input.readMessage( + OptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + options_.getMutableMap().put(options__.getKey(), options__.getValue()); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 96: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + stateMessage_ = s; + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceEndpoint_ = s; + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 154: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + availableVersion_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + availableVersion_.add( + input.readMessage( + com.google.cloud.datafusion.v1.Version.parser(), extensionRegistry)); + break; + } + case 162: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiEndpoint_ = s; + break; + } + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsBucket_ = s; + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + accelerators_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + accelerators_.add( + input.readMessage( + com.google.cloud.datafusion.v1.Accelerator.parser(), extensionRegistry)); + break; + } + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + + p4ServiceAccount_ = s; + break; + } + case 194: + { + java.lang.String s = input.readStringRequireUtf8(); + + tenantProjectId_ = s; + break; + } + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataprocServiceAccount_ = s; + break; + } + case 216: + { + enableRbac_ = input.readBool(); + break; + } + case 226: + { + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder subBuilder = null; + if (cryptoKeyConfig_ != null) { + subBuilder = cryptoKeyConfig_.toBuilder(); + } + cryptoKeyConfig_ = + input.readMessage( + com.google.cloud.datafusion.v1.CryptoKeyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cryptoKeyConfig_); + cryptoKeyConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + availableVersion_ = java.util.Collections.unmodifiableList(availableVersion_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + case 9: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Instance.class, + com.google.cloud.datafusion.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * Represents the type of Data Fusion instance. Each type is configured with
+   * the default settings for processing and memory.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Instance.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified. The instance creation will fail.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Basic Data Fusion instance. In Basic type, the user will be able to
+     * create data pipelines using point and click UI. However, there are
+     * certain limitations, such as fewer number of concurrent pipelines, no
+     * support for streaming pipelines, etc.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Enterprise Data Fusion instance. In Enterprise type, the user will have
+     * all features available, such as support for streaming pipelines, higher
+     * number of concurrent pipelines, etc.
+     * 
+ * + * ENTERPRISE = 2; + */ + ENTERPRISE(2), + /** + * + * + *
+     * Developer Data Fusion instance. In Developer type, the user will have all
+     * features available but with restrictive capabilities. This is to help
+     * enterprises design and develop their data ingestion and integration
+     * pipelines at low cost.
+     * 
+ * + * DEVELOPER = 3; + */ + DEVELOPER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified. The instance creation will fail.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Basic Data Fusion instance. In Basic type, the user will be able to
+     * create data pipelines using point and click UI. However, there are
+     * certain limitations, such as fewer number of concurrent pipelines, no
+     * support for streaming pipelines, etc.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Enterprise Data Fusion instance. In Enterprise type, the user will have
+     * all features available, such as support for streaming pipelines, higher
+     * number of concurrent pipelines, etc.
+     * 
+ * + * ENTERPRISE = 2; + */ + public static final int ENTERPRISE_VALUE = 2; + /** + * + * + *
+     * Developer Data Fusion instance. In Developer type, the user will have all
+     * features available but with restrictive capabilities. This is to help
+     * enterprises design and develop their data ingestion and integration
+     * pipelines at low cost.
+     * 
+ * + * DEVELOPER = 3; + */ + public static final int DEVELOPER_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return ENTERPRISE; + case 3: + return DEVELOPER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1.Instance.Type) + } + + /** + * + * + *
+   * Represents the state of a Data Fusion instance
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Instance does not have a state yet
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Instance is being created
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Instance is active and ready for requests. This corresponds to 'RUNNING'
+     * in datafusion.v1beta1.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Instance creation failed
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + * + * + *
+     * Instance is being deleted
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * Instance is being upgraded
+     * 
+ * + * UPGRADING = 5; + */ + UPGRADING(5), + /** + * + * + *
+     * Instance is being restarted
+     * 
+ * + * RESTARTING = 6; + */ + RESTARTING(6), + /** + * + * + *
+     * Instance is being updated on customer request
+     * 
+ * + * UPDATING = 7; + */ + UPDATING(7), + /** + * + * + *
+     * Instance is being auto-updated
+     * 
+ * + * AUTO_UPDATING = 8; + */ + AUTO_UPDATING(8), + /** + * + * + *
+     * Instance is being auto-upgraded
+     * 
+ * + * AUTO_UPGRADING = 9; + */ + AUTO_UPGRADING(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Instance does not have a state yet
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Instance is being created
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Instance is active and ready for requests. This corresponds to 'RUNNING'
+     * in datafusion.v1beta1.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Instance creation failed
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + * + * + *
+     * Instance is being deleted
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * Instance is being upgraded
+     * 
+ * + * UPGRADING = 5; + */ + public static final int UPGRADING_VALUE = 5; + /** + * + * + *
+     * Instance is being restarted
+     * 
+ * + * RESTARTING = 6; + */ + public static final int RESTARTING_VALUE = 6; + /** + * + * + *
+     * Instance is being updated on customer request
+     * 
+ * + * UPDATING = 7; + */ + public static final int UPDATING_VALUE = 7; + /** + * + * + *
+     * Instance is being auto-updated
+     * 
+ * + * AUTO_UPDATING = 8; + */ + public static final int AUTO_UPDATING_VALUE = 8; + /** + * + * + *
+     * Instance is being auto-upgraded
+     * 
+ * + * AUTO_UPGRADING = 9; + */ + public static final int AUTO_UPGRADING_VALUE = 9; + + 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 CREATING; + case 2: + return ACTIVE; + case 3: + return FAILED; + case 4: + return DELETING; + case 5: + return UPGRADING; + case 6: + return RESTARTING; + case 7: + return UPDATING; + case 8: + return AUTO_UPDATING; + case 9: + return AUTO_UPGRADING; + 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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Instance.getDescriptor().getEnumTypes().get(1); + } + + 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.cloud.datafusion.v1.Instance.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Instance.Type result = + com.google.cloud.datafusion.v1.Instance.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1.Instance.Type.UNRECOGNIZED : result; + } + + public static final int ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER = 4; + private boolean enableStackdriverLogging_; + /** + * + * + *
+   * Option to enable Stackdriver Logging.
+   * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + + public static final int ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER = 5; + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+   * Option to enable Stackdriver Monitoring.
+   * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + + public static final int PRIVATE_INSTANCE_FIELD_NUMBER = 6; + private boolean privateInstance_; + /** + * + * + *
+   * Specifies whether the Data Fusion instance should be private. If set to
+   * true, all Data Fusion nodes will have private IP addresses and will not be
+   * able to access the public internet.
+   * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + @java.lang.Override + public boolean getPrivateInstance() { + return privateInstance_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.datafusion.v1.NetworkConfig networkConfig_; + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return getNetworkConfig(); + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OPTIONS_FIELD_NUMBER = 9; + + private static final class OptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_OptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetOptions().getMap().containsKey(key); + } + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 12; + private int state_; + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.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. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Instance.State result = + com.google.cloud.datafusion.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.datafusion.v1.Instance.State.UNRECOGNIZED : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 13; + private volatile java.lang.Object stateMessage_; + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ENDPOINT_FIELD_NUMBER = 14; + private volatile java.lang.Object serviceEndpoint_; + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + @java.lang.Override + public java.lang.String getServiceEndpoint() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceEndpointBytes() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 15; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 16; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Current version of the Data Fusion. Only specifiable in Update.
+   * 
+ * + * string version = 16; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Current version of the Data Fusion. Only specifiable in Update.
+   * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 17; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 18; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABLE_VERSION_FIELD_NUMBER = 19; + private java.util.List availableVersion_; + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + @java.lang.Override + public java.util.List getAvailableVersionList() { + return availableVersion_; + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + @java.lang.Override + public java.util.List + getAvailableVersionOrBuilderList() { + return availableVersion_; + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + @java.lang.Override + public int getAvailableVersionCount() { + return availableVersion_.size(); + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Version getAvailableVersion(int index) { + return availableVersion_.get(index); + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionOrBuilder(int index) { + return availableVersion_.get(index); + } + + public static final int API_ENDPOINT_FIELD_NUMBER = 20; + private volatile java.lang.Object apiEndpoint_; + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + @java.lang.Override + public java.lang.String getApiEndpoint() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiEndpointBytes() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_BUCKET_FIELD_NUMBER = 21; + private volatile java.lang.Object gcsBucket_; + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + @java.lang.Override + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATORS_FIELD_NUMBER = 22; + private java.util.List accelerators_; + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + @java.lang.Override + public java.util.List getAcceleratorsList() { + return accelerators_; + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + @java.lang.Override + public java.util.List + getAcceleratorsOrBuilderList() { + return accelerators_; + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + @java.lang.Override + public int getAcceleratorsCount() { + return accelerators_.size(); + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Accelerator getAccelerators(int index) { + return accelerators_.get(index); + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index) { + return accelerators_.get(index); + } + + public static final int P4_SERVICE_ACCOUNT_FIELD_NUMBER = 23; + private volatile java.lang.Object p4ServiceAccount_; + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + @java.lang.Override + public java.lang.String getP4ServiceAccount() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + p4ServiceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getP4ServiceAccountBytes() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + p4ServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENANT_PROJECT_ID_FIELD_NUMBER = 24; + private volatile java.lang.Object tenantProjectId_; + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + @java.lang.Override + public java.lang.String getTenantProjectId() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantProjectId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTenantProjectIdBytes() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPROC_SERVICE_ACCOUNT_FIELD_NUMBER = 25; + private volatile java.lang.Object dataprocServiceAccount_; + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + @java.lang.Override + public java.lang.String getDataprocServiceAccount() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataprocServiceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataprocServiceAccountBytes() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataprocServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_RBAC_FIELD_NUMBER = 27; + private boolean enableRbac_; + /** + * + * + *
+   * Option to enable granular role-based access control.
+   * 
+ * + * bool enable_rbac = 27; + * + * @return The enableRbac. + */ + @java.lang.Override + public boolean getEnableRbac() { + return enableRbac_; + } + + public static final int CRYPTO_KEY_CONFIG_FIELD_NUMBER = 28; + private com.google.cloud.datafusion.v1.CryptoKeyConfig cryptoKeyConfig_; + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return Whether the cryptoKeyConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoKeyConfig() { + return cryptoKeyConfig_ != null; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return The cryptoKeyConfig. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfig getCryptoKeyConfig() { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder() { + return getCryptoKeyConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (type_ != com.google.cloud.datafusion.v1.Instance.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, type_); + } + if (enableStackdriverLogging_ != false) { + output.writeBool(4, enableStackdriverLogging_); + } + if (enableStackdriverMonitoring_ != false) { + output.writeBool(5, enableStackdriverMonitoring_); + } + if (privateInstance_ != false) { + output.writeBool(6, privateInstance_); + } + if (networkConfig_ != null) { + output.writeMessage(7, getNetworkConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, 9); + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (state_ != com.google.cloud.datafusion.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, state_); + } + if (!getStateMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, stateMessage_); + } + if (!getServiceEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, serviceEndpoint_); + } + if (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, zone_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, version_); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, serviceAccount_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, displayName_); + } + for (int i = 0; i < availableVersion_.size(); i++) { + output.writeMessage(19, availableVersion_.get(i)); + } + if (!getApiEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, apiEndpoint_); + } + if (!getGcsBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, gcsBucket_); + } + for (int i = 0; i < accelerators_.size(); i++) { + output.writeMessage(22, accelerators_.get(i)); + } + if (!getP4ServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, p4ServiceAccount_); + } + if (!getTenantProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, tenantProjectId_); + } + if (!getDataprocServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, dataprocServiceAccount_); + } + if (enableRbac_ != false) { + output.writeBool(27, enableRbac_); + } + if (cryptoKeyConfig_ != null) { + output.writeMessage(28, getCryptoKeyConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (type_ != com.google.cloud.datafusion.v1.Instance.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + if (enableStackdriverLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableStackdriverLogging_); + } + if (enableStackdriverMonitoring_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableStackdriverMonitoring_); + } + if (privateInstance_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, privateInstance_); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getNetworkConfig()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + for (java.util.Map.Entry entry : + internalGetOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry options__ = + OptionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, options__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (state_ != com.google.cloud.datafusion.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, state_); + } + if (!getStateMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, stateMessage_); + } + if (!getServiceEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, serviceEndpoint_); + } + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, zone_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, version_); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, serviceAccount_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, displayName_); + } + for (int i = 0; i < availableVersion_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(19, availableVersion_.get(i)); + } + if (!getApiEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, apiEndpoint_); + } + if (!getGcsBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, gcsBucket_); + } + for (int i = 0; i < accelerators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, accelerators_.get(i)); + } + if (!getP4ServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, p4ServiceAccount_); + } + if (!getTenantProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, tenantProjectId_); + } + if (!getDataprocServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, dataprocServiceAccount_); + } + if (enableRbac_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, enableRbac_); + } + if (cryptoKeyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getCryptoKeyConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.Instance)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.Instance other = (com.google.cloud.datafusion.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; + if (getEnableStackdriverMonitoring() != other.getEnableStackdriverMonitoring()) return false; + if (getPrivateInstance() != other.getPrivateInstance()) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetOptions().equals(other.internalGetOptions())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getStateMessage().equals(other.getStateMessage())) return false; + if (!getServiceEndpoint().equals(other.getServiceEndpoint())) return false; + if (!getZone().equals(other.getZone())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getAvailableVersionList().equals(other.getAvailableVersionList())) return false; + if (!getApiEndpoint().equals(other.getApiEndpoint())) return false; + if (!getGcsBucket().equals(other.getGcsBucket())) return false; + if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; + if (!getP4ServiceAccount().equals(other.getP4ServiceAccount())) return false; + if (!getTenantProjectId().equals(other.getTenantProjectId())) return false; + if (!getDataprocServiceAccount().equals(other.getDataprocServiceAccount())) return false; + if (getEnableRbac() != other.getEnableRbac()) return false; + if (hasCryptoKeyConfig() != other.hasCryptoKeyConfig()) return false; + if (hasCryptoKeyConfig()) { + if (!getCryptoKeyConfig().equals(other.getCryptoKeyConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); + hash = (37 * hash) + ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverMonitoring()); + hash = (37 * hash) + PRIVATE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateInstance()); + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetOptions().getMap().isEmpty()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOptions().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + SERVICE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getServiceEndpoint().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getAvailableVersionCount() > 0) { + hash = (37 * hash) + AVAILABLE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAvailableVersionList().hashCode(); + } + hash = (37 * hash) + API_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getApiEndpoint().hashCode(); + hash = (37 * hash) + GCS_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getGcsBucket().hashCode(); + if (getAcceleratorsCount() > 0) { + hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorsList().hashCode(); + } + hash = (37 * hash) + P4_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getP4ServiceAccount().hashCode(); + hash = (37 * hash) + TENANT_PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTenantProjectId().hashCode(); + hash = (37 * hash) + DATAPROC_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDataprocServiceAccount().hashCode(); + hash = (37 * hash) + ENABLE_RBAC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRbac()); + if (hasCryptoKeyConfig()) { + hash = (37 * hash) + CRYPTO_KEY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKeyConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Instance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.Instance) + com.google.cloud.datafusion.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + case 9: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableLabels(); + case 9: + return internalGetMutableOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Instance.class, + com.google.cloud.datafusion.v1.Instance.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAvailableVersionFieldBuilder(); + getAcceleratorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + type_ = 0; + + enableStackdriverLogging_ = false; + + enableStackdriverMonitoring_ = false; + + privateInstance_ = false; + + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableOptions().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = 0; + + stateMessage_ = ""; + + serviceEndpoint_ = ""; + + zone_ = ""; + + version_ = ""; + + serviceAccount_ = ""; + + displayName_ = ""; + + if (availableVersionBuilder_ == null) { + availableVersion_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + availableVersionBuilder_.clear(); + } + apiEndpoint_ = ""; + + gcsBucket_ = ""; + + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + acceleratorsBuilder_.clear(); + } + p4ServiceAccount_ = ""; + + tenantProjectId_ = ""; + + dataprocServiceAccount_ = ""; + + enableRbac_ = false; + + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = null; + } else { + cryptoKeyConfig_ = null; + cryptoKeyConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance build() { + com.google.cloud.datafusion.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance buildPartial() { + com.google.cloud.datafusion.v1.Instance result = + new com.google.cloud.datafusion.v1.Instance(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + result.type_ = type_; + result.enableStackdriverLogging_ = enableStackdriverLogging_; + result.enableStackdriverMonitoring_ = enableStackdriverMonitoring_; + result.privateInstance_ = privateInstance_; + if (networkConfigBuilder_ == null) { + result.networkConfig_ = networkConfig_; + } else { + result.networkConfig_ = networkConfigBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.options_ = internalGetOptions(); + result.options_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + result.stateMessage_ = stateMessage_; + result.serviceEndpoint_ = serviceEndpoint_; + result.zone_ = zone_; + result.version_ = version_; + result.serviceAccount_ = serviceAccount_; + result.displayName_ = displayName_; + if (availableVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + availableVersion_ = java.util.Collections.unmodifiableList(availableVersion_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.availableVersion_ = availableVersion_; + } else { + result.availableVersion_ = availableVersionBuilder_.build(); + } + result.apiEndpoint_ = apiEndpoint_; + result.gcsBucket_ = gcsBucket_; + if (acceleratorsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.accelerators_ = accelerators_; + } else { + result.accelerators_ = acceleratorsBuilder_.build(); + } + result.p4ServiceAccount_ = p4ServiceAccount_; + result.tenantProjectId_ = tenantProjectId_; + result.dataprocServiceAccount_ = dataprocServiceAccount_; + result.enableRbac_ = enableRbac_; + if (cryptoKeyConfigBuilder_ == null) { + result.cryptoKeyConfig_ = cryptoKeyConfig_; + } else { + result.cryptoKeyConfig_ = cryptoKeyConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.Instance) { + return mergeFrom((com.google.cloud.datafusion.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.Instance other) { + if (other == com.google.cloud.datafusion.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getEnableStackdriverLogging() != false) { + setEnableStackdriverLogging(other.getEnableStackdriverLogging()); + } + if (other.getEnableStackdriverMonitoring() != false) { + setEnableStackdriverMonitoring(other.getEnableStackdriverMonitoring()); + } + if (other.getPrivateInstance() != false) { + setPrivateInstance(other.getPrivateInstance()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + internalGetMutableOptions().mergeFrom(other.internalGetOptions()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + onChanged(); + } + if (!other.getServiceEndpoint().isEmpty()) { + serviceEndpoint_ = other.serviceEndpoint_; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (availableVersionBuilder_ == null) { + if (!other.availableVersion_.isEmpty()) { + if (availableVersion_.isEmpty()) { + availableVersion_ = other.availableVersion_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAvailableVersionIsMutable(); + availableVersion_.addAll(other.availableVersion_); + } + onChanged(); + } + } else { + if (!other.availableVersion_.isEmpty()) { + if (availableVersionBuilder_.isEmpty()) { + availableVersionBuilder_.dispose(); + availableVersionBuilder_ = null; + availableVersion_ = other.availableVersion_; + bitField0_ = (bitField0_ & ~0x00000004); + availableVersionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAvailableVersionFieldBuilder() + : null; + } else { + availableVersionBuilder_.addAllMessages(other.availableVersion_); + } + } + } + if (!other.getApiEndpoint().isEmpty()) { + apiEndpoint_ = other.apiEndpoint_; + onChanged(); + } + if (!other.getGcsBucket().isEmpty()) { + gcsBucket_ = other.gcsBucket_; + onChanged(); + } + if (acceleratorsBuilder_ == null) { + if (!other.accelerators_.isEmpty()) { + if (accelerators_.isEmpty()) { + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAcceleratorsIsMutable(); + accelerators_.addAll(other.accelerators_); + } + onChanged(); + } + } else { + if (!other.accelerators_.isEmpty()) { + if (acceleratorsBuilder_.isEmpty()) { + acceleratorsBuilder_.dispose(); + acceleratorsBuilder_ = null; + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000008); + acceleratorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAcceleratorsFieldBuilder() + : null; + } else { + acceleratorsBuilder_.addAllMessages(other.accelerators_); + } + } + } + if (!other.getP4ServiceAccount().isEmpty()) { + p4ServiceAccount_ = other.p4ServiceAccount_; + onChanged(); + } + if (!other.getTenantProjectId().isEmpty()) { + tenantProjectId_ = other.tenantProjectId_; + onChanged(); + } + if (!other.getDataprocServiceAccount().isEmpty()) { + dataprocServiceAccount_ = other.dataprocServiceAccount_; + onChanged(); + } + if (other.getEnableRbac() != false) { + setEnableRbac(other.getEnableRbac()); + } + if (other.hasCryptoKeyConfig()) { + mergeCryptoKeyConfig(other.getCryptoKeyConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Instance.Type result = + com.google.cloud.datafusion.v1.Instance.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1.Instance.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datafusion.v1.Instance.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean enableStackdriverLogging_; + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @param value The enableStackdriverLogging to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverLogging(boolean value) { + + enableStackdriverLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverLogging() { + + enableStackdriverLogging_ = false; + onChanged(); + return this; + } + + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @param value The enableStackdriverMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverMonitoring(boolean value) { + + enableStackdriverMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverMonitoring() { + + enableStackdriverMonitoring_ = false; + onChanged(); + return this; + } + + private boolean privateInstance_; + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + @java.lang.Override + public boolean getPrivateInstance() { + return privateInstance_; + } + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @param value The privateInstance to set. + * @return This builder for chaining. + */ + public Builder setPrivateInstance(boolean value) { + + privateInstance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @return This builder for chaining. + */ + public Builder clearPrivateInstance() { + + privateInstance_ = false; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.NetworkConfig, + com.google.cloud.datafusion.v1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1.NetworkConfigOrBuilder> + networkConfigBuilder_; + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return networkConfigBuilder_ != null || networkConfig_ != null; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + public com.google.cloud.datafusion.v1.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public Builder setNetworkConfig(com.google.cloud.datafusion.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + onChanged(); + } else { + networkConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public Builder setNetworkConfig( + com.google.cloud.datafusion.v1.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + onChanged(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public Builder mergeNetworkConfig(com.google.cloud.datafusion.v1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (networkConfig_ != null) { + networkConfig_ = + com.google.cloud.datafusion.v1.NetworkConfig.newBuilder(networkConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + networkConfig_ = value; + } + onChanged(); + } else { + networkConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public Builder clearNetworkConfig() { + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + onChanged(); + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public com.google.cloud.datafusion.v1.NetworkConfig.Builder getNetworkConfigBuilder() { + + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + public com.google.cloud.datafusion.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.NetworkConfig, + com.google.cloud.datafusion.v1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.NetworkConfig, + com.google.cloud.datafusion.v1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1.NetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + private com.google.protobuf.MapField + internalGetMutableOptions() { + onChanged(); + ; + if (options_ == null) { + options_ = com.google.protobuf.MapField.newMapField(OptionsDefaultEntryHolder.defaultEntry); + } + if (!options_.isMutable()) { + options_ = options_.copy(); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetOptions().getMap().containsKey(key); + } + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOptions() { + internalGetMutableOptions().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder removeOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableOptions().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOptions() { + return internalGetMutableOptions().getMutableMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder putOptions(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableOptions().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder putAllOptions(java.util.Map values) { + internalGetMutableOptions().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.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. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1.Instance.State result = + com.google.cloud.datafusion.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.datafusion.v1.Instance.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.datafusion.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stateMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + + stateMessage_ = getDefaultInstance().getStateMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stateMessage_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceEndpoint_ = ""; + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + public java.lang.String getServiceEndpoint() { + java.lang.Object ref = serviceEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + public com.google.protobuf.ByteString getServiceEndpointBytes() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setServiceEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceEndpoint() { + + serviceEndpoint_ = getDefaultInstance().getServiceEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setServiceEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceEndpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Current version of the Data Fusion. Only specifiable in Update.
+     * 
+ * + * string version = 16; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Current version of the Data Fusion. Only specifiable in Update.
+     * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Current version of the Data Fusion. Only specifiable in Update.
+     * 
+ * + * string version = 16; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Current version of the Data Fusion. Only specifiable in Update.
+     * 
+ * + * string version = 16; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Current version of the Data Fusion. Only specifiable in Update.
+     * 
+ * + * string version = 16; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List availableVersion_ = + java.util.Collections.emptyList(); + + private void ensureAvailableVersionIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + availableVersion_ = + new java.util.ArrayList(availableVersion_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder> + availableVersionBuilder_; + + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public java.util.List getAvailableVersionList() { + if (availableVersionBuilder_ == null) { + return java.util.Collections.unmodifiableList(availableVersion_); + } else { + return availableVersionBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public int getAvailableVersionCount() { + if (availableVersionBuilder_ == null) { + return availableVersion_.size(); + } else { + return availableVersionBuilder_.getCount(); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1.Version getAvailableVersion(int index) { + if (availableVersionBuilder_ == null) { + return availableVersion_.get(index); + } else { + return availableVersionBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder setAvailableVersion(int index, com.google.cloud.datafusion.v1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.set(index, value); + onChanged(); + } else { + availableVersionBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder setAvailableVersion( + int index, com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.set(index, builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder addAvailableVersion(com.google.cloud.datafusion.v1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.add(value); + onChanged(); + } else { + availableVersionBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder addAvailableVersion(int index, com.google.cloud.datafusion.v1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.add(index, value); + onChanged(); + } else { + availableVersionBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder addAvailableVersion( + com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.add(builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder addAvailableVersion( + int index, com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.add(index, builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder addAllAvailableVersion( + java.lang.Iterable values) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableVersion_); + onChanged(); + } else { + availableVersionBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder clearAvailableVersion() { + if (availableVersionBuilder_ == null) { + availableVersion_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + availableVersionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public Builder removeAvailableVersion(int index) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.remove(index); + onChanged(); + } else { + availableVersionBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1.Version.Builder getAvailableVersionBuilder(int index) { + return getAvailableVersionFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionOrBuilder(int index) { + if (availableVersionBuilder_ == null) { + return availableVersion_.get(index); + } else { + return availableVersionBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public java.util.List + getAvailableVersionOrBuilderList() { + if (availableVersionBuilder_ != null) { + return availableVersionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(availableVersion_); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1.Version.Builder addAvailableVersionBuilder() { + return getAvailableVersionFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1.Version.Builder addAvailableVersionBuilder(int index) { + return getAvailableVersionFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + public java.util.List + getAvailableVersionBuilderList() { + return getAvailableVersionFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder> + getAvailableVersionFieldBuilder() { + if (availableVersionBuilder_ == null) { + availableVersionBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder>( + availableVersion_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + availableVersion_ = null; + } + return availableVersionBuilder_; + } + + private java.lang.Object apiEndpoint_ = ""; + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + public java.lang.String getApiEndpoint() { + java.lang.Object ref = apiEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + public com.google.protobuf.ByteString getApiEndpointBytes() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiEndpoint to set. + * @return This builder for chaining. + */ + public Builder setApiEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiEndpoint() { + + apiEndpoint_ = getDefaultInstance().getApiEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiEndpoint to set. + * @return This builder for chaining. + */ + public Builder setApiEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiEndpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object gcsBucket_ = ""; + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsBucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcsBucket() { + + gcsBucket_ = getDefaultInstance().getGcsBucket(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsBucket_ = value; + onChanged(); + return this; + } + + private java.util.List accelerators_ = + java.util.Collections.emptyList(); + + private void ensureAcceleratorsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + accelerators_ = + new java.util.ArrayList(accelerators_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Accelerator, + com.google.cloud.datafusion.v1.Accelerator.Builder, + com.google.cloud.datafusion.v1.AcceleratorOrBuilder> + acceleratorsBuilder_; + + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public java.util.List getAcceleratorsList() { + if (acceleratorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accelerators_); + } else { + return acceleratorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public int getAcceleratorsCount() { + if (acceleratorsBuilder_ == null) { + return accelerators_.size(); + } else { + return acceleratorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1.Accelerator getAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder setAccelerators(int index, com.google.cloud.datafusion.v1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.set(index, value); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder setAccelerators( + int index, com.google.cloud.datafusion.v1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.set(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder addAccelerators(com.google.cloud.datafusion.v1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder addAccelerators(int index, com.google.cloud.datafusion.v1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(index, value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder addAccelerators( + com.google.cloud.datafusion.v1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder addAccelerators( + int index, com.google.cloud.datafusion.v1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder addAllAccelerators( + java.lang.Iterable values) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); + onChanged(); + } else { + acceleratorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder clearAccelerators() { + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + acceleratorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public Builder removeAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.remove(index); + onChanged(); + } else { + acceleratorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1.Accelerator.Builder getAcceleratorsBuilder(int index) { + return getAcceleratorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public java.util.List + getAcceleratorsOrBuilderList() { + if (acceleratorsBuilder_ != null) { + return acceleratorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accelerators_); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1.Accelerator.Builder addAcceleratorsBuilder() { + return getAcceleratorsFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1.Accelerator.Builder addAcceleratorsBuilder(int index) { + return getAcceleratorsFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + public java.util.List + getAcceleratorsBuilderList() { + return getAcceleratorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Accelerator, + com.google.cloud.datafusion.v1.Accelerator.Builder, + com.google.cloud.datafusion.v1.AcceleratorOrBuilder> + getAcceleratorsFieldBuilder() { + if (acceleratorsBuilder_ == null) { + acceleratorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Accelerator, + com.google.cloud.datafusion.v1.Accelerator.Builder, + com.google.cloud.datafusion.v1.AcceleratorOrBuilder>( + accelerators_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + accelerators_ = null; + } + return acceleratorsBuilder_; + } + + private java.lang.Object p4ServiceAccount_ = ""; + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + public java.lang.String getP4ServiceAccount() { + java.lang.Object ref = p4ServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + p4ServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + public com.google.protobuf.ByteString getP4ServiceAccountBytes() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + p4ServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p4ServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setP4ServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + p4ServiceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP4ServiceAccount() { + + p4ServiceAccount_ = getDefaultInstance().getP4ServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for p4ServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setP4ServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + p4ServiceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object tenantProjectId_ = ""; + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + public java.lang.String getTenantProjectId() { + java.lang.Object ref = tenantProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + public com.google.protobuf.ByteString getTenantProjectIdBytes() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tenantProjectId to set. + * @return This builder for chaining. + */ + public Builder setTenantProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tenantProjectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTenantProjectId() { + + tenantProjectId_ = getDefaultInstance().getTenantProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for tenantProjectId to set. + * @return This builder for chaining. + */ + public Builder setTenantProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tenantProjectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object dataprocServiceAccount_ = ""; + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + public java.lang.String getDataprocServiceAccount() { + java.lang.Object ref = dataprocServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataprocServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + public com.google.protobuf.ByteString getDataprocServiceAccountBytes() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataprocServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @param value The dataprocServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setDataprocServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataprocServiceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return This builder for chaining. + */ + public Builder clearDataprocServiceAccount() { + + dataprocServiceAccount_ = getDefaultInstance().getDataprocServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @param value The bytes for dataprocServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setDataprocServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataprocServiceAccount_ = value; + onChanged(); + return this; + } + + private boolean enableRbac_; + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 27; + * + * @return The enableRbac. + */ + @java.lang.Override + public boolean getEnableRbac() { + return enableRbac_; + } + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 27; + * + * @param value The enableRbac to set. + * @return This builder for chaining. + */ + public Builder setEnableRbac(boolean value) { + + enableRbac_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 27; + * + * @return This builder for chaining. + */ + public Builder clearEnableRbac() { + + enableRbac_ = false; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1.CryptoKeyConfig cryptoKeyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.CryptoKeyConfig, + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder> + cryptoKeyConfigBuilder_; + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return Whether the cryptoKeyConfig field is set. + */ + public boolean hasCryptoKeyConfig() { + return cryptoKeyConfigBuilder_ != null || cryptoKeyConfig_ != null; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return The cryptoKeyConfig. + */ + public com.google.cloud.datafusion.v1.CryptoKeyConfig getCryptoKeyConfig() { + if (cryptoKeyConfigBuilder_ == null) { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } else { + return cryptoKeyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public Builder setCryptoKeyConfig(com.google.cloud.datafusion.v1.CryptoKeyConfig value) { + if (cryptoKeyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cryptoKeyConfig_ = value; + onChanged(); + } else { + cryptoKeyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public Builder setCryptoKeyConfig( + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder builderForValue) { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public Builder mergeCryptoKeyConfig(com.google.cloud.datafusion.v1.CryptoKeyConfig value) { + if (cryptoKeyConfigBuilder_ == null) { + if (cryptoKeyConfig_ != null) { + cryptoKeyConfig_ = + com.google.cloud.datafusion.v1.CryptoKeyConfig.newBuilder(cryptoKeyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + cryptoKeyConfig_ = value; + } + onChanged(); + } else { + cryptoKeyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public Builder clearCryptoKeyConfig() { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = null; + onChanged(); + } else { + cryptoKeyConfig_ = null; + cryptoKeyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder getCryptoKeyConfigBuilder() { + + onChanged(); + return getCryptoKeyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + public com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder() { + if (cryptoKeyConfigBuilder_ != null) { + return cryptoKeyConfigBuilder_.getMessageOrBuilder(); + } else { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.CryptoKeyConfig, + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder> + getCryptoKeyConfigFieldBuilder() { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.CryptoKeyConfig, + com.google.cloud.datafusion.v1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder>( + getCryptoKeyConfig(), getParentForChildren(), isClean()); + cryptoKeyConfig_ = null; + } + return cryptoKeyConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.Instance) + private static final com.google.cloud.datafusion.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.Instance(); + } + + public static com.google.cloud.datafusion.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java new file mode 100644 index 00000000..e6d899f2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.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 InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + 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 (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.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 (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + 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(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java new file mode 100644 index 00000000..506c164e --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/InstanceOrBuilder.java @@ -0,0 +1,868 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.datafusion.v1.Instance.Type getType(); + + /** + * + * + *
+   * Option to enable Stackdriver Logging.
+   * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + boolean getEnableStackdriverLogging(); + + /** + * + * + *
+   * Option to enable Stackdriver Monitoring.
+   * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + boolean getEnableStackdriverMonitoring(); + + /** + * + * + *
+   * Specifies whether the Data Fusion instance should be private. If set to
+   * true, all Data Fusion nodes will have private IP addresses and will not be
+   * able to access the public internet.
+   * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + boolean getPrivateInstance(); + + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + com.google.cloud.datafusion.v1.NetworkConfig getNetworkConfig(); + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1.NetworkConfig network_config = 7; + */ + com.google.cloud.datafusion.v1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + int getLabelsCount(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + int getOptionsCount(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + boolean containsOptions(java.lang.String key); + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOptions(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.util.Map getOptionsMap(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.lang.String getOptionsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.lang.String getOptionsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.datafusion.v1.Instance.State getState(); + + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString getStateMessageBytes(); + + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + java.lang.String getServiceEndpoint(); + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + com.google.protobuf.ByteString getServiceEndpointBytes(); + + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Current version of the Data Fusion. Only specifiable in Update.
+   * 
+ * + * string version = 16; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Current version of the Data Fusion. Only specifiable in Update.
+   * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + java.util.List getAvailableVersionList(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + com.google.cloud.datafusion.v1.Version getAvailableVersion(int index); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + int getAvailableVersionCount(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + java.util.List + getAvailableVersionOrBuilderList(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_version = 19; + */ + com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionOrBuilder(int index); + + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + java.lang.String getApiEndpoint(); + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + com.google.protobuf.ByteString getApiEndpointBytes(); + + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + java.lang.String getGcsBucket(); + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + com.google.protobuf.ByteString getGcsBucketBytes(); + + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + java.util.List getAcceleratorsList(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + com.google.cloud.datafusion.v1.Accelerator getAccelerators(int index); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + int getAcceleratorsCount(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + java.util.List + getAcceleratorsOrBuilderList(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Accelerator accelerators = 22; + */ + com.google.cloud.datafusion.v1.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index); + + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + java.lang.String getP4ServiceAccount(); + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + com.google.protobuf.ByteString getP4ServiceAccountBytes(); + + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + java.lang.String getTenantProjectId(); + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + com.google.protobuf.ByteString getTenantProjectIdBytes(); + + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + java.lang.String getDataprocServiceAccount(); + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + com.google.protobuf.ByteString getDataprocServiceAccountBytes(); + + /** + * + * + *
+   * Option to enable granular role-based access control.
+   * 
+ * + * bool enable_rbac = 27; + * + * @return The enableRbac. + */ + boolean getEnableRbac(); + + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return Whether the cryptoKeyConfig field is set. + */ + boolean hasCryptoKeyConfig(); + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + * + * @return The cryptoKeyConfig. + */ + com.google.cloud.datafusion.v1.CryptoKeyConfig getCryptoKeyConfig(); + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1.CryptoKeyConfig crypto_key_config = 28; + */ + com.google.cloud.datafusion.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java new file mode 100644 index 00000000..ba5e4897 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequest.java @@ -0,0 +1,1018 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Request message for the list available versions request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListAvailableVersionsRequest} + */ +public final class ListAvailableVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.ListAvailableVersionsRequest) + ListAvailableVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAvailableVersionsRequest.newBuilder() to construct. + private ListAvailableVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAvailableVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAvailableVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAvailableVersionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + latestPatchOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.class, + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LATEST_PATCH_ONLY_FIELD_NUMBER = 4; + private boolean latestPatchOnly_; + /** + * + * + *
+   * Whether or not to return the latest patch of every available minor version.
+   * If true, only the latest patch will be returned. Ex. if allowed versions is
+   * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+   * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + @java.lang.Override + public boolean getLatestPatchOnly() { + return latestPatchOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (latestPatchOnly_ != false) { + output.writeBool(4, latestPatchOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (latestPatchOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, latestPatchOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.ListAvailableVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest other = + (com.google.cloud.datafusion.v1.ListAvailableVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getLatestPatchOnly() != other.getLatestPatchOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + LATEST_PATCH_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLatestPatchOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for the list available versions request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListAvailableVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.ListAvailableVersionsRequest) + com.google.cloud.datafusion.v1.ListAvailableVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.class, + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + latestPatchOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsRequest build() { + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsRequest buildPartial() { + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest result = + new com.google.cloud.datafusion.v1.ListAvailableVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.latestPatchOnly_ = latestPatchOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.ListAvailableVersionsRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.ListAvailableVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.ListAvailableVersionsRequest other) { + if (other == com.google.cloud.datafusion.v1.ListAvailableVersionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getLatestPatchOnly() != false) { + setLatestPatchOnly(other.getLatestPatchOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.ListAvailableVersionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.ListAvailableVersionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private boolean latestPatchOnly_; + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + @java.lang.Override + public boolean getLatestPatchOnly() { + return latestPatchOnly_; + } + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @param value The latestPatchOnly to set. + * @return This builder for chaining. + */ + public Builder setLatestPatchOnly(boolean value) { + + latestPatchOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearLatestPatchOnly() { + + latestPatchOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.ListAvailableVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.ListAvailableVersionsRequest) + private static final com.google.cloud.datafusion.v1.ListAvailableVersionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.ListAvailableVersionsRequest(); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAvailableVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAvailableVersionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java new file mode 100644 index 00000000..d312385c --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface ListAvailableVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.ListAvailableVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether or not to return the latest patch of every available minor version.
+   * If true, only the latest patch will be returned. Ex. if allowed versions is
+   * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+   * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + boolean getLatestPatchOnly(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponse.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponse.java new file mode 100644 index 00000000..fdb7e4c1 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponse.java @@ -0,0 +1,1147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Response message for the list available versions request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListAvailableVersionsResponse} + */ +public final class ListAvailableVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.ListAvailableVersionsResponse) + ListAvailableVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAvailableVersionsResponse.newBuilder() to construct. + private ListAvailableVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAvailableVersionsResponse() { + availableVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAvailableVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAvailableVersionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + availableVersions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + availableVersions_.add( + input.readMessage( + com.google.cloud.datafusion.v1.Version.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + availableVersions_ = java.util.Collections.unmodifiableList(availableVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.class, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.Builder.class); + } + + public static final int AVAILABLE_VERSIONS_FIELD_NUMBER = 1; + private java.util.List availableVersions_; + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + @java.lang.Override + public java.util.List getAvailableVersionsList() { + return availableVersions_; + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + @java.lang.Override + public java.util.List + getAvailableVersionsOrBuilderList() { + return availableVersions_; + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + @java.lang.Override + public int getAvailableVersionsCount() { + return availableVersions_.size(); + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Version getAvailableVersions(int index) { + return availableVersions_.get(index); + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionsOrBuilder(int index) { + return availableVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < availableVersions_.size(); i++) { + output.writeMessage(1, availableVersions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < availableVersions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, availableVersions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.ListAvailableVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse other = + (com.google.cloud.datafusion.v1.ListAvailableVersionsResponse) obj; + + if (!getAvailableVersionsList().equals(other.getAvailableVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvailableVersionsCount() > 0) { + hash = (37 * hash) + AVAILABLE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for the list available versions request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListAvailableVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.ListAvailableVersionsResponse) + com.google.cloud.datafusion.v1.ListAvailableVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.class, + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAvailableVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (availableVersionsBuilder_ == null) { + availableVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + availableVersionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsResponse build() { + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsResponse buildPartial() { + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse result = + new com.google.cloud.datafusion.v1.ListAvailableVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (availableVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + availableVersions_ = java.util.Collections.unmodifiableList(availableVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.availableVersions_ = availableVersions_; + } else { + result.availableVersions_ = availableVersionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.ListAvailableVersionsResponse) { + return mergeFrom((com.google.cloud.datafusion.v1.ListAvailableVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.ListAvailableVersionsResponse other) { + if (other + == com.google.cloud.datafusion.v1.ListAvailableVersionsResponse.getDefaultInstance()) + return this; + if (availableVersionsBuilder_ == null) { + if (!other.availableVersions_.isEmpty()) { + if (availableVersions_.isEmpty()) { + availableVersions_ = other.availableVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAvailableVersionsIsMutable(); + availableVersions_.addAll(other.availableVersions_); + } + onChanged(); + } + } else { + if (!other.availableVersions_.isEmpty()) { + if (availableVersionsBuilder_.isEmpty()) { + availableVersionsBuilder_.dispose(); + availableVersionsBuilder_ = null; + availableVersions_ = other.availableVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + availableVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAvailableVersionsFieldBuilder() + : null; + } else { + availableVersionsBuilder_.addAllMessages(other.availableVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.ListAvailableVersionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.ListAvailableVersionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List availableVersions_ = + java.util.Collections.emptyList(); + + private void ensureAvailableVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + availableVersions_ = + new java.util.ArrayList(availableVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder> + availableVersionsBuilder_; + + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public java.util.List getAvailableVersionsList() { + if (availableVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(availableVersions_); + } else { + return availableVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public int getAvailableVersionsCount() { + if (availableVersionsBuilder_ == null) { + return availableVersions_.size(); + } else { + return availableVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1.Version getAvailableVersions(int index) { + if (availableVersionsBuilder_ == null) { + return availableVersions_.get(index); + } else { + return availableVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder setAvailableVersions(int index, com.google.cloud.datafusion.v1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.set(index, value); + onChanged(); + } else { + availableVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder setAvailableVersions( + int index, com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder addAvailableVersions(com.google.cloud.datafusion.v1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.add(value); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder addAvailableVersions(int index, com.google.cloud.datafusion.v1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.add(index, value); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder addAvailableVersions( + com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.add(builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder addAvailableVersions( + int index, com.google.cloud.datafusion.v1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder addAllAvailableVersions( + java.lang.Iterable values) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableVersions_); + onChanged(); + } else { + availableVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder clearAvailableVersions() { + if (availableVersionsBuilder_ == null) { + availableVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + availableVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public Builder removeAvailableVersions(int index) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.remove(index); + onChanged(); + } else { + availableVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1.Version.Builder getAvailableVersionsBuilder(int index) { + return getAvailableVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionsOrBuilder( + int index) { + if (availableVersionsBuilder_ == null) { + return availableVersions_.get(index); + } else { + return availableVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public java.util.List + getAvailableVersionsOrBuilderList() { + if (availableVersionsBuilder_ != null) { + return availableVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(availableVersions_); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1.Version.Builder addAvailableVersionsBuilder() { + return getAvailableVersionsFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1.Version.Builder addAvailableVersionsBuilder(int index) { + return getAvailableVersionsFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + public java.util.List + getAvailableVersionsBuilderList() { + return getAvailableVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder> + getAvailableVersionsFieldBuilder() { + if (availableVersionsBuilder_ == null) { + availableVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Version, + com.google.cloud.datafusion.v1.Version.Builder, + com.google.cloud.datafusion.v1.VersionOrBuilder>( + availableVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + availableVersions_ = null; + } + return availableVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.ListAvailableVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.ListAvailableVersionsResponse) + private static final com.google.cloud.datafusion.v1.ListAvailableVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.ListAvailableVersionsResponse(); + } + + public static com.google.cloud.datafusion.v1.ListAvailableVersionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAvailableVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAvailableVersionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListAvailableVersionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponseOrBuilder.java new file mode 100644 index 00000000..31f7ee55 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListAvailableVersionsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface ListAvailableVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.ListAvailableVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + java.util.List getAvailableVersionsList(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + com.google.cloud.datafusion.v1.Version getAvailableVersions(int index); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + int getAvailableVersionsCount(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + java.util.List + getAvailableVersionsOrBuilderList(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Version available_versions = 1; + */ + com.google.cloud.datafusion.v1.VersionOrBuilder getAvailableVersionsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java new file mode 100644 index 00000000..a994be64 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequest.java @@ -0,0 +1,1291 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Request message for listing Data Fusion instances.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListInstancesRequest.class, + com.google.cloud.datafusion.v1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.ListInstancesRequest other = + (com.google.cloud.datafusion.v1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.ListInstancesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for listing Data Fusion instances.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.ListInstancesRequest) + com.google.cloud.datafusion.v1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListInstancesRequest.class, + com.google.cloud.datafusion.v1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.ListInstancesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesRequest build() { + com.google.cloud.datafusion.v1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesRequest buildPartial() { + com.google.cloud.datafusion.v1.ListInstancesRequest result = + new com.google.cloud.datafusion.v1.ListInstancesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.ListInstancesRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.ListInstancesRequest other) { + if (other == com.google.cloud.datafusion.v1.ListInstancesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.ListInstancesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.ListInstancesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.ListInstancesRequest) + private static final com.google.cloud.datafusion.v1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.ListInstancesRequest(); + } + + public static com.google.cloud.datafusion.v1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java new file mode 100644 index 00000000..ef280121 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponse.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponse.java new file mode 100644 index 00000000..cb5801a8 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponse.java @@ -0,0 +1,1411 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Response message for the list instance request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage( + com.google.cloud.datafusion.v1.Instance.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListInstancesResponse.class, + com.google.cloud.datafusion.v1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + private java.util.List instances_; + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.ListInstancesResponse other = + (com.google.cloud.datafusion.v1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.ListInstancesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for the list instance request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.ListInstancesResponse) + com.google.cloud.datafusion.v1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.ListInstancesResponse.class, + com.google.cloud.datafusion.v1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.ListInstancesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instancesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesResponse build() { + com.google.cloud.datafusion.v1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesResponse buildPartial() { + com.google.cloud.datafusion.v1.ListInstancesResponse result = + new com.google.cloud.datafusion.v1.ListInstancesResponse(this); + int from_bitField0_ = bitField0_; + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.ListInstancesResponse) { + return mergeFrom((com.google.cloud.datafusion.v1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.ListInstancesResponse other) { + if (other == com.google.cloud.datafusion.v1.ListInstancesResponse.getDefaultInstance()) + return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.ListInstancesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.ListInstancesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.datafusion.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.datafusion.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.datafusion.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.ListInstancesResponse) + private static final com.google.cloud.datafusion.v1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.ListInstancesResponse(); + } + + public static com.google.cloud.datafusion.v1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponseOrBuilder.java new file mode 100644 index 00000000..bf16d9c9 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + com.google.cloud.datafusion.v1.Instance getInstances(int index); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + int getInstancesCount(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + java.util.List + getInstancesOrBuilderList(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1.Instance instances = 1; + */ + com.google.cloud.datafusion.v1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfig.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfig.java new file mode 100644 index 00000000..7befa496 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfig.java @@ -0,0 +1,858 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Network configuration for a Data Fusion instance. These configurations
+ * are used for peering with the customer network. Configurations are optional
+ * when a public Data Fusion instance is to be created. However, providing
+ * these configurations allows several benefits, such as reduced network latency
+ * while accessing the customer resources from managed Data Fusion instance
+ * nodes, as well as access to the customer on-prem resources.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.NetworkConfig} + */ +public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.NetworkConfig) + NetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkConfig() { + network_ = ""; + ipAllocation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAllocation_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.NetworkConfig.class, + com.google.cloud.datafusion.v1.NetworkConfig.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ALLOCATION_FIELD_NUMBER = 2; + private volatile java.lang.Object ipAllocation_; + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the
+   * customer network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + @java.lang.Override + public java.lang.String getIpAllocation() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAllocation_ = s; + return s; + } + } + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the
+   * customer network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAllocationBytes() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAllocation_ = 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 (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (!getIpAllocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAllocation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (!getIpAllocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAllocation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.NetworkConfig other = + (com.google.cloud.datafusion.v1.NetworkConfig) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getIpAllocation().equals(other.getIpAllocation())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + IP_ALLOCATION_FIELD_NUMBER; + hash = (53 * hash) + getIpAllocation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network configuration for a Data Fusion instance. These configurations
+   * are used for peering with the customer network. Configurations are optional
+   * when a public Data Fusion instance is to be created. However, providing
+   * these configurations allows several benefits, such as reduced network latency
+   * while accessing the customer resources from managed Data Fusion instance
+   * nodes, as well as access to the customer on-prem resources.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.NetworkConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.NetworkConfig) + com.google.cloud.datafusion.v1.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.NetworkConfig.class, + com.google.cloud.datafusion.v1.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.NetworkConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + network_ = ""; + + ipAllocation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfig build() { + com.google.cloud.datafusion.v1.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfig buildPartial() { + com.google.cloud.datafusion.v1.NetworkConfig result = + new com.google.cloud.datafusion.v1.NetworkConfig(this); + result.network_ = network_; + result.ipAllocation_ = ipAllocation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.NetworkConfig) { + return mergeFrom((com.google.cloud.datafusion.v1.NetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.NetworkConfig other) { + if (other == com.google.cloud.datafusion.v1.NetworkConfig.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getIpAllocation().isEmpty()) { + ipAllocation_ = other.ipAllocation_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.NetworkConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.NetworkConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object ipAllocation_ = ""; + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the
+     * customer network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + public java.lang.String getIpAllocation() { + java.lang.Object ref = ipAllocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAllocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the
+     * customer network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + public com.google.protobuf.ByteString getIpAllocationBytes() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAllocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the
+     * customer network.
+     * 
+ * + * string ip_allocation = 2; + * + * @param value The ipAllocation to set. + * @return This builder for chaining. + */ + public Builder setIpAllocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the
+     * customer network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return This builder for chaining. + */ + public Builder clearIpAllocation() { + + ipAllocation_ = getDefaultInstance().getIpAllocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the
+     * customer network.
+     * 
+ * + * string ip_allocation = 2; + * + * @param value The bytes for ipAllocation to set. + * @return This builder for chaining. + */ + public Builder setIpAllocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAllocation_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.NetworkConfig) + private static final com.google.cloud.datafusion.v1.NetworkConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.NetworkConfig(); + } + + public static com.google.cloud.datafusion.v1.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfigOrBuilder.java new file mode 100644 index 00000000..c820cf58 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/NetworkConfigOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface NetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the
+   * customer network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + java.lang.String getIpAllocation(); + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the
+   * customer network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + com.google.protobuf.ByteString getIpAllocationBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java new file mode 100644 index 00000000..4d1471bb --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadata.java @@ -0,0 +1,2189 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusDetail_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + additionalStatus_ = + com.google.protobuf.MapField.newMapField( + AdditionalStatusDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry additionalStatus__ = + input.readMessage( + AdditionalStatusDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + additionalStatus_ + .getMutableMap() + .put(additionalStatus__.getKey(), additionalStatus__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetAdditionalStatus(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.OperationMetadata.class, + com.google.cloud.datafusion.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object statusDetail_; + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_STATUS_FIELD_NUMBER = 8; + + private static final class AdditionalStatusDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_AdditionalStatusEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField additionalStatus_; + + private com.google.protobuf.MapField + internalGetAdditionalStatus() { + if (additionalStatus_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalStatusDefaultEntryHolder.defaultEntry); + } + return additionalStatus_; + } + + public int getAdditionalStatusCount() { + return internalGetAdditionalStatus().getMap().size(); + } + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public boolean containsAdditionalStatus(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAdditionalStatus().getMap().containsKey(key); + } + /** Use {@link #getAdditionalStatusMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalStatus() { + return getAdditionalStatusMap(); + } + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.util.Map getAdditionalStatusMap() { + return internalGetAdditionalStatus().getMap(); + } + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.lang.String getAdditionalStatusOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAdditionalStatus().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.lang.String getAdditionalStatusOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAdditionalStatus().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 (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAdditionalStatus(), AdditionalStatusDefaultEntryHolder.defaultEntry, 8); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + for (java.util.Map.Entry entry : + internalGetAdditionalStatus().getMap().entrySet()) { + com.google.protobuf.MapEntry additionalStatus__ = + AdditionalStatusDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, additionalStatus__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.OperationMetadata other = + (com.google.cloud.datafusion.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusDetail().equals(other.getStatusDetail())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!internalGetAdditionalStatus().equals(other.internalGetAdditionalStatus())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + if (!internalGetAdditionalStatus().getMap().isEmpty()) { + hash = (37 * hash) + ADDITIONAL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAdditionalStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.OperationMetadata) + com.google.cloud.datafusion.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetAdditionalStatus(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableAdditionalStatus(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.OperationMetadata.class, + com.google.cloud.datafusion.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusDetail_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + internalGetMutableAdditionalStatus().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.OperationMetadata build() { + com.google.cloud.datafusion.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.OperationMetadata buildPartial() { + com.google.cloud.datafusion.v1.OperationMetadata result = + new com.google.cloud.datafusion.v1.OperationMetadata(this); + int from_bitField0_ = bitField0_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusDetail_ = statusDetail_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + result.additionalStatus_ = internalGetAdditionalStatus(); + result.additionalStatus_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.datafusion.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.OperationMetadata other) { + if (other == com.google.cloud.datafusion.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + internalGetMutableAdditionalStatus().mergeFrom(other.internalGetAdditionalStatus()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField additionalStatus_; + + private com.google.protobuf.MapField + internalGetAdditionalStatus() { + if (additionalStatus_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalStatusDefaultEntryHolder.defaultEntry); + } + return additionalStatus_; + } + + private com.google.protobuf.MapField + internalGetMutableAdditionalStatus() { + onChanged(); + ; + if (additionalStatus_ == null) { + additionalStatus_ = + com.google.protobuf.MapField.newMapField( + AdditionalStatusDefaultEntryHolder.defaultEntry); + } + if (!additionalStatus_.isMutable()) { + additionalStatus_ = additionalStatus_.copy(); + } + return additionalStatus_; + } + + public int getAdditionalStatusCount() { + return internalGetAdditionalStatus().getMap().size(); + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public boolean containsAdditionalStatus(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAdditionalStatus().getMap().containsKey(key); + } + /** Use {@link #getAdditionalStatusMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalStatus() { + return getAdditionalStatusMap(); + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.util.Map getAdditionalStatusMap() { + return internalGetAdditionalStatus().getMap(); + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.lang.String getAdditionalStatusOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAdditionalStatus().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + @java.lang.Override + public java.lang.String getAdditionalStatusOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAdditionalStatus().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAdditionalStatus() { + internalGetMutableAdditionalStatus().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + public Builder removeAdditionalStatus(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAdditionalStatus().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAdditionalStatus() { + return internalGetMutableAdditionalStatus().getMutableMap(); + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + public Builder putAdditionalStatus(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAdditionalStatus().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Map to hold any additional status info for the operation
+     * If there is an accelerator being enabled/disabled/deleted, this will be
+     * populated with accelerator name as key and status as
+     * ENABLING, DISABLING or DELETING
+     * 
+ * + * map<string, string> additional_status = 8; + */ + public Builder putAllAdditionalStatus( + java.util.Map values) { + internalGetMutableAdditionalStatus().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.OperationMetadata) + private static final com.google.cloud.datafusion.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.OperationMetadata(); + } + + public static com.google.cloud.datafusion.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..1a418876 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,282 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString getStatusDetailBytes(); + + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); + + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + int getAdditionalStatusCount(); + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + boolean containsAdditionalStatus(java.lang.String key); + /** Use {@link #getAdditionalStatusMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAdditionalStatus(); + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + java.util.Map getAdditionalStatusMap(); + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + java.lang.String getAdditionalStatusOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Map to hold any additional status info for the operation
+   * If there is an accelerator being enabled/disabled/deleted, this will be
+   * populated with accelerator name as key and status as
+   * ENABLING, DISABLING or DELETING
+   * 
+ * + * map<string, string> additional_status = 8; + */ + java.lang.String getAdditionalStatusOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java new file mode 100644 index 00000000..89481482 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * Request message for restarting a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.RestartInstanceRequest} + */ +public final class RestartInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.RestartInstanceRequest) + RestartInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestartInstanceRequest.newBuilder() to construct. + private RestartInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestartInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestartInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RestartInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.RestartInstanceRequest.class, + com.google.cloud.datafusion.v1.RestartInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.RestartInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.RestartInstanceRequest other = + (com.google.cloud.datafusion.v1.RestartInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1.RestartInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for restarting a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.RestartInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.RestartInstanceRequest) + com.google.cloud.datafusion.v1.RestartInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.RestartInstanceRequest.class, + com.google.cloud.datafusion.v1.RestartInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.RestartInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.RestartInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.RestartInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.RestartInstanceRequest build() { + com.google.cloud.datafusion.v1.RestartInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.RestartInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1.RestartInstanceRequest result = + new com.google.cloud.datafusion.v1.RestartInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.RestartInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.RestartInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.RestartInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1.RestartInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.RestartInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.RestartInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.RestartInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.RestartInstanceRequest) + private static final com.google.cloud.datafusion.v1.RestartInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.RestartInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1.RestartInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestartInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RestartInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.RestartInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java new file mode 100644 index 00000000..c1d95c82 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/RestartInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface RestartInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.RestartInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java new file mode 100644 index 00000000..48796de2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequest.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} */ +public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.UpdateInstanceRequest) + UpdateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstanceRequest.newBuilder() to construct. + private UpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstanceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datafusion.v1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.datafusion.v1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.UpdateInstanceRequest.class, + com.google.cloud.datafusion.v1.UpdateInstanceRequest.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private com.google.cloud.datafusion.v1.Instance instance_; + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstance()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.UpdateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.UpdateInstanceRequest other = + (com.google.cloud.datafusion.v1.UpdateInstanceRequest) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.UpdateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.datafusion.v1.UpdateInstanceRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.UpdateInstanceRequest) + com.google.cloud.datafusion.v1.UpdateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.UpdateInstanceRequest.class, + com.google.cloud.datafusion.v1.UpdateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.UpdateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.UpdateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.UpdateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.UpdateInstanceRequest build() { + com.google.cloud.datafusion.v1.UpdateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.UpdateInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1.UpdateInstanceRequest result = + new com.google.cloud.datafusion.v1.UpdateInstanceRequest(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.UpdateInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1.UpdateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.UpdateInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1.UpdateInstanceRequest.getDefaultInstance()) + return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.UpdateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1.UpdateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datafusion.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return The instance. + */ + public com.google.cloud.datafusion.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public Builder setInstance(com.google.cloud.datafusion.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public Builder setInstance(com.google.cloud.datafusion.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public Builder mergeInstance(com.google.cloud.datafusion.v1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.datafusion.v1.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public com.google.cloud.datafusion.v1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + public com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.datafusion.v1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1.Instance, + com.google.cloud.datafusion.v1.Instance.Builder, + com.google.cloud.datafusion.v1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels,
+     * options, and version currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.UpdateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.UpdateInstanceRequest) + private static final com.google.cloud.datafusion.v1.UpdateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.UpdateInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1.UpdateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.UpdateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java new file mode 100644 index 00000000..7b7c31d6 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/UpdateInstanceRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface UpdateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.UpdateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + * + * @return The instance. + */ + com.google.cloud.datafusion.v1.Instance getInstance(); + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1.Instance instance = 1; + */ + com.google.cloud.datafusion.v1.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels,
+   * options, and version currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java new file mode 100644 index 00000000..36cee9fb --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/Version.java @@ -0,0 +1,1005 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +/** + * + * + *
+ * The Data Fusion version. This proto message stores information about certain
+ * Data Fusion version, which is used for Data Fusion version upgrade.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Version} + */ +public final class Version extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1.Version) + VersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Version() { + versionNumber_ = ""; + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Version(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Version( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + versionNumber_ = s; + break; + } + case 16: + { + defaultVersion_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + availableFeatures_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = availableFeatures_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Version.class, + com.google.cloud.datafusion.v1.Version.Builder.class); + } + + public static final int VERSION_NUMBER_FIELD_NUMBER = 1; + private volatile java.lang.Object versionNumber_; + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + @java.lang.Override + public java.lang.String getVersionNumber() { + java.lang.Object ref = versionNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionNumber_ = s; + return s; + } + } + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionNumberBytes() { + java.lang.Object ref = versionNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VERSION_FIELD_NUMBER = 2; + private boolean defaultVersion_; + /** + * + * + *
+   * Whether this is currently the default version for Cloud Data Fusion
+   * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + @java.lang.Override + public boolean getDefaultVersion() { + return defaultVersion_; + } + + public static final int AVAILABLE_FEATURES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList availableFeatures_; + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + public com.google.protobuf.ProtocolStringList getAvailableFeaturesList() { + return availableFeatures_; + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + public int getAvailableFeaturesCount() { + return availableFeatures_.size(); + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + public java.lang.String getAvailableFeatures(int index) { + return availableFeatures_.get(index); + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { + return availableFeatures_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionNumberBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, versionNumber_); + } + if (defaultVersion_ != false) { + output.writeBool(2, defaultVersion_); + } + for (int i = 0; i < availableFeatures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, availableFeatures_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionNumberBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, versionNumber_); + } + if (defaultVersion_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, defaultVersion_); + } + { + int dataSize = 0; + for (int i = 0; i < availableFeatures_.size(); i++) { + dataSize += computeStringSizeNoTag(availableFeatures_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvailableFeaturesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1.Version)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1.Version other = (com.google.cloud.datafusion.v1.Version) obj; + + if (!getVersionNumber().equals(other.getVersionNumber())) return false; + if (getDefaultVersion() != other.getDefaultVersion()) return false; + if (!getAvailableFeaturesList().equals(other.getAvailableFeaturesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VERSION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getVersionNumber().hashCode(); + hash = (37 * hash) + DEFAULT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDefaultVersion()); + if (getAvailableFeaturesCount() > 0) { + hash = (37 * hash) + AVAILABLE_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getAvailableFeaturesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1.Version parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Version parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1.Version parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1.Version prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Data Fusion version. This proto message stores information about certain
+   * Data Fusion version, which is used for Data Fusion version upgrade.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1.Version} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1.Version) + com.google.cloud.datafusion.v1.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1.Version.class, + com.google.cloud.datafusion.v1.Version.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1.Version.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + versionNumber_ = ""; + + defaultVersion_ = false; + + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1.Datafusion + .internal_static_google_cloud_datafusion_v1_Version_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Version getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1.Version.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Version build() { + com.google.cloud.datafusion.v1.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Version buildPartial() { + com.google.cloud.datafusion.v1.Version result = + new com.google.cloud.datafusion.v1.Version(this); + int from_bitField0_ = bitField0_; + result.versionNumber_ = versionNumber_; + result.defaultVersion_ = defaultVersion_; + if (((bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = availableFeatures_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.availableFeatures_ = availableFeatures_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1.Version) { + return mergeFrom((com.google.cloud.datafusion.v1.Version) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1.Version other) { + if (other == com.google.cloud.datafusion.v1.Version.getDefaultInstance()) return this; + if (!other.getVersionNumber().isEmpty()) { + versionNumber_ = other.versionNumber_; + onChanged(); + } + if (other.getDefaultVersion() != false) { + setDefaultVersion(other.getDefaultVersion()); + } + if (!other.availableFeatures_.isEmpty()) { + if (availableFeatures_.isEmpty()) { + availableFeatures_ = other.availableFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAvailableFeaturesIsMutable(); + availableFeatures_.addAll(other.availableFeatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1.Version parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1.Version) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object versionNumber_ = ""; + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + public java.lang.String getVersionNumber() { + java.lang.Object ref = versionNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + public com.google.protobuf.ByteString getVersionNumberBytes() { + java.lang.Object ref = versionNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @param value The versionNumber to set. + * @return This builder for chaining. + */ + public Builder setVersionNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersionNumber() { + + versionNumber_ = getDefaultInstance().getVersionNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @param value The bytes for versionNumber to set. + * @return This builder for chaining. + */ + public Builder setVersionNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionNumber_ = value; + onChanged(); + return this; + } + + private boolean defaultVersion_; + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + @java.lang.Override + public boolean getDefaultVersion() { + return defaultVersion_; + } + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @param value The defaultVersion to set. + * @return This builder for chaining. + */ + public Builder setDefaultVersion(boolean value) { + + defaultVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearDefaultVersion() { + + defaultVersion_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList availableFeatures_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAvailableFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = new com.google.protobuf.LazyStringArrayList(availableFeatures_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + public com.google.protobuf.ProtocolStringList getAvailableFeaturesList() { + return availableFeatures_.getUnmodifiableView(); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + public int getAvailableFeaturesCount() { + return availableFeatures_.size(); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + public java.lang.String getAvailableFeatures(int index) { + return availableFeatures_.get(index); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { + return availableFeatures_.getByteString(index); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index to set the value at. + * @param value The availableFeatures to set. + * @return This builder for chaining. + */ + public Builder setAvailableFeatures(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableFeaturesIsMutable(); + availableFeatures_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param value The availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAvailableFeatures(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableFeaturesIsMutable(); + availableFeatures_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param values The availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAllAvailableFeatures(java.lang.Iterable values) { + ensureAvailableFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableFeatures_); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return This builder for chaining. + */ + public Builder clearAvailableFeatures() { + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param value The bytes of the availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAvailableFeaturesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAvailableFeaturesIsMutable(); + availableFeatures_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1.Version) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1.Version) + private static final com.google.cloud.datafusion.v1.Version DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1.Version(); + } + + public static com.google.cloud.datafusion.v1.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Version(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java new file mode 100644 index 00000000..7f26416b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/java/com/google/cloud/datafusion/v1/VersionOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1/datafusion.proto + +package com.google.cloud.datafusion.v1; + +public interface VersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1.Version) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + java.lang.String getVersionNumber(); + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + com.google.protobuf.ByteString getVersionNumberBytes(); + + /** + * + * + *
+   * Whether this is currently the default version for Cloud Data Fusion
+   * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + boolean getDefaultVersion(); + + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + java.util.List getAvailableFeaturesList(); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + int getAvailableFeaturesCount(); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + java.lang.String getAvailableFeatures(int index); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + com.google.protobuf.ByteString getAvailableFeaturesBytes(int index); +} diff --git a/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto b/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto new file mode 100644 index 00000000..aae22833 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1/src/main/proto/google/cloud/datafusion/v1/datafusion.proto @@ -0,0 +1,519 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datafusion.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DataFusion.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datafusion/v1;datafusion"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datafusion.v1"; +option php_namespace = "Google\\Cloud\\DataFusion\\V1"; +option ruby_package = "Google::Cloud::DataFusion::V1"; + +// Service for creating and managing Data Fusion instances. +// Data Fusion enables ETL developers to build code-free, data integration +// pipelines via a point-and-click UI. +service DataFusion { + option (google.api.default_host) = "datafusion.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists possible versions for Data Fusion instances in the specified project + // and location. + rpc ListAvailableVersions(ListAvailableVersionsRequest) + returns (ListAvailableVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists Data Fusion instances in the specified project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + } + + // Gets details of a single Data Fusion instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + } + + // Creates a new Data Fusion instance in the specified project and location. + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Date Fusion instance. + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates a single Data Fusion instance. + rpc UpdateInstance(UpdateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" + body: "instance" + }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Restart a single Data Fusion instance. + // At the end of an operation instance is fully restarted. + rpc RestartInstance(RestartInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:restart" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } +} + +// Network configuration for a Data Fusion instance. These configurations +// are used for peering with the customer network. Configurations are optional +// when a public Data Fusion instance is to be created. However, providing +// these configurations allows several benefits, such as reduced network latency +// while accessing the customer resources from managed Data Fusion instance +// nodes, as well as access to the customer on-prem resources. +message NetworkConfig { + // Name of the network in the customer project with which the Tenant Project + // will be peered for executing pipelines. In case of shared VPC where the + // network resides in another host project the network should specified in + // the form of projects/{host-project-id}/global/networks/{network} + string network = 1; + + // The IP range in CIDR notation to use for the managed Data Fusion instance + // nodes. This range must not overlap with any other ranges used in the + // customer network. + string ip_allocation = 2; +} + +// The Data Fusion version. This proto message stores information about certain +// Data Fusion version, which is used for Data Fusion version upgrade. +message Version { + // The version number of the Data Fusion instance, such as '6.0.1.0'. + string version_number = 1; + + // Whether this is currently the default version for Cloud Data Fusion + bool default_version = 2; + + // Represents a list of available feature names for a given version. + repeated string available_features = 3; +} + +// Identifies Data Fusion accelerators for an instance. +message Accelerator { + // Each type represents an Accelerator (Add-On) supported by Cloud Data Fusion + // service. + enum AcceleratorType { + // Default value, if unspecified. + ACCELERATOR_TYPE_UNSPECIFIED = 0; + + // Change Data Capture accelerator for CDF. + CDC = 1; + + // Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud + // Healthcare specific CDF plugins developed by Healthcare team. + HEALTHCARE = 2; + + // Contact Center AI Insights + // This accelerator is used to enable import and export pipelines + // custom built to streamline CCAI Insights processing. + CCAI_INSIGHTS = 3; + } + + // Different values possible for the state of an accelerator + enum State { + // Default value, do not use + STATE_UNSPECIFIED = 0; + + // Indicates that the accelerator is enabled and available to use + ENABLED = 1; + + // Indicates that the accelerator is disabled and not available to use + DISABLED = 2; + + // Indicates that accelerator state is currently unknown. + // Requests for enable, disable could be retried while in this state + UNKNOWN = 3; + } + + // The type of an accelator for a CDF instance. + AcceleratorType accelerator_type = 1; + + // The state of the accelerator + State state = 2; +} + +// The crypto key configuration. This field is used by the Customer-managed +// encryption keys (CMEK) feature. +message CryptoKeyConfig { + // The name of the key which is used to encrypt/decrypt customer data. For key + // in Cloud KMS, the key should be in the format of + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + string key_reference = 1; +} + +// Represents a Data Fusion instance. +message Instance { + option (google.api.resource) = { + type: "datafusion.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // Represents the type of Data Fusion instance. Each type is configured with + // the default settings for processing and memory. + enum Type { + // No type specified. The instance creation will fail. + TYPE_UNSPECIFIED = 0; + + // Basic Data Fusion instance. In Basic type, the user will be able to + // create data pipelines using point and click UI. However, there are + // certain limitations, such as fewer number of concurrent pipelines, no + // support for streaming pipelines, etc. + BASIC = 1; + + // Enterprise Data Fusion instance. In Enterprise type, the user will have + // all features available, such as support for streaming pipelines, higher + // number of concurrent pipelines, etc. + ENTERPRISE = 2; + + // Developer Data Fusion instance. In Developer type, the user will have all + // features available but with restrictive capabilities. This is to help + // enterprises design and develop their data ingestion and integration + // pipelines at low cost. + DEVELOPER = 3; + } + + // Represents the state of a Data Fusion instance + enum State { + // Instance does not have a state yet + STATE_UNSPECIFIED = 0; + + // Instance is being created + CREATING = 1; + + // Instance is active and ready for requests. This corresponds to 'RUNNING' + // in datafusion.v1beta1. + ACTIVE = 2; + + // Instance creation failed + FAILED = 3; + + // Instance is being deleted + DELETING = 4; + + // Instance is being upgraded + UPGRADING = 5; + + // Instance is being restarted + RESTARTING = 6; + + // Instance is being updated on customer request + UPDATING = 7; + + // Instance is being auto-updated + AUTO_UPDATING = 8; + + // Instance is being auto-upgraded + AUTO_UPGRADING = 9; + } + + // Output only. The name of this instance is in the form of + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of this instance. + string description = 2; + + // Required. Instance type. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Option to enable Stackdriver Logging. + bool enable_stackdriver_logging = 4; + + // Option to enable Stackdriver Monitoring. + bool enable_stackdriver_monitoring = 5; + + // Specifies whether the Data Fusion instance should be private. If set to + // true, all Data Fusion nodes will have private IP addresses and will not be + // able to access the public internet. + bool private_instance = 6; + + // Network configuration options. These are required when a private Data + // Fusion instance is to be created. + NetworkConfig network_config = 7; + + // The resource labels for instance to use to annotate any related underlying + // resources such as Compute Engine VMs. The character '=' is not allowed to + // be used within the labels. + map labels = 8; + + // Map of additional options used to configure the behavior of + // Data Fusion instance. + map options = 9; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was last updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of this Data Fusion instance. + State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of this Data + // Fusion instance if available. + string state_message = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Endpoint on which the Data Fusion UI is accessible. + string service_endpoint = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Name of the zone in which the Data Fusion instance will be created. Only + // DEVELOPER instances use this field. + string zone = 15; + + // Current version of the Data Fusion. Only specifiable in Update. + string version = 16; + + // Output only. Deprecated. Use tenant_project_id instead to extract the + // tenant project ID. + string service_account = 17 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name for an instance. + string display_name = 18; + + // Available versions that the instance can be upgraded to using + // UpdateInstanceRequest. + repeated Version available_version = 19; + + // Output only. Endpoint on which the REST APIs is accessible. + string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Storage bucket generated by Data Fusion in the customer + // project. + string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of accelerators enabled for this CDF instance. + repeated Accelerator accelerators = 22; + + // Output only. P4 service account for the customer project. + string p4_service_account = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the tenant project. + string tenant_project_id = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-managed service account to set on Dataproc when Cloud Data Fusion + // creates Dataproc to run data processing pipelines. + // + // This allows users to have fine-grained access control on Dataproc's + // accesses to cloud resources. + string dataproc_service_account = 25; + + // Option to enable granular role-based access control. + bool enable_rbac = 27; + + // The crypto key configuration. This field is used by the Customer-Managed + // Encryption Keys (CMEK) feature. + CryptoKeyConfig crypto_key_config = 28; +} + +// Request message for listing Data Fusion instances. +message ListInstancesRequest { + // The project and location for which to retrieve instance information + // in the format projects/{project}/locations/{location}. If the location is + // specified as '-' (wildcard), then all regions available to the project + // are queried, and the results are aggregated. + string parent = 1; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // List filter. + string filter = 4; + + // Sort results. Supported values are "name", "name desc", or "" (unsorted). + string order_by = 5; +} + +// Response message for the list instance request. +message ListInstancesResponse { + // Represents a list of Data Fusion instances. + repeated Instance instances = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the list available versions request. +message ListAvailableVersionsRequest { + // Required. The project and location for which to retrieve instance + // information in the format projects/{project}/locations/{location}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Whether or not to return the latest patch of every available minor version. + // If true, only the latest patch will be returned. Ex. if allowed versions is + // [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0] + bool latest_patch_only = 4; +} + +// Response message for the list available versions request. +message ListAvailableVersionsResponse { + // Represents a list of versions that are supported. + repeated Version available_versions = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for getting details about a Data Fusion instance. +message GetInstanceRequest { + // The instance resource name in the format + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1; +} + +// Request message for creating a Data Fusion instance. +message CreateInstanceRequest { + // The instance's project and location in the format + // projects/{project}/locations/{location}. + string parent = 1; + + // The name of the instance to create. + string instance_id = 2; + + // An instance resource. + Instance instance = 3; +} + +// Request message for deleting a Data Fusion instance. +message DeleteInstanceRequest { + // The instance resource name in the format + // projects/{project}/locations/{location}/instances/{instance} + string name = 1; +} + +message UpdateInstanceRequest { + // The instance resource that replaces the resource on the server. Currently, + // Data Fusion only allows replacing labels, options, and stack driver + // settings. All other fields will be ignored. + Instance instance = 1; + + // Field mask is used to specify the fields that the update will overwrite + // in an instance resource. The fields specified in the update_mask are + // relative to the resource, not the full request. + // A field will be overwritten if it is in the mask. + // If the user does not provide a mask, all the supported fields (labels, + // options, and version currently) will be overwritten. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for restarting a Data Fusion instance. +message RestartInstanceRequest { + // Name of the Data Fusion instance which need to be restarted in the form of + // projects/{project}/locations/{location}/instances/{instance} + string name = 1; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation if any. + string status_detail = 5; + + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6; + + // API version used to start the operation. + string api_version = 7; + + // Map to hold any additional status info for the operation + // If there is an accelerator being enabled/disabled/deleted, this will be + // populated with accelerator name as key and status as + // ENABLING, DISABLING or DELETING + map additional_status = 8; +} diff --git a/proto-google-cloud-data-fusion-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-data-fusion-v1beta1/clirr-ignored-differences.xml new file mode 100644 index 00000000..5de8e032 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/datafusion/v1beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/datafusion/v1beta1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/datafusion/v1beta1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-data-fusion-v1beta1/pom.xml b/proto-google-cloud-data-fusion-v1beta1/pom.xml new file mode 100644 index 00000000..e7a38aee --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-data-fusion-v1beta1 + 0.0.1-SNAPSHOT + proto-google-cloud-data-fusion-v1beta1 + Proto library for google-cloud-data-fusion + + com.google.cloud + google-cloud-data-fusion-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Accelerator.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Accelerator.java new file mode 100644 index 00000000..e42225db --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Accelerator.java @@ -0,0 +1,784 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Identifies Data Fusion accelerators for an instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Accelerator} + */ +public final class Accelerator extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.Accelerator) + AcceleratorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Accelerator.newBuilder() to construct. + private Accelerator(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Accelerator() { + acceleratorType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Accelerator(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Accelerator( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + acceleratorType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Accelerator.class, + com.google.cloud.datafusion.v1beta1.Accelerator.Builder.class); + } + + /** + * + * + *
+   * Each type represents an Accelerator (Add-On) supported by Cloud Data Fusion
+   * service.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, if unspecified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Change Data Capture accelerator for CDF.
+     * 
+ * + * CDC = 1; + */ + CDC(1), + /** + * + * + *
+     * Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud
+     * Healthcare specific CDF plugins developed by Healthcare team.
+     * 
+ * + * HEALTHCARE = 2; + */ + HEALTHCARE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value, if unspecified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Change Data Capture accelerator for CDF.
+     * 
+ * + * CDC = 1; + */ + public static final int CDC_VALUE = 1; + /** + * + * + *
+     * Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud
+     * Healthcare specific CDF plugins developed by Healthcare team.
+     * 
+ * + * HEALTHCARE = 2; + */ + public static final int HEALTHCARE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType 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 AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return CDC; + case 2: + return HEALTHCARE; + 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 AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.Accelerator.getDescriptor().getEnumTypes().get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType 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 AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType) + } + + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 1; + private int acceleratorType_; + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType result = + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType.valueOf(acceleratorType_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType.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 (acceleratorType_ + != com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, acceleratorType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (acceleratorType_ + != com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, acceleratorType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.Accelerator)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.Accelerator other = + (com.google.cloud.datafusion.v1beta1.Accelerator) obj; + + if (acceleratorType_ != other.acceleratorType_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + acceleratorType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.Accelerator prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Identifies Data Fusion accelerators for an instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Accelerator} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.Accelerator) + com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Accelerator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Accelerator.class, + com.google.cloud.datafusion.v1beta1.Accelerator.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.Accelerator.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + acceleratorType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.Accelerator.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator build() { + com.google.cloud.datafusion.v1beta1.Accelerator result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator buildPartial() { + com.google.cloud.datafusion.v1beta1.Accelerator result = + new com.google.cloud.datafusion.v1beta1.Accelerator(this); + result.acceleratorType_ = acceleratorType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.Accelerator) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.Accelerator) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Accelerator other) { + if (other == com.google.cloud.datafusion.v1beta1.Accelerator.getDefaultInstance()) + return this; + if (other.acceleratorType_ != 0) { + setAcceleratorTypeValue(other.getAcceleratorTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.Accelerator parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.Accelerator) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int acceleratorType_ = 0; + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * + * @param value The enum numeric value on the wire for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeValue(int value) { + + acceleratorType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType getAcceleratorType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType result = + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType.valueOf(acceleratorType_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType( + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + acceleratorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of an accelator for a CDF instance.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + + acceleratorType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.Accelerator) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.Accelerator) + private static final com.google.cloud.datafusion.v1beta1.Accelerator DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.Accelerator(); + } + + public static com.google.cloud.datafusion.v1beta1.Accelerator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Accelerator parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Accelerator(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AcceleratorOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AcceleratorOrBuilder.java new file mode 100644 index 00000000..6fbaaed5 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AcceleratorOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface AcceleratorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.Accelerator) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The enum numeric value on the wire for acceleratorType. + */ + int getAcceleratorTypeValue(); + /** + * + * + *
+   * The type of an accelator for a CDF instance.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType accelerator_type = 1; + * + * @return The acceleratorType. + */ + com.google.cloud.datafusion.v1beta1.Accelerator.AcceleratorType getAcceleratorType(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java new file mode 100644 index 00000000..90060473 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequest.java @@ -0,0 +1,915 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message to create dns peering.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.AddDnsPeeringRequest} + */ +public final class AddDnsPeeringRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) + AddDnsPeeringRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddDnsPeeringRequest.newBuilder() to construct. + private AddDnsPeeringRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddDnsPeeringRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddDnsPeeringRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AddDnsPeeringRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder subBuilder = null; + if (dnsPeering_ != null) { + subBuilder = dnsPeering_.toBuilder(); + } + dnsPeering_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.DnsPeering.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dnsPeering_); + dnsPeering_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.class, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The resource on which DNS peering will be created.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The resource on which DNS peering will be created.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DNS_PEERING_FIELD_NUMBER = 2; + private com.google.cloud.datafusion.v1beta1.DnsPeering dnsPeering_; + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return Whether the dnsPeering field is set. + */ + @java.lang.Override + public boolean hasDnsPeering() { + return dnsPeering_ != null; + } + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return The dnsPeering. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeering() { + return dnsPeering_ == null + ? com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance() + : dnsPeering_; + } + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringOrBuilder() { + return getDnsPeering(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dnsPeering_ != null) { + output.writeMessage(2, getDnsPeering()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dnsPeering_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDnsPeering()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest other = + (com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDnsPeering() != other.hasDnsPeering()) return false; + if (hasDnsPeering()) { + if (!getDnsPeering().equals(other.getDnsPeering())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDnsPeering()) { + hash = (37 * hash) + DNS_PEERING_FIELD_NUMBER; + hash = (53 * hash) + getDnsPeering().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message to create dns peering.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.AddDnsPeeringRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.class, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (dnsPeeringBuilder_ == null) { + dnsPeering_ = null; + } else { + dnsPeering_ = null; + dnsPeeringBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest build() { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest result = + new com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest(this); + result.parent_ = parent_; + if (dnsPeeringBuilder_ == null) { + result.dnsPeering_ = dnsPeering_; + } else { + result.dnsPeering_ = dnsPeeringBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDnsPeering()) { + mergeDnsPeering(other.getDnsPeering()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The resource on which DNS peering will be created.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource on which DNS peering will be created.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource on which DNS peering will be created.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which DNS peering will be created.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which DNS peering will be created.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1beta1.DnsPeering dnsPeering_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder> + dnsPeeringBuilder_; + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return Whether the dnsPeering field is set. + */ + public boolean hasDnsPeering() { + return dnsPeeringBuilder_ != null || dnsPeering_ != null; + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return The dnsPeering. + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeering() { + if (dnsPeeringBuilder_ == null) { + return dnsPeering_ == null + ? com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance() + : dnsPeering_; + } else { + return dnsPeeringBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public Builder setDnsPeering(com.google.cloud.datafusion.v1beta1.DnsPeering value) { + if (dnsPeeringBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dnsPeering_ = value; + onChanged(); + } else { + dnsPeeringBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public Builder setDnsPeering( + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder builderForValue) { + if (dnsPeeringBuilder_ == null) { + dnsPeering_ = builderForValue.build(); + onChanged(); + } else { + dnsPeeringBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public Builder mergeDnsPeering(com.google.cloud.datafusion.v1beta1.DnsPeering value) { + if (dnsPeeringBuilder_ == null) { + if (dnsPeering_ != null) { + dnsPeering_ = + com.google.cloud.datafusion.v1beta1.DnsPeering.newBuilder(dnsPeering_) + .mergeFrom(value) + .buildPartial(); + } else { + dnsPeering_ = value; + } + onChanged(); + } else { + dnsPeeringBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public Builder clearDnsPeering() { + if (dnsPeeringBuilder_ == null) { + dnsPeering_ = null; + onChanged(); + } else { + dnsPeering_ = null; + dnsPeeringBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering.Builder getDnsPeeringBuilder() { + + onChanged(); + return getDnsPeeringFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringOrBuilder() { + if (dnsPeeringBuilder_ != null) { + return dnsPeeringBuilder_.getMessageOrBuilder(); + } else { + return dnsPeering_ == null + ? com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance() + : dnsPeering_; + } + } + /** + * + * + *
+     * Dns peering config.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder> + getDnsPeeringFieldBuilder() { + if (dnsPeeringBuilder_ == null) { + dnsPeeringBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder>( + getDnsPeering(), getParentForChildren(), isClean()); + dnsPeering_ = null; + } + return dnsPeeringBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) + private static final com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddDnsPeeringRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AddDnsPeeringRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java new file mode 100644 index 00000000..96426b71 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface AddDnsPeeringRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.AddDnsPeeringRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource on which DNS peering will be created.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The resource on which DNS peering will be created.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return Whether the dnsPeering field is set. + */ + boolean hasDnsPeering(); + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + * + * @return The dnsPeering. + */ + com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeering(); + /** + * + * + *
+   * Dns peering config.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.DnsPeering dns_peering = 2; + */ + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponse.java new file mode 100644 index 00000000..14004536 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Response message for set dns peering method.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.AddDnsPeeringResponse} + */ +public final class AddDnsPeeringResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) + AddDnsPeeringResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddDnsPeeringResponse.newBuilder() to construct. + private AddDnsPeeringResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddDnsPeeringResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddDnsPeeringResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AddDnsPeeringResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.class, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse other = + (com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for set dns peering method.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.AddDnsPeeringResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.class, + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse build() { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse result = + new com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse other) { + if (other == com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) + private static final com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddDnsPeeringResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AddDnsPeeringResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AddDnsPeeringResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponseOrBuilder.java new file mode 100644 index 00000000..0fe85cf2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/AddDnsPeeringResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface AddDnsPeeringResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.AddDnsPeeringResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java new file mode 100644 index 00000000..56d35a24 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequest.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for creating a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.CreateInstanceRequest} + */ +public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.CreateInstanceRequest) + CreateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstanceRequest.newBuilder() to construct. + private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + case 26: + { + com.google.cloud.datafusion.v1beta1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private com.google.cloud.datafusion.v1beta1.Instance instance_; + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (instance_ != null) { + output.writeMessage(3, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.CreateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.CreateInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for creating a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.CreateInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.CreateInstanceRequest) + com.google.cloud.datafusion.v1beta1.CreateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + instanceId_ = ""; + + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CreateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CreateInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CreateInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.CreateInstanceRequest(this); + result.parent_ = parent_; + result.instanceId_ = instanceId_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.CreateInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.CreateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.CreateInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.CreateInstanceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.CreateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.CreateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance's project and location in the format
+     * projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the instance to create.
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1beta1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return The instance. + */ + public com.google.cloud.datafusion.v1beta1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public Builder setInstance(com.google.cloud.datafusion.v1beta1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public Builder setInstance( + com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public Builder mergeInstance(com.google.cloud.datafusion.v1beta1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.datafusion.v1beta1.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public com.google.cloud.datafusion.v1beta1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * An instance resource.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.CreateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.CreateInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.CreateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.CreateInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.CreateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CreateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java new file mode 100644 index 00000000..39030772 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CreateInstanceRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface CreateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.CreateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The instance's project and location in the format
+   * projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * The name of the instance to create.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + * + * @return The instance. + */ + com.google.cloud.datafusion.v1beta1.Instance getInstance(); + /** + * + * + *
+   * An instance resource.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 3; + */ + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java new file mode 100644 index 00000000..eb07ad28 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfig.java @@ -0,0 +1,652 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * The crypto key configuration. This field is used by the Customer-managed
+ * encryption keys (CMEK) feature.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.CryptoKeyConfig} + */ +public final class CryptoKeyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.CryptoKeyConfig) + CryptoKeyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CryptoKeyConfig.newBuilder() to construct. + private CryptoKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CryptoKeyConfig() { + keyReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CryptoKeyConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CryptoKeyConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + keyReference_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.class, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder.class); + } + + public static final int KEY_REFERENCE_FIELD_NUMBER = 1; + private volatile java.lang.Object keyReference_; + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + @java.lang.Override + public java.lang.String getKeyReference() { + java.lang.Object ref = keyReference_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyReference_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyReferenceBytes() { + java.lang.Object ref = keyReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyReference_ = 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 (!getKeyReferenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyReference_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyReferenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyReference_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.CryptoKeyConfig)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig other = + (com.google.cloud.datafusion.v1beta1.CryptoKeyConfig) obj; + + if (!getKeyReference().equals(other.getKeyReference())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getKeyReference().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.CryptoKeyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-managed
+   * encryption keys (CMEK) feature.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.CryptoKeyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.CryptoKeyConfig) + com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.class, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + keyReference_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig build() { + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig buildPartial() { + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig result = + new com.google.cloud.datafusion.v1beta1.CryptoKeyConfig(this); + result.keyReference_ = keyReference_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.CryptoKeyConfig) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.CryptoKeyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.CryptoKeyConfig other) { + if (other == com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.getDefaultInstance()) + return this; + if (!other.getKeyReference().isEmpty()) { + keyReference_ = other.keyReference_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.CryptoKeyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object keyReference_ = ""; + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + public java.lang.String getKeyReference() { + java.lang.Object ref = keyReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + public com.google.protobuf.ByteString getKeyReferenceBytes() { + java.lang.Object ref = keyReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @param value The keyReference to set. + * @return This builder for chaining. + */ + public Builder setKeyReference(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + keyReference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @return This builder for chaining. + */ + public Builder clearKeyReference() { + + keyReference_ = getDefaultInstance().getKeyReference(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the key which is used to encrypt/decrypt customer data. For key
+     * in Cloud KMS, the key should be in the format of
+     * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+     * 
+ * + * string key_reference = 1; + * + * @param value The bytes for keyReference to set. + * @return This builder for chaining. + */ + public Builder setKeyReferenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + keyReference_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.CryptoKeyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.CryptoKeyConfig) + private static final com.google.cloud.datafusion.v1beta1.CryptoKeyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.CryptoKeyConfig(); + } + + public static com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoKeyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoKeyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java new file mode 100644 index 00000000..6e283508 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/CryptoKeyConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface CryptoKeyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.CryptoKeyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The keyReference. + */ + java.lang.String getKeyReference(); + /** + * + * + *
+   * The name of the key which is used to encrypt/decrypt customer data. For key
+   * in Cloud KMS, the key should be in the format of
+   * `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
+   * 
+ * + * string key_reference = 1; + * + * @return The bytes for keyReference. + */ + com.google.protobuf.ByteString getKeyReferenceBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java new file mode 100644 index 00000000..3d40cd97 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for deleting a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.DeleteInstanceRequest} + */ +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for deleting a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.DeleteInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.DeleteInstanceRequest) + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.DeleteInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 00000000..d856251f --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DeleteInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface DeleteInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeering.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeering.java new file mode 100644 index 00000000..32decc1d --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeering.java @@ -0,0 +1,1352 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * DNS peering configuration. These configurations are used to create
+ * DNS peering with the customer Cloud DNS.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.DnsPeering} + */ +public final class DnsPeering extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.DnsPeering) + DnsPeeringOrBuilder { + private static final long serialVersionUID = 0L; + // Use DnsPeering.newBuilder() to construct. + private DnsPeering(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DnsPeering() { + zone_ = ""; + domain_ = ""; + description_ = ""; + targetProject_ = ""; + targetNetwork_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DnsPeering(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DnsPeering( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetProject_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetNetwork_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DnsPeering_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.DnsPeering.class, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder.class); + } + + public static final int ZONE_FIELD_NUMBER = 1; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * Required. Name of the zone.
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the zone.
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 2; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Required. Name of the dns.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dns.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Optional description of the dns zone.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional description of the dns zone.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_PROJECT_FIELD_NUMBER = 4; + private volatile java.lang.Object targetProject_; + /** + * + * + *
+   * Optional. Optional target project to which dns peering should happen.
+   * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetProject. + */ + @java.lang.Override + public java.lang.String getTargetProject() { + java.lang.Object ref = targetProject_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetProject_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional target project to which dns peering should happen.
+   * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetProject. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetProjectBytes() { + java.lang.Object ref = targetProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_NETWORK_FIELD_NUMBER = 5; + private volatile java.lang.Object targetNetwork_; + /** + * + * + *
+   * Optional. Optional target network to which dns peering should happen.
+   * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetNetwork. + */ + @java.lang.Override + public java.lang.String getTargetNetwork() { + java.lang.Object ref = targetNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNetwork_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional target network to which dns peering should happen.
+   * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetNetworkBytes() { + java.lang.Object ref = targetNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNetwork_ = 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 (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); + } + if (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domain_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!getTargetProjectBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, targetProject_); + } + if (!getTargetNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetNetwork_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); + } + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, domain_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!getTargetProjectBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, targetProject_); + } + if (!getTargetNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetNetwork_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.DnsPeering)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.DnsPeering other = + (com.google.cloud.datafusion.v1beta1.DnsPeering) obj; + + if (!getZone().equals(other.getZone())) return false; + if (!getDomain().equals(other.getDomain())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getTargetProject().equals(other.getTargetProject())) return false; + if (!getTargetNetwork().equals(other.getTargetNetwork())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TARGET_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getTargetProject().hashCode(); + hash = (37 * hash) + TARGET_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getTargetNetwork().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.DnsPeering prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * DNS peering configuration. These configurations are used to create
+   * DNS peering with the customer Cloud DNS.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.DnsPeering} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.DnsPeering) + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DnsPeering_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.DnsPeering.class, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.DnsPeering.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + zone_ = ""; + + domain_ = ""; + + description_ = ""; + + targetProject_ = ""; + + targetNetwork_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering build() { + com.google.cloud.datafusion.v1beta1.DnsPeering result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering buildPartial() { + com.google.cloud.datafusion.v1beta1.DnsPeering result = + new com.google.cloud.datafusion.v1beta1.DnsPeering(this); + result.zone_ = zone_; + result.domain_ = domain_; + result.description_ = description_; + result.targetProject_ = targetProject_; + result.targetNetwork_ = targetNetwork_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.DnsPeering) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.DnsPeering) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.DnsPeering other) { + if (other == com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance()) return this; + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getTargetProject().isEmpty()) { + targetProject_ = other.targetProject_; + onChanged(); + } + if (!other.getTargetNetwork().isEmpty()) { + targetNetwork_ = other.targetNetwork_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.DnsPeering parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.DnsPeering) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Required. Name of the zone.
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the zone.
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the zone.
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the zone.
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the zone.
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Required. Name of the dns.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dns.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dns.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dns.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dns.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Optional description of the dns zone.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional description of the dns zone.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional description of the dns zone.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional description of the dns zone.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional description of the dns zone.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetProject_ = ""; + /** + * + * + *
+     * Optional. Optional target project to which dns peering should happen.
+     * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetProject. + */ + public java.lang.String getTargetProject() { + java.lang.Object ref = targetProject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetProject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional target project to which dns peering should happen.
+     * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetProject. + */ + public com.google.protobuf.ByteString getTargetProjectBytes() { + java.lang.Object ref = targetProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional target project to which dns peering should happen.
+     * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The targetProject to set. + * @return This builder for chaining. + */ + public Builder setTargetProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetProject_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional target project to which dns peering should happen.
+     * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTargetProject() { + + targetProject_ = getDefaultInstance().getTargetProject(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional target project to which dns peering should happen.
+     * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for targetProject to set. + * @return This builder for chaining. + */ + public Builder setTargetProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetProject_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetNetwork_ = ""; + /** + * + * + *
+     * Optional. Optional target network to which dns peering should happen.
+     * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetNetwork. + */ + public java.lang.String getTargetNetwork() { + java.lang.Object ref = targetNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional target network to which dns peering should happen.
+     * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetNetwork. + */ + public com.google.protobuf.ByteString getTargetNetworkBytes() { + java.lang.Object ref = targetNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional target network to which dns peering should happen.
+     * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The targetNetwork to set. + * @return This builder for chaining. + */ + public Builder setTargetNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetNetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional target network to which dns peering should happen.
+     * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTargetNetwork() { + + targetNetwork_ = getDefaultInstance().getTargetNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional target network to which dns peering should happen.
+     * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for targetNetwork to set. + * @return This builder for chaining. + */ + public Builder setTargetNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetNetwork_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.DnsPeering) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.DnsPeering) + private static final com.google.cloud.datafusion.v1beta1.DnsPeering DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.DnsPeering(); + } + + public static com.google.cloud.datafusion.v1beta1.DnsPeering getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DnsPeering parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DnsPeering(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeeringOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeeringOrBuilder.java new file mode 100644 index 00000000..e54f9512 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/DnsPeeringOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface DnsPeeringOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.DnsPeering) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the zone.
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Required. Name of the zone.
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Required. Name of the dns.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Required. Name of the dns.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Optional. Optional description of the dns zone.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Optional description of the dns zone.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Optional target project to which dns peering should happen.
+   * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetProject. + */ + java.lang.String getTargetProject(); + /** + * + * + *
+   * Optional. Optional target project to which dns peering should happen.
+   * 
+ * + * string target_project = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetProject. + */ + com.google.protobuf.ByteString getTargetProjectBytes(); + + /** + * + * + *
+   * Optional. Optional target network to which dns peering should happen.
+   * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The targetNetwork. + */ + java.lang.String getTargetNetwork(); + /** + * + * + *
+   * Optional. Optional target network to which dns peering should happen.
+   * 
+ * + * string target_network = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for targetNetwork. + */ + com.google.protobuf.ByteString getTargetNetworkBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java new file mode 100644 index 00000000..50b43809 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for getting details about a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.GetInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.GetInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for getting details about a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.GetInstanceRequest) + com.google.cloud.datafusion.v1beta1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.GetInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.GetInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.GetInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.GetInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.GetInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.GetInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.GetInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.GetInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.GetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.GetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource name in the format
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.GetInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.GetInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java new file mode 100644 index 00000000..5ae56ccf --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The instance resource name in the format
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicy.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicy.java new file mode 100644 index 00000000..2194570d --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicy.java @@ -0,0 +1,994 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * IAMPolicy encapsulates the IAM policy name, definition and status of
+ * policy fetching.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.IAMPolicy} + */ +public final class IAMPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.IAMPolicy) + IAMPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use IAMPolicy.newBuilder() to construct. + private IAMPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IAMPolicy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IAMPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IAMPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.IAMPolicy.class, + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder.class); + } + + public static final int POLICY_FIELD_NUMBER = 1; + private com.google.iam.v1.Policy policy_; + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return policy_ != null; + } + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getPolicy() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + return getPolicy(); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private com.google.rpc.Status status_; + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (policy_ != null) { + output.writeMessage(1, getPolicy()); + } + if (status_ != null) { + output.writeMessage(2, getStatus()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (policy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.IAMPolicy)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.IAMPolicy other = + (com.google.cloud.datafusion.v1beta1.IAMPolicy) obj; + + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.IAMPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * IAMPolicy encapsulates the IAM policy name, definition and status of
+   * policy fetching.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.IAMPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.IAMPolicy) + com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.IAMPolicy.class, + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.IAMPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyBuilder_ == null) { + policy_ = null; + } else { + policy_ = null; + policyBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicy getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.IAMPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicy build() { + com.google.cloud.datafusion.v1beta1.IAMPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicy buildPartial() { + com.google.cloud.datafusion.v1beta1.IAMPolicy result = + new com.google.cloud.datafusion.v1beta1.IAMPolicy(this); + if (policyBuilder_ == null) { + result.policy_ = policy_; + } else { + result.policy_ = policyBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.IAMPolicy) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.IAMPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.IAMPolicy other) { + if (other == com.google.cloud.datafusion.v1beta1.IAMPolicy.getDefaultInstance()) return this; + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.IAMPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.IAMPolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.iam.v1.Policy policy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + policyBuilder_; + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return policyBuilder_ != null || policy_ != null; + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return The policy. + */ + public com.google.iam.v1.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public Builder setPolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + onChanged(); + } else { + policyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public Builder setPolicy(com.google.iam.v1.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + onChanged(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public Builder mergePolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (policy_ != null) { + policy_ = com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); + } else { + policy_ = value; + } + onChanged(); + } else { + policyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public Builder clearPolicy() { + if (policyBuilder_ == null) { + policy_ = null; + onChanged(); + } else { + policy_ = null; + policyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public com.google.iam.v1.Policy.Builder getPolicyBuilder() { + + onChanged(); + return getPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + } + /** + * + * + *
+     * Policy definition if IAM policy fetching is successful,
+     * otherwise empty.
+     * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder> + getPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, + com.google.iam.v1.Policy.Builder, + com.google.iam.v1.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * Status of iam policy fetching.
+     * 
+ * + * .google.rpc.Status status = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.IAMPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.IAMPolicy) + private static final com.google.cloud.datafusion.v1beta1.IAMPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.IAMPolicy(); + } + + public static com.google.cloud.datafusion.v1beta1.IAMPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IAMPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IAMPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicyOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicyOrBuilder.java new file mode 100644 index 00000000..c60e2bd0 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/IAMPolicyOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface IAMPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.IAMPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + * + * @return The policy. + */ + com.google.iam.v1.Policy getPolicy(); + /** + * + * + *
+   * Policy definition if IAM policy fetching is successful,
+   * otherwise empty.
+   * 
+ * + * .google.iam.v1.Policy policy = 1; + */ + com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); + + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * Status of iam policy fetching.
+   * 
+ * + * .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java new file mode 100644 index 00000000..a029bb07 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Instance.java @@ -0,0 +1,6914 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Represents a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + stateMessage_ = ""; + serviceEndpoint_ = ""; + zone_ = ""; + version_ = ""; + serviceAccount_ = ""; + displayName_ = ""; + availableVersion_ = java.util.Collections.emptyList(); + apiEndpoint_ = ""; + gcsBucket_ = ""; + accelerators_ = java.util.Collections.emptyList(); + p4ServiceAccount_ = ""; + tenantProjectId_ = ""; + dataprocServiceAccount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 32: + { + enableStackdriverLogging_ = input.readBool(); + break; + } + case 40: + { + enableStackdriverMonitoring_ = input.readBool(); + break; + } + case 48: + { + privateInstance_ = input.readBool(); + break; + } + case 58: + { + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder subBuilder = null; + if (networkConfig_ != null) { + subBuilder = networkConfig_.toBuilder(); + } + networkConfig_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.NetworkConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(networkConfig_); + networkConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + options_ = + com.google.protobuf.MapField.newMapField( + OptionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry options__ = + input.readMessage( + OptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + options_.getMutableMap().put(options__.getKey(), options__.getValue()); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 96: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + stateMessage_ = s; + break; + } + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceEndpoint_ = s; + break; + } + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 154: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + availableVersion_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + availableVersion_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.Version.parser(), extensionRegistry)); + break; + } + case 162: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiEndpoint_ = s; + break; + } + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsBucket_ = s; + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + accelerators_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + accelerators_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.Accelerator.parser(), extensionRegistry)); + break; + } + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + + p4ServiceAccount_ = s; + break; + } + case 194: + { + java.lang.String s = input.readStringRequireUtf8(); + + tenantProjectId_ = s; + break; + } + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataprocServiceAccount_ = s; + break; + } + case 208: + { + enableRbac_ = input.readBool(); + break; + } + case 218: + { + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder subBuilder = null; + if (cryptoKeyConfig_ != null) { + subBuilder = cryptoKeyConfig_.toBuilder(); + } + cryptoKeyConfig_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cryptoKeyConfig_); + cryptoKeyConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + availableVersion_ = java.util.Collections.unmodifiableList(availableVersion_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + case 9: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Instance.class, + com.google.cloud.datafusion.v1beta1.Instance.Builder.class); + } + + /** + * + * + *
+   * Represents the type of Data Fusion instance. Each type is configured with
+   * the default settings for processing and memory.
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.Instance.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified. The instance creation will fail.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Basic Data Fusion instance. In Basic type, the user will be able to
+     * create data pipelines using point and click UI. However, there are
+     * certain limitations, such as fewer number of concurrent pipelines, no
+     * support for streaming pipelines, etc.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Enterprise Data Fusion instance. In Enterprise type, the user will have
+     * all features available, such as support for streaming pipelines,
+     * unlimited number of concurrent pipelines, etc.
+     * 
+ * + * ENTERPRISE = 2; + */ + ENTERPRISE(2), + /** + * + * + *
+     * Developer Data Fusion instance. In Developer type, the user will have all
+     * features available but with restrictive capabilities. This is to help
+     * enterprises design and develop their data ingestion and integration
+     * pipelines at low cost.
+     * 
+ * + * DEVELOPER = 3; + */ + DEVELOPER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified. The instance creation will fail.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Basic Data Fusion instance. In Basic type, the user will be able to
+     * create data pipelines using point and click UI. However, there are
+     * certain limitations, such as fewer number of concurrent pipelines, no
+     * support for streaming pipelines, etc.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Enterprise Data Fusion instance. In Enterprise type, the user will have
+     * all features available, such as support for streaming pipelines,
+     * unlimited number of concurrent pipelines, etc.
+     * 
+ * + * ENTERPRISE = 2; + */ + public static final int ENTERPRISE_VALUE = 2; + /** + * + * + *
+     * Developer Data Fusion instance. In Developer type, the user will have all
+     * features available but with restrictive capabilities. This is to help
+     * enterprises design and develop their data ingestion and integration
+     * pipelines at low cost.
+     * 
+ * + * DEVELOPER = 3; + */ + public static final int DEVELOPER_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return ENTERPRISE; + case 3: + return DEVELOPER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.Instance.Type) + } + + /** + * + * + *
+   * Represents the state of a Data Fusion instance
+   * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Instance does not have a state yet
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Instance is being created
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Instance is running and ready for requests
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * Instance creation failed
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + * + * + *
+     * Instance is being deleted
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * Instance is being upgraded
+     * 
+ * + * UPGRADING = 5; + */ + UPGRADING(5), + /** + * + * + *
+     * Instance is being restarted
+     * 
+ * + * RESTARTING = 6; + */ + RESTARTING(6), + /** + * + * + *
+     * Instance is being updated on customer request
+     * 
+ * + * UPDATING = 7; + */ + UPDATING(7), + /** + * + * + *
+     * Instance is being auto-updated
+     * 
+ * + * AUTO_UPDATING = 8; + */ + AUTO_UPDATING(8), + /** + * + * + *
+     * Instance is being auto-upgraded
+     * 
+ * + * AUTO_UPGRADING = 9; + */ + AUTO_UPGRADING(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Instance does not have a state yet
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Instance is being created
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Instance is running and ready for requests
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * Instance creation failed
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + * + * + *
+     * Instance is being deleted
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * Instance is being upgraded
+     * 
+ * + * UPGRADING = 5; + */ + public static final int UPGRADING_VALUE = 5; + /** + * + * + *
+     * Instance is being restarted
+     * 
+ * + * RESTARTING = 6; + */ + public static final int RESTARTING_VALUE = 6; + /** + * + * + *
+     * Instance is being updated on customer request
+     * 
+ * + * UPDATING = 7; + */ + public static final int UPDATING_VALUE = 7; + /** + * + * + *
+     * Instance is being auto-updated
+     * 
+ * + * AUTO_UPDATING = 8; + */ + public static final int AUTO_UPDATING_VALUE = 8; + /** + * + * + *
+     * Instance is being auto-upgraded
+     * 
+ * + * AUTO_UPGRADING = 9; + */ + public static final int AUTO_UPGRADING_VALUE = 9; + + 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 CREATING; + case 2: + return RUNNING; + case 3: + return FAILED; + case 4: + return DELETING; + case 5: + return UPGRADING; + case 6: + return RESTARTING; + case 7: + return UPDATING; + case 8: + return AUTO_UPDATING; + case 9: + return AUTO_UPGRADING; + 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 final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.Instance.getDescriptor().getEnumTypes().get(1); + } + + 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.cloud.datafusion.v1beta1.Instance.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Instance.Type result = + com.google.cloud.datafusion.v1beta1.Instance.Type.valueOf(type_); + return result == null ? com.google.cloud.datafusion.v1beta1.Instance.Type.UNRECOGNIZED : result; + } + + public static final int ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER = 4; + private boolean enableStackdriverLogging_; + /** + * + * + *
+   * Option to enable Stackdriver Logging.
+   * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + + public static final int ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER = 5; + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+   * Option to enable Stackdriver Monitoring.
+   * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + + public static final int PRIVATE_INSTANCE_FIELD_NUMBER = 6; + private boolean privateInstance_; + /** + * + * + *
+   * Specifies whether the Data Fusion instance should be private. If set to
+   * true, all Data Fusion nodes will have private IP addresses and will not be
+   * able to access the public internet.
+   * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + @java.lang.Override + public boolean getPrivateInstance() { + return privateInstance_; + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.datafusion.v1beta1.NetworkConfig networkConfig_; + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return networkConfig_ != null; + } + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + return getNetworkConfig(); + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OPTIONS_FIELD_NUMBER = 9; + + private static final class OptionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetOptions().getMap().containsKey(key); + } + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 12; + private int state_; + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.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. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Instance.State result = + com.google.cloud.datafusion.v1beta1.Instance.State.valueOf(state_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Instance.State.UNRECOGNIZED + : result; + } + + public static final int STATE_MESSAGE_FIELD_NUMBER = 13; + private volatile java.lang.Object stateMessage_; + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + @java.lang.Override + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ENDPOINT_FIELD_NUMBER = 14; + private volatile java.lang.Object serviceEndpoint_; + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + @java.lang.Override + public java.lang.String getServiceEndpoint() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceEndpointBytes() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 15; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 16; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Current version of Data Fusion.
+   * 
+ * + * string version = 16; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Current version of Data Fusion.
+   * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 17; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 18; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABLE_VERSION_FIELD_NUMBER = 19; + private java.util.List availableVersion_; + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + @java.lang.Override + public java.util.List getAvailableVersionList() { + return availableVersion_; + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + @java.lang.Override + public java.util.List + getAvailableVersionOrBuilderList() { + return availableVersion_; + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + @java.lang.Override + public int getAvailableVersionCount() { + return availableVersion_.size(); + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version getAvailableVersion(int index) { + return availableVersion_.get(index); + } + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionOrBuilder( + int index) { + return availableVersion_.get(index); + } + + public static final int API_ENDPOINT_FIELD_NUMBER = 20; + private volatile java.lang.Object apiEndpoint_; + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + @java.lang.Override + public java.lang.String getApiEndpoint() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiEndpointBytes() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_BUCKET_FIELD_NUMBER = 21; + private volatile java.lang.Object gcsBucket_; + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + @java.lang.Override + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATORS_FIELD_NUMBER = 22; + private java.util.List accelerators_; + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + @java.lang.Override + public java.util.List getAcceleratorsList() { + return accelerators_; + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + @java.lang.Override + public java.util.List + getAcceleratorsOrBuilderList() { + return accelerators_; + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + @java.lang.Override + public int getAcceleratorsCount() { + return accelerators_.size(); + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Accelerator getAccelerators(int index) { + return accelerators_.get(index); + } + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder getAcceleratorsOrBuilder( + int index) { + return accelerators_.get(index); + } + + public static final int P4_SERVICE_ACCOUNT_FIELD_NUMBER = 23; + private volatile java.lang.Object p4ServiceAccount_; + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + @java.lang.Override + public java.lang.String getP4ServiceAccount() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + p4ServiceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getP4ServiceAccountBytes() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + p4ServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TENANT_PROJECT_ID_FIELD_NUMBER = 24; + private volatile java.lang.Object tenantProjectId_; + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + @java.lang.Override + public java.lang.String getTenantProjectId() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantProjectId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTenantProjectIdBytes() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPROC_SERVICE_ACCOUNT_FIELD_NUMBER = 25; + private volatile java.lang.Object dataprocServiceAccount_; + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + @java.lang.Override + public java.lang.String getDataprocServiceAccount() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataprocServiceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataprocServiceAccountBytes() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataprocServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_RBAC_FIELD_NUMBER = 26; + private boolean enableRbac_; + /** + * + * + *
+   * Option to enable granular role-based access control.
+   * 
+ * + * bool enable_rbac = 26; + * + * @return The enableRbac. + */ + @java.lang.Override + public boolean getEnableRbac() { + return enableRbac_; + } + + public static final int CRYPTO_KEY_CONFIG_FIELD_NUMBER = 27; + private com.google.cloud.datafusion.v1beta1.CryptoKeyConfig cryptoKeyConfig_; + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return Whether the cryptoKeyConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoKeyConfig() { + return cryptoKeyConfig_ != null; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return The cryptoKeyConfig. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getCryptoKeyConfig() { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder + getCryptoKeyConfigOrBuilder() { + return getCryptoKeyConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (type_ != com.google.cloud.datafusion.v1beta1.Instance.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, type_); + } + if (enableStackdriverLogging_ != false) { + output.writeBool(4, enableStackdriverLogging_); + } + if (enableStackdriverMonitoring_ != false) { + output.writeBool(5, enableStackdriverMonitoring_); + } + if (privateInstance_ != false) { + output.writeBool(6, privateInstance_); + } + if (networkConfig_ != null) { + output.writeMessage(7, getNetworkConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, 9); + if (createTime_ != null) { + output.writeMessage(10, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (state_ + != com.google.cloud.datafusion.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, state_); + } + if (!getStateMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, stateMessage_); + } + if (!getServiceEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, serviceEndpoint_); + } + if (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, zone_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, version_); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, serviceAccount_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, displayName_); + } + for (int i = 0; i < availableVersion_.size(); i++) { + output.writeMessage(19, availableVersion_.get(i)); + } + if (!getApiEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, apiEndpoint_); + } + if (!getGcsBucketBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, gcsBucket_); + } + for (int i = 0; i < accelerators_.size(); i++) { + output.writeMessage(22, accelerators_.get(i)); + } + if (!getP4ServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, p4ServiceAccount_); + } + if (!getTenantProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, tenantProjectId_); + } + if (!getDataprocServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, dataprocServiceAccount_); + } + if (enableRbac_ != false) { + output.writeBool(26, enableRbac_); + } + if (cryptoKeyConfig_ != null) { + output.writeMessage(27, getCryptoKeyConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (type_ != com.google.cloud.datafusion.v1beta1.Instance.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + if (enableStackdriverLogging_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableStackdriverLogging_); + } + if (enableStackdriverMonitoring_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableStackdriverMonitoring_); + } + if (privateInstance_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, privateInstance_); + } + if (networkConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getNetworkConfig()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + for (java.util.Map.Entry entry : + internalGetOptions().getMap().entrySet()) { + com.google.protobuf.MapEntry options__ = + OptionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, options__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (state_ + != com.google.cloud.datafusion.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, state_); + } + if (!getStateMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, stateMessage_); + } + if (!getServiceEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, serviceEndpoint_); + } + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, zone_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, version_); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, serviceAccount_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, displayName_); + } + for (int i = 0; i < availableVersion_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(19, availableVersion_.get(i)); + } + if (!getApiEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, apiEndpoint_); + } + if (!getGcsBucketBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, gcsBucket_); + } + for (int i = 0; i < accelerators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, accelerators_.get(i)); + } + if (!getP4ServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, p4ServiceAccount_); + } + if (!getTenantProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, tenantProjectId_); + } + if (!getDataprocServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, dataprocServiceAccount_); + } + if (enableRbac_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, enableRbac_); + } + if (cryptoKeyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getCryptoKeyConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.Instance)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.Instance other = + (com.google.cloud.datafusion.v1beta1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (type_ != other.type_) return false; + if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; + if (getEnableStackdriverMonitoring() != other.getEnableStackdriverMonitoring()) return false; + if (getPrivateInstance() != other.getPrivateInstance()) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetOptions().equals(other.internalGetOptions())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getStateMessage().equals(other.getStateMessage())) return false; + if (!getServiceEndpoint().equals(other.getServiceEndpoint())) return false; + if (!getZone().equals(other.getZone())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getAvailableVersionList().equals(other.getAvailableVersionList())) return false; + if (!getApiEndpoint().equals(other.getApiEndpoint())) return false; + if (!getGcsBucket().equals(other.getGcsBucket())) return false; + if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; + if (!getP4ServiceAccount().equals(other.getP4ServiceAccount())) return false; + if (!getTenantProjectId().equals(other.getTenantProjectId())) return false; + if (!getDataprocServiceAccount().equals(other.getDataprocServiceAccount())) return false; + if (getEnableRbac() != other.getEnableRbac()) return false; + if (hasCryptoKeyConfig() != other.hasCryptoKeyConfig()) return false; + if (hasCryptoKeyConfig()) { + if (!getCryptoKeyConfig().equals(other.getCryptoKeyConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverLogging()); + hash = (37 * hash) + ENABLE_STACKDRIVER_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStackdriverMonitoring()); + hash = (37 * hash) + PRIVATE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateInstance()); + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetOptions().getMap().isEmpty()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOptions().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStateMessage().hashCode(); + hash = (37 * hash) + SERVICE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getServiceEndpoint().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getAvailableVersionCount() > 0) { + hash = (37 * hash) + AVAILABLE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAvailableVersionList().hashCode(); + } + hash = (37 * hash) + API_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getApiEndpoint().hashCode(); + hash = (37 * hash) + GCS_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getGcsBucket().hashCode(); + if (getAcceleratorsCount() > 0) { + hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorsList().hashCode(); + } + hash = (37 * hash) + P4_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getP4ServiceAccount().hashCode(); + hash = (37 * hash) + TENANT_PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTenantProjectId().hashCode(); + hash = (37 * hash) + DATAPROC_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDataprocServiceAccount().hashCode(); + hash = (37 * hash) + ENABLE_RBAC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRbac()); + if (hasCryptoKeyConfig()) { + hash = (37 * hash) + CRYPTO_KEY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKeyConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.Instance) + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + case 9: + return internalGetOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableLabels(); + case 9: + return internalGetMutableOptions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Instance.class, + com.google.cloud.datafusion.v1beta1.Instance.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAvailableVersionFieldBuilder(); + getAcceleratorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + type_ = 0; + + enableStackdriverLogging_ = false; + + enableStackdriverMonitoring_ = false; + + privateInstance_ = false; + + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableOptions().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = 0; + + stateMessage_ = ""; + + serviceEndpoint_ = ""; + + zone_ = ""; + + version_ = ""; + + serviceAccount_ = ""; + + displayName_ = ""; + + if (availableVersionBuilder_ == null) { + availableVersion_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + availableVersionBuilder_.clear(); + } + apiEndpoint_ = ""; + + gcsBucket_ = ""; + + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + acceleratorsBuilder_.clear(); + } + p4ServiceAccount_ = ""; + + tenantProjectId_ = ""; + + dataprocServiceAccount_ = ""; + + enableRbac_ = false; + + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = null; + } else { + cryptoKeyConfig_ = null; + cryptoKeyConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance build() { + com.google.cloud.datafusion.v1beta1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance buildPartial() { + com.google.cloud.datafusion.v1beta1.Instance result = + new com.google.cloud.datafusion.v1beta1.Instance(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + result.type_ = type_; + result.enableStackdriverLogging_ = enableStackdriverLogging_; + result.enableStackdriverMonitoring_ = enableStackdriverMonitoring_; + result.privateInstance_ = privateInstance_; + if (networkConfigBuilder_ == null) { + result.networkConfig_ = networkConfig_; + } else { + result.networkConfig_ = networkConfigBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.options_ = internalGetOptions(); + result.options_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + result.stateMessage_ = stateMessage_; + result.serviceEndpoint_ = serviceEndpoint_; + result.zone_ = zone_; + result.version_ = version_; + result.serviceAccount_ = serviceAccount_; + result.displayName_ = displayName_; + if (availableVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + availableVersion_ = java.util.Collections.unmodifiableList(availableVersion_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.availableVersion_ = availableVersion_; + } else { + result.availableVersion_ = availableVersionBuilder_.build(); + } + result.apiEndpoint_ = apiEndpoint_; + result.gcsBucket_ = gcsBucket_; + if (acceleratorsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + accelerators_ = java.util.Collections.unmodifiableList(accelerators_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.accelerators_ = accelerators_; + } else { + result.accelerators_ = acceleratorsBuilder_.build(); + } + result.p4ServiceAccount_ = p4ServiceAccount_; + result.tenantProjectId_ = tenantProjectId_; + result.dataprocServiceAccount_ = dataprocServiceAccount_; + result.enableRbac_ = enableRbac_; + if (cryptoKeyConfigBuilder_ == null) { + result.cryptoKeyConfig_ = cryptoKeyConfig_; + } else { + result.cryptoKeyConfig_ = cryptoKeyConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.Instance) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Instance other) { + if (other == com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getEnableStackdriverLogging() != false) { + setEnableStackdriverLogging(other.getEnableStackdriverLogging()); + } + if (other.getEnableStackdriverMonitoring() != false) { + setEnableStackdriverMonitoring(other.getEnableStackdriverMonitoring()); + } + if (other.getPrivateInstance() != false) { + setPrivateInstance(other.getPrivateInstance()); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + internalGetMutableOptions().mergeFrom(other.internalGetOptions()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateMessage().isEmpty()) { + stateMessage_ = other.stateMessage_; + onChanged(); + } + if (!other.getServiceEndpoint().isEmpty()) { + serviceEndpoint_ = other.serviceEndpoint_; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (availableVersionBuilder_ == null) { + if (!other.availableVersion_.isEmpty()) { + if (availableVersion_.isEmpty()) { + availableVersion_ = other.availableVersion_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAvailableVersionIsMutable(); + availableVersion_.addAll(other.availableVersion_); + } + onChanged(); + } + } else { + if (!other.availableVersion_.isEmpty()) { + if (availableVersionBuilder_.isEmpty()) { + availableVersionBuilder_.dispose(); + availableVersionBuilder_ = null; + availableVersion_ = other.availableVersion_; + bitField0_ = (bitField0_ & ~0x00000004); + availableVersionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAvailableVersionFieldBuilder() + : null; + } else { + availableVersionBuilder_.addAllMessages(other.availableVersion_); + } + } + } + if (!other.getApiEndpoint().isEmpty()) { + apiEndpoint_ = other.apiEndpoint_; + onChanged(); + } + if (!other.getGcsBucket().isEmpty()) { + gcsBucket_ = other.gcsBucket_; + onChanged(); + } + if (acceleratorsBuilder_ == null) { + if (!other.accelerators_.isEmpty()) { + if (accelerators_.isEmpty()) { + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAcceleratorsIsMutable(); + accelerators_.addAll(other.accelerators_); + } + onChanged(); + } + } else { + if (!other.accelerators_.isEmpty()) { + if (acceleratorsBuilder_.isEmpty()) { + acceleratorsBuilder_.dispose(); + acceleratorsBuilder_ = null; + accelerators_ = other.accelerators_; + bitField0_ = (bitField0_ & ~0x00000008); + acceleratorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAcceleratorsFieldBuilder() + : null; + } else { + acceleratorsBuilder_.addAllMessages(other.accelerators_); + } + } + } + if (!other.getP4ServiceAccount().isEmpty()) { + p4ServiceAccount_ = other.p4ServiceAccount_; + onChanged(); + } + if (!other.getTenantProjectId().isEmpty()) { + tenantProjectId_ = other.tenantProjectId_; + onChanged(); + } + if (!other.getDataprocServiceAccount().isEmpty()) { + dataprocServiceAccount_ = other.dataprocServiceAccount_; + onChanged(); + } + if (other.getEnableRbac() != false) { + setEnableRbac(other.getEnableRbac()); + } + if (other.hasCryptoKeyConfig()) { + mergeCryptoKeyConfig(other.getCryptoKeyConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this instance is in the form of
+     * projects/{project}/locations/{location}/instances/{instance}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of this instance.
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Instance.Type result = + com.google.cloud.datafusion.v1beta1.Instance.Type.valueOf(type_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Instance.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.datafusion.v1beta1.Instance.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instance type.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private boolean enableStackdriverLogging_; + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + @java.lang.Override + public boolean getEnableStackdriverLogging() { + return enableStackdriverLogging_; + } + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @param value The enableStackdriverLogging to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverLogging(boolean value) { + + enableStackdriverLogging_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable Stackdriver Logging.
+     * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverLogging() { + + enableStackdriverLogging_ = false; + onChanged(); + return this; + } + + private boolean enableStackdriverMonitoring_; + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + @java.lang.Override + public boolean getEnableStackdriverMonitoring() { + return enableStackdriverMonitoring_; + } + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @param value The enableStackdriverMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableStackdriverMonitoring(boolean value) { + + enableStackdriverMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable Stackdriver Monitoring.
+     * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return This builder for chaining. + */ + public Builder clearEnableStackdriverMonitoring() { + + enableStackdriverMonitoring_ = false; + onChanged(); + return this; + } + + private boolean privateInstance_; + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + @java.lang.Override + public boolean getPrivateInstance() { + return privateInstance_; + } + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @param value The privateInstance to set. + * @return This builder for chaining. + */ + public Builder setPrivateInstance(boolean value) { + + privateInstance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies whether the Data Fusion instance should be private. If set to
+     * true, all Data Fusion nodes will have private IP addresses and will not be
+     * able to access the public internet.
+     * 
+ * + * bool private_instance = 6; + * + * @return This builder for chaining. + */ + public Builder clearPrivateInstance() { + + privateInstance_ = false; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1beta1.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.NetworkConfig, + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder> + networkConfigBuilder_; + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return networkConfigBuilder_ != null || networkConfig_ != null; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + public com.google.cloud.datafusion.v1beta1.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public Builder setNetworkConfig(com.google.cloud.datafusion.v1beta1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + onChanged(); + } else { + networkConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public Builder setNetworkConfig( + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + onChanged(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public Builder mergeNetworkConfig(com.google.cloud.datafusion.v1beta1.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (networkConfig_ != null) { + networkConfig_ = + com.google.cloud.datafusion.v1beta1.NetworkConfig.newBuilder(networkConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + networkConfig_ = value; + } + onChanged(); + } else { + networkConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public Builder clearNetworkConfig() { + if (networkConfigBuilder_ == null) { + networkConfig_ = null; + onChanged(); + } else { + networkConfig_ = null; + networkConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder getNetworkConfigBuilder() { + + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + public com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null + ? com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + } + /** + * + * + *
+     * Network configuration options. These are required when a private Data
+     * Fusion instance is to be created.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.NetworkConfig, + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.NetworkConfig, + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder, + com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The resource labels for instance to use to annotate any related underlying
+     * resources such as Compute Engine VMs. The character '=' is not allowed to
+     * be used within the labels.
+     * 
+ * + * map<string, string> labels = 8; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField options_; + + private com.google.protobuf.MapField internalGetOptions() { + if (options_ == null) { + return com.google.protobuf.MapField.emptyMapField(OptionsDefaultEntryHolder.defaultEntry); + } + return options_; + } + + private com.google.protobuf.MapField + internalGetMutableOptions() { + onChanged(); + ; + if (options_ == null) { + options_ = com.google.protobuf.MapField.newMapField(OptionsDefaultEntryHolder.defaultEntry); + } + if (!options_.isMutable()) { + options_ = options_.copy(); + } + return options_; + } + + public int getOptionsCount() { + return internalGetOptions().getMap().size(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public boolean containsOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetOptions().getMap().containsKey(key); + } + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOptions() { + return getOptionsMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.util.Map getOptionsMap() { + return internalGetOptions().getMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + @java.lang.Override + public java.lang.String getOptionsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetOptions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOptions() { + internalGetMutableOptions().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder removeOptions(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableOptions().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOptions() { + return internalGetMutableOptions().getMutableMap(); + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder putOptions(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableOptions().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Map of additional options used to configure the behavior of
+     * Data Fusion instance.
+     * 
+ * + * map<string, string> options = 9; + */ + public Builder putAllOptions(java.util.Map values) { + internalGetMutableOptions().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time the instance was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.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. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.Instance.State result = + com.google.cloud.datafusion.v1beta1.Instance.State.valueOf(state_); + return result == null + ? com.google.cloud.datafusion.v1beta1.Instance.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.datafusion.v1beta1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of this Data Fusion instance.
+     * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateMessage_ = ""; + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + public java.lang.String getStateMessage() { + java.lang.Object ref = stateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + public com.google.protobuf.ByteString getStateMessageBytes() { + java.lang.Object ref = stateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stateMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateMessage() { + + stateMessage_ = getDefaultInstance().getStateMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the current state of this Data
+     * Fusion instance if available.
+     * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateMessage to set. + * @return This builder for chaining. + */ + public Builder setStateMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stateMessage_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceEndpoint_ = ""; + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + public java.lang.String getServiceEndpoint() { + java.lang.Object ref = serviceEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + public com.google.protobuf.ByteString getServiceEndpointBytes() { + java.lang.Object ref = serviceEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setServiceEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceEndpoint() { + + serviceEndpoint_ = getDefaultInstance().getServiceEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the Data Fusion UI is accessible.
+     * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setServiceEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceEndpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the zone in which the Data Fusion instance will be created. Only
+     * DEVELOPER instances use this field.
+     * 
+ * + * string zone = 15; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Current version of Data Fusion.
+     * 
+ * + * string version = 16; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Current version of Data Fusion.
+     * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Current version of Data Fusion.
+     * 
+ * + * string version = 16; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Current version of Data Fusion.
+     * 
+ * + * string version = 16; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Current version of Data Fusion.
+     * 
+ * + * string version = 16; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Deprecated. Use tenant_project_id instead to extract the
+     * tenant project ID.
+     * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for an instance.
+     * 
+ * + * string display_name = 18; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List availableVersion_ = + java.util.Collections.emptyList(); + + private void ensureAvailableVersionIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + availableVersion_ = + new java.util.ArrayList(availableVersion_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder> + availableVersionBuilder_; + + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public java.util.List getAvailableVersionList() { + if (availableVersionBuilder_ == null) { + return java.util.Collections.unmodifiableList(availableVersion_); + } else { + return availableVersionBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public int getAvailableVersionCount() { + if (availableVersionBuilder_ == null) { + return availableVersion_.size(); + } else { + return availableVersionBuilder_.getCount(); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1beta1.Version getAvailableVersion(int index) { + if (availableVersionBuilder_ == null) { + return availableVersion_.get(index); + } else { + return availableVersionBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder setAvailableVersion( + int index, com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.set(index, value); + onChanged(); + } else { + availableVersionBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder setAvailableVersion( + int index, com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.set(index, builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder addAvailableVersion(com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.add(value); + onChanged(); + } else { + availableVersionBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder addAvailableVersion( + int index, com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionIsMutable(); + availableVersion_.add(index, value); + onChanged(); + } else { + availableVersionBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder addAvailableVersion( + com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.add(builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder addAvailableVersion( + int index, com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.add(index, builderForValue.build()); + onChanged(); + } else { + availableVersionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder addAllAvailableVersion( + java.lang.Iterable values) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableVersion_); + onChanged(); + } else { + availableVersionBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder clearAvailableVersion() { + if (availableVersionBuilder_ == null) { + availableVersion_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + availableVersionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public Builder removeAvailableVersion(int index) { + if (availableVersionBuilder_ == null) { + ensureAvailableVersionIsMutable(); + availableVersion_.remove(index); + onChanged(); + } else { + availableVersionBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder getAvailableVersionBuilder( + int index) { + return getAvailableVersionFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionOrBuilder( + int index) { + if (availableVersionBuilder_ == null) { + return availableVersion_.get(index); + } else { + return availableVersionBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public java.util.List + getAvailableVersionOrBuilderList() { + if (availableVersionBuilder_ != null) { + return availableVersionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(availableVersion_); + } + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder addAvailableVersionBuilder() { + return getAvailableVersionFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder addAvailableVersionBuilder( + int index) { + return getAvailableVersionFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Available versions that the instance can be upgraded to using
+     * UpdateInstanceRequest.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + public java.util.List + getAvailableVersionBuilderList() { + return getAvailableVersionFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder> + getAvailableVersionFieldBuilder() { + if (availableVersionBuilder_ == null) { + availableVersionBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder>( + availableVersion_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + availableVersion_ = null; + } + return availableVersionBuilder_; + } + + private java.lang.Object apiEndpoint_ = ""; + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + public java.lang.String getApiEndpoint() { + java.lang.Object ref = apiEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + public com.google.protobuf.ByteString getApiEndpointBytes() { + java.lang.Object ref = apiEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiEndpoint to set. + * @return This builder for chaining. + */ + public Builder setApiEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiEndpoint() { + + apiEndpoint_ = getDefaultInstance().getApiEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Endpoint on which the REST APIs is accessible.
+     * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiEndpoint to set. + * @return This builder for chaining. + */ + public Builder setApiEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiEndpoint_ = value; + onChanged(); + return this; + } + + private java.lang.Object gcsBucket_ = ""; + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + public java.lang.String getGcsBucket() { + java.lang.Object ref = gcsBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + public com.google.protobuf.ByteString getGcsBucketBytes() { + java.lang.Object ref = gcsBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsBucket_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcsBucket() { + + gcsBucket_ = getDefaultInstance().getGcsBucket(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+     * project.
+     * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcsBucket to set. + * @return This builder for chaining. + */ + public Builder setGcsBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsBucket_ = value; + onChanged(); + return this; + } + + private java.util.List accelerators_ = + java.util.Collections.emptyList(); + + private void ensureAcceleratorsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + accelerators_ = + new java.util.ArrayList(accelerators_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Accelerator, + com.google.cloud.datafusion.v1beta1.Accelerator.Builder, + com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder> + acceleratorsBuilder_; + + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public java.util.List getAcceleratorsList() { + if (acceleratorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accelerators_); + } else { + return acceleratorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public int getAcceleratorsCount() { + if (acceleratorsBuilder_ == null) { + return accelerators_.size(); + } else { + return acceleratorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1beta1.Accelerator getAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder setAccelerators( + int index, com.google.cloud.datafusion.v1beta1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.set(index, value); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder setAccelerators( + int index, com.google.cloud.datafusion.v1beta1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.set(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder addAccelerators(com.google.cloud.datafusion.v1beta1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder addAccelerators( + int index, com.google.cloud.datafusion.v1beta1.Accelerator value) { + if (acceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceleratorsIsMutable(); + accelerators_.add(index, value); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder addAccelerators( + com.google.cloud.datafusion.v1beta1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder addAccelerators( + int index, com.google.cloud.datafusion.v1beta1.Accelerator.Builder builderForValue) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(index, builderForValue.build()); + onChanged(); + } else { + acceleratorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder addAllAccelerators( + java.lang.Iterable values) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); + onChanged(); + } else { + acceleratorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder clearAccelerators() { + if (acceleratorsBuilder_ == null) { + accelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + acceleratorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public Builder removeAccelerators(int index) { + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.remove(index); + onChanged(); + } else { + acceleratorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1beta1.Accelerator.Builder getAcceleratorsBuilder( + int index) { + return getAcceleratorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder getAcceleratorsOrBuilder( + int index) { + if (acceleratorsBuilder_ == null) { + return accelerators_.get(index); + } else { + return acceleratorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public java.util.List + getAcceleratorsOrBuilderList() { + if (acceleratorsBuilder_ != null) { + return acceleratorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accelerators_); + } + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1beta1.Accelerator.Builder addAcceleratorsBuilder() { + return getAcceleratorsFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public com.google.cloud.datafusion.v1beta1.Accelerator.Builder addAcceleratorsBuilder( + int index) { + return getAcceleratorsFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.Accelerator.getDefaultInstance()); + } + /** + * + * + *
+     * List of accelerators enabled for this CDF instance.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + public java.util.List + getAcceleratorsBuilderList() { + return getAcceleratorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Accelerator, + com.google.cloud.datafusion.v1beta1.Accelerator.Builder, + com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder> + getAcceleratorsFieldBuilder() { + if (acceleratorsBuilder_ == null) { + acceleratorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Accelerator, + com.google.cloud.datafusion.v1beta1.Accelerator.Builder, + com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder>( + accelerators_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + accelerators_ = null; + } + return acceleratorsBuilder_; + } + + private java.lang.Object p4ServiceAccount_ = ""; + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + public java.lang.String getP4ServiceAccount() { + java.lang.Object ref = p4ServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + p4ServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + public com.google.protobuf.ByteString getP4ServiceAccountBytes() { + java.lang.Object ref = p4ServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + p4ServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p4ServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setP4ServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + p4ServiceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP4ServiceAccount() { + + p4ServiceAccount_ = getDefaultInstance().getP4ServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. P4 service account for the customer project.
+     * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for p4ServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setP4ServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + p4ServiceAccount_ = value; + onChanged(); + return this; + } + + private java.lang.Object tenantProjectId_ = ""; + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + public java.lang.String getTenantProjectId() { + java.lang.Object ref = tenantProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tenantProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + public com.google.protobuf.ByteString getTenantProjectIdBytes() { + java.lang.Object ref = tenantProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tenantProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tenantProjectId to set. + * @return This builder for chaining. + */ + public Builder setTenantProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tenantProjectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTenantProjectId() { + + tenantProjectId_ = getDefaultInstance().getTenantProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the tenant project.
+     * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for tenantProjectId to set. + * @return This builder for chaining. + */ + public Builder setTenantProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tenantProjectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object dataprocServiceAccount_ = ""; + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + public java.lang.String getDataprocServiceAccount() { + java.lang.Object ref = dataprocServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataprocServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + public com.google.protobuf.ByteString getDataprocServiceAccountBytes() { + java.lang.Object ref = dataprocServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataprocServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @param value The dataprocServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setDataprocServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataprocServiceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @return This builder for chaining. + */ + public Builder clearDataprocServiceAccount() { + + dataprocServiceAccount_ = getDefaultInstance().getDataprocServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * User-managed service account to set on Dataproc when Cloud Data Fusion
+     * creates Dataproc to run data processing pipelines.
+     * This allows users to have fine-grained access control on Dataproc's
+     * accesses to cloud resources.
+     * 
+ * + * string dataproc_service_account = 25; + * + * @param value The bytes for dataprocServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setDataprocServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataprocServiceAccount_ = value; + onChanged(); + return this; + } + + private boolean enableRbac_; + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 26; + * + * @return The enableRbac. + */ + @java.lang.Override + public boolean getEnableRbac() { + return enableRbac_; + } + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 26; + * + * @param value The enableRbac to set. + * @return This builder for chaining. + */ + public Builder setEnableRbac(boolean value) { + + enableRbac_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to enable granular role-based access control.
+     * 
+ * + * bool enable_rbac = 26; + * + * @return This builder for chaining. + */ + public Builder clearEnableRbac() { + + enableRbac_ = false; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1beta1.CryptoKeyConfig cryptoKeyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder> + cryptoKeyConfigBuilder_; + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return Whether the cryptoKeyConfig field is set. + */ + public boolean hasCryptoKeyConfig() { + return cryptoKeyConfigBuilder_ != null || cryptoKeyConfig_ != null; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return The cryptoKeyConfig. + */ + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getCryptoKeyConfig() { + if (cryptoKeyConfigBuilder_ == null) { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } else { + return cryptoKeyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public Builder setCryptoKeyConfig(com.google.cloud.datafusion.v1beta1.CryptoKeyConfig value) { + if (cryptoKeyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cryptoKeyConfig_ = value; + onChanged(); + } else { + cryptoKeyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public Builder setCryptoKeyConfig( + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder builderForValue) { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public Builder mergeCryptoKeyConfig(com.google.cloud.datafusion.v1beta1.CryptoKeyConfig value) { + if (cryptoKeyConfigBuilder_ == null) { + if (cryptoKeyConfig_ != null) { + cryptoKeyConfig_ = + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.newBuilder(cryptoKeyConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + cryptoKeyConfig_ = value; + } + onChanged(); + } else { + cryptoKeyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public Builder clearCryptoKeyConfig() { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfig_ = null; + onChanged(); + } else { + cryptoKeyConfig_ = null; + cryptoKeyConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder getCryptoKeyConfigBuilder() { + + onChanged(); + return getCryptoKeyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + public com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder + getCryptoKeyConfigOrBuilder() { + if (cryptoKeyConfigBuilder_ != null) { + return cryptoKeyConfigBuilder_.getMessageOrBuilder(); + } else { + return cryptoKeyConfig_ == null + ? com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.getDefaultInstance() + : cryptoKeyConfig_; + } + } + /** + * + * + *
+     * The crypto key configuration. This field is used by the Customer-Managed
+     * Encryption Keys (CMEK) feature.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder> + getCryptoKeyConfigFieldBuilder() { + if (cryptoKeyConfigBuilder_ == null) { + cryptoKeyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig.Builder, + com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder>( + getCryptoKeyConfig(), getParentForChildren(), isClean()); + cryptoKeyConfig_ = null; + } + return cryptoKeyConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.Instance) + private static final com.google.cloud.datafusion.v1beta1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.Instance(); + } + + public static com.google.cloud.datafusion.v1beta1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceName.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceName.java new file mode 100644 index 00000000..a46e65f3 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +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 InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + 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 (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.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 (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + 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(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java new file mode 100644 index 00000000..c21ad659 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/InstanceOrBuilder.java @@ -0,0 +1,868 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this instance is in the form of
+   * projects/{project}/locations/{location}/instances/{instance}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of this instance.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Instance type.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.datafusion.v1beta1.Instance.Type getType(); + + /** + * + * + *
+   * Option to enable Stackdriver Logging.
+   * 
+ * + * bool enable_stackdriver_logging = 4; + * + * @return The enableStackdriverLogging. + */ + boolean getEnableStackdriverLogging(); + + /** + * + * + *
+   * Option to enable Stackdriver Monitoring.
+   * 
+ * + * bool enable_stackdriver_monitoring = 5; + * + * @return The enableStackdriverMonitoring. + */ + boolean getEnableStackdriverMonitoring(); + + /** + * + * + *
+   * Specifies whether the Data Fusion instance should be private. If set to
+   * true, all Data Fusion nodes will have private IP addresses and will not be
+   * able to access the public internet.
+   * 
+ * + * bool private_instance = 6; + * + * @return The privateInstance. + */ + boolean getPrivateInstance(); + + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + * + * @return The networkConfig. + */ + com.google.cloud.datafusion.v1beta1.NetworkConfig getNetworkConfig(); + /** + * + * + *
+   * Network configuration options. These are required when a private Data
+   * Fusion instance is to be created.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NetworkConfig network_config = 7; + */ + com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder getNetworkConfigOrBuilder(); + + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + int getLabelsCount(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The resource labels for instance to use to annotate any related underlying
+   * resources such as Compute Engine VMs. The character '=' is not allowed to
+   * be used within the labels.
+   * 
+ * + * map<string, string> labels = 8; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + int getOptionsCount(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + boolean containsOptions(java.lang.String key); + /** Use {@link #getOptionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOptions(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.util.Map getOptionsMap(); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.lang.String getOptionsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Map of additional options used to configure the behavior of
+   * Data Fusion instance.
+   * 
+ * + * map<string, string> options = 9; + */ + java.lang.String getOptionsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time the instance was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of this Data Fusion instance.
+   * 
+ * + * + * .google.cloud.datafusion.v1beta1.Instance.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.datafusion.v1beta1.Instance.State getState(); + + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateMessage. + */ + java.lang.String getStateMessage(); + /** + * + * + *
+   * Output only. Additional information about the current state of this Data
+   * Fusion instance if available.
+   * 
+ * + * string state_message = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateMessage. + */ + com.google.protobuf.ByteString getStateMessageBytes(); + + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceEndpoint. + */ + java.lang.String getServiceEndpoint(); + /** + * + * + *
+   * Output only. Endpoint on which the Data Fusion UI is accessible.
+   * 
+ * + * string service_endpoint = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceEndpoint. + */ + com.google.protobuf.ByteString getServiceEndpointBytes(); + + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Name of the zone in which the Data Fusion instance will be created. Only
+   * DEVELOPER instances use this field.
+   * 
+ * + * string zone = 15; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Current version of Data Fusion.
+   * 
+ * + * string version = 16; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Current version of Data Fusion.
+   * 
+ * + * string version = 16; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceAccount. + */ + @java.lang.Deprecated + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. Deprecated. Use tenant_project_id instead to extract the
+   * tenant project ID.
+   * 
+ * + * + * string service_account = 17 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for an instance.
+   * 
+ * + * string display_name = 18; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + java.util.List getAvailableVersionList(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + com.google.cloud.datafusion.v1beta1.Version getAvailableVersion(int index); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + int getAvailableVersionCount(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + java.util.List + getAvailableVersionOrBuilderList(); + /** + * + * + *
+   * Available versions that the instance can be upgraded to using
+   * UpdateInstanceRequest.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_version = 19; + */ + com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionOrBuilder(int index); + + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiEndpoint. + */ + java.lang.String getApiEndpoint(); + /** + * + * + *
+   * Output only. Endpoint on which the REST APIs is accessible.
+   * 
+ * + * string api_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiEndpoint. + */ + com.google.protobuf.ByteString getApiEndpointBytes(); + + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcsBucket. + */ + java.lang.String getGcsBucket(); + /** + * + * + *
+   * Output only. Cloud Storage bucket generated by Data Fusion in the customer
+   * project.
+   * 
+ * + * string gcs_bucket = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcsBucket. + */ + com.google.protobuf.ByteString getGcsBucketBytes(); + + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + java.util.List getAcceleratorsList(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + com.google.cloud.datafusion.v1beta1.Accelerator getAccelerators(int index); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + int getAcceleratorsCount(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + java.util.List + getAcceleratorsOrBuilderList(); + /** + * + * + *
+   * List of accelerators enabled for this CDF instance.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; + */ + com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index); + + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p4ServiceAccount. + */ + java.lang.String getP4ServiceAccount(); + /** + * + * + *
+   * Output only. P4 service account for the customer project.
+   * 
+ * + * string p4_service_account = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for p4ServiceAccount. + */ + com.google.protobuf.ByteString getP4ServiceAccountBytes(); + + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tenantProjectId. + */ + java.lang.String getTenantProjectId(); + /** + * + * + *
+   * Output only. The name of the tenant project.
+   * 
+ * + * string tenant_project_id = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tenantProjectId. + */ + com.google.protobuf.ByteString getTenantProjectIdBytes(); + + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The dataprocServiceAccount. + */ + java.lang.String getDataprocServiceAccount(); + /** + * + * + *
+   * User-managed service account to set on Dataproc when Cloud Data Fusion
+   * creates Dataproc to run data processing pipelines.
+   * This allows users to have fine-grained access control on Dataproc's
+   * accesses to cloud resources.
+   * 
+ * + * string dataproc_service_account = 25; + * + * @return The bytes for dataprocServiceAccount. + */ + com.google.protobuf.ByteString getDataprocServiceAccountBytes(); + + /** + * + * + *
+   * Option to enable granular role-based access control.
+   * 
+ * + * bool enable_rbac = 26; + * + * @return The enableRbac. + */ + boolean getEnableRbac(); + + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return Whether the cryptoKeyConfig field is set. + */ + boolean hasCryptoKeyConfig(); + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + * + * @return The cryptoKeyConfig. + */ + com.google.cloud.datafusion.v1beta1.CryptoKeyConfig getCryptoKeyConfig(); + /** + * + * + *
+   * The crypto key configuration. This field is used by the Customer-Managed
+   * Encryption Keys (CMEK) feature.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.CryptoKeyConfig crypto_key_config = 27; + */ + com.google.cloud.datafusion.v1beta1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java new file mode 100644 index 00000000..9b81dabe --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequest.java @@ -0,0 +1,1025 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for the list available versions request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest} + */ +public final class ListAvailableVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + ListAvailableVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAvailableVersionsRequest.newBuilder() to construct. + private ListAvailableVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAvailableVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAvailableVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAvailableVersionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + latestPatchOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.class, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LATEST_PATCH_ONLY_FIELD_NUMBER = 4; + private boolean latestPatchOnly_; + /** + * + * + *
+   * Whether or not to return the latest patch of every available minor version.
+   * If true, only the latest patch will be returned. Ex. if allowed versions is
+   * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+   * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + @java.lang.Override + public boolean getLatestPatchOnly() { + return latestPatchOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (latestPatchOnly_ != false) { + output.writeBool(4, latestPatchOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (latestPatchOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, latestPatchOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest other = + (com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getLatestPatchOnly() != other.getLatestPatchOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + LATEST_PATCH_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLatestPatchOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for the list available versions request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.class, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + latestPatchOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest build() { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest result = + new com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.latestPatchOnly_ = latestPatchOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest other) { + if (other + == com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getLatestPatchOnly() != false) { + setLatestPatchOnly(other.getLatestPatchOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location for which to retrieve instance
+     * information in the format projects/{project}/locations/{location}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private boolean latestPatchOnly_; + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + @java.lang.Override + public boolean getLatestPatchOnly() { + return latestPatchOnly_; + } + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @param value The latestPatchOnly to set. + * @return This builder for chaining. + */ + public Builder setLatestPatchOnly(boolean value) { + + latestPatchOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not to return the latest patch of every available minor version.
+     * If true, only the latest patch will be returned. Ex. if allowed versions is
+     * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+     * 
+ * + * bool latest_patch_only = 4; + * + * @return This builder for chaining. + */ + public Builder clearLatestPatchOnly() { + + latestPatchOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + private static final com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAvailableVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAvailableVersionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java new file mode 100644 index 00000000..75c325cb --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListAvailableVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListAvailableVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location for which to retrieve instance
+   * information in the format projects/{project}/locations/{location}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether or not to return the latest patch of every available minor version.
+   * If true, only the latest patch will be returned. Ex. if allowed versions is
+   * [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
+   * 
+ * + * bool latest_patch_only = 4; + * + * @return The latestPatchOnly. + */ + boolean getLatestPatchOnly(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponse.java new file mode 100644 index 00000000..29feab49 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Response message for the list available versions request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse} + */ +public final class ListAvailableVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + ListAvailableVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAvailableVersionsResponse.newBuilder() to construct. + private ListAvailableVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAvailableVersionsResponse() { + availableVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAvailableVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAvailableVersionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + availableVersions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + availableVersions_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.Version.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + availableVersions_ = java.util.Collections.unmodifiableList(availableVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.class, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.Builder.class); + } + + public static final int AVAILABLE_VERSIONS_FIELD_NUMBER = 1; + private java.util.List availableVersions_; + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + @java.lang.Override + public java.util.List getAvailableVersionsList() { + return availableVersions_; + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + @java.lang.Override + public java.util.List + getAvailableVersionsOrBuilderList() { + return availableVersions_; + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + @java.lang.Override + public int getAvailableVersionsCount() { + return availableVersions_.size(); + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version getAvailableVersions(int index) { + return availableVersions_.get(index); + } + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionsOrBuilder( + int index) { + return availableVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < availableVersions_.size(); i++) { + output.writeMessage(1, availableVersions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < availableVersions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, availableVersions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse other = + (com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) obj; + + if (!getAvailableVersionsList().equals(other.getAvailableVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvailableVersionsCount() > 0) { + hash = (37 * hash) + AVAILABLE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for the list available versions request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.class, + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAvailableVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (availableVersionsBuilder_ == null) { + availableVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + availableVersionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse build() { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse result = + new com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (availableVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + availableVersions_ = java.util.Collections.unmodifiableList(availableVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.availableVersions_ = availableVersions_; + } else { + result.availableVersions_ = availableVersionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse other) { + if (other + == com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse.getDefaultInstance()) + return this; + if (availableVersionsBuilder_ == null) { + if (!other.availableVersions_.isEmpty()) { + if (availableVersions_.isEmpty()) { + availableVersions_ = other.availableVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAvailableVersionsIsMutable(); + availableVersions_.addAll(other.availableVersions_); + } + onChanged(); + } + } else { + if (!other.availableVersions_.isEmpty()) { + if (availableVersionsBuilder_.isEmpty()) { + availableVersionsBuilder_.dispose(); + availableVersionsBuilder_ = null; + availableVersions_ = other.availableVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + availableVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAvailableVersionsFieldBuilder() + : null; + } else { + availableVersionsBuilder_.addAllMessages(other.availableVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List availableVersions_ = + java.util.Collections.emptyList(); + + private void ensureAvailableVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + availableVersions_ = + new java.util.ArrayList( + availableVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder> + availableVersionsBuilder_; + + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public java.util.List getAvailableVersionsList() { + if (availableVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(availableVersions_); + } else { + return availableVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public int getAvailableVersionsCount() { + if (availableVersionsBuilder_ == null) { + return availableVersions_.size(); + } else { + return availableVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1beta1.Version getAvailableVersions(int index) { + if (availableVersionsBuilder_ == null) { + return availableVersions_.get(index); + } else { + return availableVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder setAvailableVersions( + int index, com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.set(index, value); + onChanged(); + } else { + availableVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder setAvailableVersions( + int index, com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder addAvailableVersions(com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.add(value); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder addAvailableVersions( + int index, com.google.cloud.datafusion.v1beta1.Version value) { + if (availableVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableVersionsIsMutable(); + availableVersions_.add(index, value); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder addAvailableVersions( + com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.add(builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder addAvailableVersions( + int index, com.google.cloud.datafusion.v1beta1.Version.Builder builderForValue) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + availableVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder addAllAvailableVersions( + java.lang.Iterable values) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableVersions_); + onChanged(); + } else { + availableVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder clearAvailableVersions() { + if (availableVersionsBuilder_ == null) { + availableVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + availableVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public Builder removeAvailableVersions(int index) { + if (availableVersionsBuilder_ == null) { + ensureAvailableVersionsIsMutable(); + availableVersions_.remove(index); + onChanged(); + } else { + availableVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder getAvailableVersionsBuilder( + int index) { + return getAvailableVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionsOrBuilder( + int index) { + if (availableVersionsBuilder_ == null) { + return availableVersions_.get(index); + } else { + return availableVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public java.util.List + getAvailableVersionsOrBuilderList() { + if (availableVersionsBuilder_ != null) { + return availableVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(availableVersions_); + } + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder addAvailableVersionsBuilder() { + return getAvailableVersionsFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public com.google.cloud.datafusion.v1beta1.Version.Builder addAvailableVersionsBuilder( + int index) { + return getAvailableVersionsFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of versions that are supported.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + public java.util.List + getAvailableVersionsBuilderList() { + return getAvailableVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder> + getAvailableVersionsFieldBuilder() { + if (availableVersionsBuilder_ == null) { + availableVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Version, + com.google.cloud.datafusion.v1beta1.Version.Builder, + com.google.cloud.datafusion.v1beta1.VersionOrBuilder>( + availableVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + availableVersions_ = null; + } + return availableVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + private static final com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAvailableVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAvailableVersionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponseOrBuilder.java new file mode 100644 index 00000000..5019936e --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListAvailableVersionsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListAvailableVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListAvailableVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + java.util.List getAvailableVersionsList(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + com.google.cloud.datafusion.v1beta1.Version getAvailableVersions(int index); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + int getAvailableVersionsCount(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + java.util.List + getAvailableVersionsOrBuilderList(); + /** + * + * + *
+   * Represents a list of versions that are supported.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Version available_versions = 1; + */ + com.google.cloud.datafusion.v1beta1.VersionOrBuilder getAvailableVersionsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequest.java new file mode 100644 index 00000000..9dc64875 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequest.java @@ -0,0 +1,927 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * List dns peering request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest} + */ +public final class ListDnsPeeringsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) + ListDnsPeeringsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDnsPeeringsRequest.newBuilder() to construct. + private ListDnsPeeringsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDnsPeeringsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDnsPeeringsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDnsPeeringsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.class, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource on which dns peering will be listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource on which dns peering will be listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest other = + (com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List dns peering request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.class, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest build() { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest result = + new com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource on which dns peering will be listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource on which dns peering will be listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource on which dns peering will be listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource on which dns peering will be listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource on which dns peering will be listed.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) + private static final com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDnsPeeringsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDnsPeeringsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequestOrBuilder.java new file mode 100644 index 00000000..a49520b7 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListDnsPeeringsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListDnsPeeringsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource on which dns peering will be listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource on which dns peering will be listed.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponse.java new file mode 100644 index 00000000..2373ba14 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponse.java @@ -0,0 +1,1141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * List dns peering response.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse} + */ +public final class ListDnsPeeringsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) + ListDnsPeeringsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDnsPeeringsResponse.newBuilder() to construct. + private ListDnsPeeringsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDnsPeeringsResponse() { + dnsPeerings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDnsPeeringsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDnsPeeringsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dnsPeerings_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dnsPeerings_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.DnsPeering.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dnsPeerings_ = java.util.Collections.unmodifiableList(dnsPeerings_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.class, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.Builder.class); + } + + public static final int DNS_PEERINGS_FIELD_NUMBER = 1; + private java.util.List dnsPeerings_; + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + @java.lang.Override + public java.util.List getDnsPeeringsList() { + return dnsPeerings_; + } + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + @java.lang.Override + public java.util.List + getDnsPeeringsOrBuilderList() { + return dnsPeerings_; + } + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + @java.lang.Override + public int getDnsPeeringsCount() { + return dnsPeerings_.size(); + } + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeerings(int index) { + return dnsPeerings_.get(index); + } + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringsOrBuilder( + int index) { + return dnsPeerings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dnsPeerings_.size(); i++) { + output.writeMessage(1, dnsPeerings_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dnsPeerings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dnsPeerings_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse other = + (com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) obj; + + if (!getDnsPeeringsList().equals(other.getDnsPeeringsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDnsPeeringsCount() > 0) { + hash = (37 * hash) + DNS_PEERINGS_FIELD_NUMBER; + hash = (53 * hash) + getDnsPeeringsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List dns peering response.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.class, + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDnsPeeringsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dnsPeeringsBuilder_ == null) { + dnsPeerings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dnsPeeringsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse build() { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse result = + new com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse(this); + int from_bitField0_ = bitField0_; + if (dnsPeeringsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dnsPeerings_ = java.util.Collections.unmodifiableList(dnsPeerings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dnsPeerings_ = dnsPeerings_; + } else { + result.dnsPeerings_ = dnsPeeringsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse other) { + if (other == com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse.getDefaultInstance()) + return this; + if (dnsPeeringsBuilder_ == null) { + if (!other.dnsPeerings_.isEmpty()) { + if (dnsPeerings_.isEmpty()) { + dnsPeerings_ = other.dnsPeerings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDnsPeeringsIsMutable(); + dnsPeerings_.addAll(other.dnsPeerings_); + } + onChanged(); + } + } else { + if (!other.dnsPeerings_.isEmpty()) { + if (dnsPeeringsBuilder_.isEmpty()) { + dnsPeeringsBuilder_.dispose(); + dnsPeeringsBuilder_ = null; + dnsPeerings_ = other.dnsPeerings_; + bitField0_ = (bitField0_ & ~0x00000001); + dnsPeeringsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDnsPeeringsFieldBuilder() + : null; + } else { + dnsPeeringsBuilder_.addAllMessages(other.dnsPeerings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dnsPeerings_ = + java.util.Collections.emptyList(); + + private void ensureDnsPeeringsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dnsPeerings_ = + new java.util.ArrayList(dnsPeerings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder> + dnsPeeringsBuilder_; + + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public java.util.List getDnsPeeringsList() { + if (dnsPeeringsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dnsPeerings_); + } else { + return dnsPeeringsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public int getDnsPeeringsCount() { + if (dnsPeeringsBuilder_ == null) { + return dnsPeerings_.size(); + } else { + return dnsPeeringsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeerings(int index) { + if (dnsPeeringsBuilder_ == null) { + return dnsPeerings_.get(index); + } else { + return dnsPeeringsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder setDnsPeerings(int index, com.google.cloud.datafusion.v1beta1.DnsPeering value) { + if (dnsPeeringsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsPeeringsIsMutable(); + dnsPeerings_.set(index, value); + onChanged(); + } else { + dnsPeeringsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder setDnsPeerings( + int index, com.google.cloud.datafusion.v1beta1.DnsPeering.Builder builderForValue) { + if (dnsPeeringsBuilder_ == null) { + ensureDnsPeeringsIsMutable(); + dnsPeerings_.set(index, builderForValue.build()); + onChanged(); + } else { + dnsPeeringsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder addDnsPeerings(com.google.cloud.datafusion.v1beta1.DnsPeering value) { + if (dnsPeeringsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsPeeringsIsMutable(); + dnsPeerings_.add(value); + onChanged(); + } else { + dnsPeeringsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder addDnsPeerings(int index, com.google.cloud.datafusion.v1beta1.DnsPeering value) { + if (dnsPeeringsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDnsPeeringsIsMutable(); + dnsPeerings_.add(index, value); + onChanged(); + } else { + dnsPeeringsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder addDnsPeerings( + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder builderForValue) { + if (dnsPeeringsBuilder_ == null) { + ensureDnsPeeringsIsMutable(); + dnsPeerings_.add(builderForValue.build()); + onChanged(); + } else { + dnsPeeringsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder addDnsPeerings( + int index, com.google.cloud.datafusion.v1beta1.DnsPeering.Builder builderForValue) { + if (dnsPeeringsBuilder_ == null) { + ensureDnsPeeringsIsMutable(); + dnsPeerings_.add(index, builderForValue.build()); + onChanged(); + } else { + dnsPeeringsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder addAllDnsPeerings( + java.lang.Iterable values) { + if (dnsPeeringsBuilder_ == null) { + ensureDnsPeeringsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dnsPeerings_); + onChanged(); + } else { + dnsPeeringsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder clearDnsPeerings() { + if (dnsPeeringsBuilder_ == null) { + dnsPeerings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dnsPeeringsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public Builder removeDnsPeerings(int index) { + if (dnsPeeringsBuilder_ == null) { + ensureDnsPeeringsIsMutable(); + dnsPeerings_.remove(index); + onChanged(); + } else { + dnsPeeringsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering.Builder getDnsPeeringsBuilder(int index) { + return getDnsPeeringsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringsOrBuilder( + int index) { + if (dnsPeeringsBuilder_ == null) { + return dnsPeerings_.get(index); + } else { + return dnsPeeringsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public java.util.List + getDnsPeeringsOrBuilderList() { + if (dnsPeeringsBuilder_ != null) { + return dnsPeeringsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dnsPeerings_); + } + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering.Builder addDnsPeeringsBuilder() { + return getDnsPeeringsFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance()); + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public com.google.cloud.datafusion.v1beta1.DnsPeering.Builder addDnsPeeringsBuilder(int index) { + return getDnsPeeringsFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.DnsPeering.getDefaultInstance()); + } + /** + * + * + *
+     * List of dns peering configs.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + public java.util.List + getDnsPeeringsBuilderList() { + return getDnsPeeringsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder> + getDnsPeeringsFieldBuilder() { + if (dnsPeeringsBuilder_ == null) { + dnsPeeringsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.DnsPeering, + com.google.cloud.datafusion.v1beta1.DnsPeering.Builder, + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder>( + dnsPeerings_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dnsPeerings_ = null; + } + return dnsPeeringsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) + private static final com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDnsPeeringsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDnsPeeringsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponseOrBuilder.java new file mode 100644 index 00000000..cf7128bb --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListDnsPeeringsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListDnsPeeringsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListDnsPeeringsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + java.util.List getDnsPeeringsList(); + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + com.google.cloud.datafusion.v1beta1.DnsPeering getDnsPeerings(int index); + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + int getDnsPeeringsCount(); + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + java.util.List + getDnsPeeringsOrBuilderList(); + /** + * + * + *
+   * List of dns peering configs.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.DnsPeering dns_peerings = 1; + */ + com.google.cloud.datafusion.v1beta1.DnsPeeringOrBuilder getDnsPeeringsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java new file mode 100644 index 00000000..2cd47d4b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequest.java @@ -0,0 +1,1292 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for listing Data Fusion instances.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest.class, + com.google.cloud.datafusion.v1beta1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListInstancesRequest other = + (com.google.cloud.datafusion.v1beta1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for listing Data Fusion instances.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListInstancesRequest) + com.google.cloud.datafusion.v1beta1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListInstancesRequest.class, + com.google.cloud.datafusion.v1beta1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListInstancesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesRequest build() { + com.google.cloud.datafusion.v1beta1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.ListInstancesRequest result = + new com.google.cloud.datafusion.v1beta1.ListInstancesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListInstancesRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListInstancesRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.ListInstancesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListInstancesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListInstancesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The project and location for which to retrieve instance information
+     * in the format projects/{project}/locations/{location}. If the location is
+     * specified as '-' (wildcard), then all regions available to the project
+     * are queried, and the results are aggregated.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListInstancesRequest) + private static final com.google.cloud.datafusion.v1beta1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListInstancesRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java new file mode 100644 index 00000000..92f11c7e --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The project and location for which to retrieve instance information
+   * in the format projects/{project}/locations/{location}. If the location is
+   * specified as '-' (wildcard), then all regions available to the project
+   * are queried, and the results are aggregated.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc",  or "" (unsorted).
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponse.java new file mode 100644 index 00000000..7cac37b5 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponse.java @@ -0,0 +1,1415 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Response message for the list instance request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.Instance.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListInstancesResponse.class, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + private java.util.List instances_; + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListInstancesResponse other = + (com.google.cloud.datafusion.v1beta1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListInstancesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for the list instance request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListInstancesResponse) + com.google.cloud.datafusion.v1beta1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListInstancesResponse.class, + com.google.cloud.datafusion.v1beta1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListInstancesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instancesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesResponse build() { + com.google.cloud.datafusion.v1beta1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.ListInstancesResponse result = + new com.google.cloud.datafusion.v1beta1.ListInstancesResponse(this); + int from_bitField0_ = bitField0_; + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListInstancesResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListInstancesResponse other) { + if (other == com.google.cloud.datafusion.v1beta1.ListInstancesResponse.getDefaultInstance()) + return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListInstancesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListInstancesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = + new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1beta1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.datafusion.v1beta1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.datafusion.v1beta1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.datafusion.v1beta1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder addInstances( + com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1beta1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1beta1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public com.google.cloud.datafusion.v1beta1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * Represents a list of Data Fusion instances.
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListInstancesResponse) + private static final com.google.cloud.datafusion.v1beta1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListInstancesResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponseOrBuilder.java new file mode 100644 index 00000000..7192e421 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + com.google.cloud.datafusion.v1beta1.Instance getInstances(int index); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + int getInstancesCount(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + java.util.List + getInstancesOrBuilderList(); + /** + * + * + *
+   * Represents a list of Data Fusion instances.
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Instance instances = 1; + */ + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequest.java new file mode 100644 index 00000000..bf0836c2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequest.java @@ -0,0 +1,1104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * List namespaces request.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListNamespacesRequest} + */ +public final class ListNamespacesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListNamespacesRequest) + ListNamespacesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNamespacesRequest.newBuilder() to construct. + private ListNamespacesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNamespacesRequest() { + parent_ = ""; + pageToken_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNamespacesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListNamespacesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.class, + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The instance to list its namespaces.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The instance to list its namespaces.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 4; + private int view_; + /** + * + * + *
+   * By default, only basic information about a namespace is returned
+   * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+   * information associated with a namespace gets returned
+   * (e.g. IAM policy set on the namespace)
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * By default, only basic information about a namespace is returned
+   * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+   * information associated with a namespace gets returned
+   * (e.g. IAM policy set on the namespace)
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NamespaceView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.NamespaceView result = + com.google.cloud.datafusion.v1beta1.NamespaceView.valueOf(view_); + return result == null ? com.google.cloud.datafusion.v1beta1.NamespaceView.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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (view_ + != com.google.cloud.datafusion.v1beta1.NamespaceView.NAMESPACE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (view_ + != com.google.cloud.datafusion.v1beta1.NamespaceView.NAMESPACE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListNamespacesRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest other = + (com.google.cloud.datafusion.v1beta1.ListNamespacesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (view_ != other.view_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List namespaces request.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListNamespacesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListNamespacesRequest) + com.google.cloud.datafusion.v1beta1.ListNamespacesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.class, + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesRequest build() { + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest result = + new com.google.cloud.datafusion.v1beta1.ListNamespacesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.view_ = view_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListNamespacesRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListNamespacesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListNamespacesRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.ListNamespacesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListNamespacesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListNamespacesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The instance to list its namespaces.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The instance to list its namespaces.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The instance to list its namespaces.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance to list its namespaces.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The instance to list its namespaces.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * By default, only basic information about a namespace is returned
+     * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+     * information associated with a namespace gets returned
+     * (e.g. IAM policy set on the namespace)
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * By default, only basic information about a namespace is returned
+     * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+     * information associated with a namespace gets returned
+     * (e.g. IAM policy set on the namespace)
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * By default, only basic information about a namespace is returned
+     * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+     * information associated with a namespace gets returned
+     * (e.g. IAM policy set on the namespace)
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NamespaceView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.datafusion.v1beta1.NamespaceView result = + com.google.cloud.datafusion.v1beta1.NamespaceView.valueOf(view_); + return result == null + ? com.google.cloud.datafusion.v1beta1.NamespaceView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * By default, only basic information about a namespace is returned
+     * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+     * information associated with a namespace gets returned
+     * (e.g. IAM policy set on the namespace)
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.datafusion.v1beta1.NamespaceView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * By default, only basic information about a namespace is returned
+     * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+     * information associated with a namespace gets returned
+     * (e.g. IAM policy set on the namespace)
+     * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListNamespacesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListNamespacesRequest) + private static final com.google.cloud.datafusion.v1beta1.ListNamespacesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListNamespacesRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNamespacesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListNamespacesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequestOrBuilder.java new file mode 100644 index 00000000..3dd8e241 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesRequestOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListNamespacesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListNamespacesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The instance to list its namespaces.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The instance to list its namespaces.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * By default, only basic information about a namespace is returned
+   * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+   * information associated with a namespace gets returned
+   * (e.g. IAM policy set on the namespace)
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * By default, only basic information about a namespace is returned
+   * (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional
+   * information associated with a namespace gets returned
+   * (e.g. IAM policy set on the namespace)
+   * 
+ * + * .google.cloud.datafusion.v1beta1.NamespaceView view = 4; + * + * @return The view. + */ + com.google.cloud.datafusion.v1beta1.NamespaceView getView(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponse.java new file mode 100644 index 00000000..81039d30 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponse.java @@ -0,0 +1,1140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * List namespaces response.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListNamespacesResponse} + */ +public final class ListNamespacesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.ListNamespacesResponse) + ListNamespacesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNamespacesResponse.newBuilder() to construct. + private ListNamespacesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNamespacesResponse() { + namespaces_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNamespacesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListNamespacesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + namespaces_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + namespaces_.add( + input.readMessage( + com.google.cloud.datafusion.v1beta1.Namespace.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + namespaces_ = java.util.Collections.unmodifiableList(namespaces_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.class, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.Builder.class); + } + + public static final int NAMESPACES_FIELD_NUMBER = 1; + private java.util.List namespaces_; + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + @java.lang.Override + public java.util.List getNamespacesList() { + return namespaces_; + } + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + @java.lang.Override + public java.util.List + getNamespacesOrBuilderList() { + return namespaces_; + } + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + @java.lang.Override + public int getNamespacesCount() { + return namespaces_.size(); + } + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Namespace getNamespaces(int index) { + return namespaces_.get(index); + } + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder getNamespacesOrBuilder(int index) { + return namespaces_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < namespaces_.size(); i++) { + output.writeMessage(1, namespaces_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < namespaces_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, namespaces_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.ListNamespacesResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse other = + (com.google.cloud.datafusion.v1beta1.ListNamespacesResponse) obj; + + if (!getNamespacesList().equals(other.getNamespacesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNamespacesCount() > 0) { + hash = (37 * hash) + NAMESPACES_FIELD_NUMBER; + hash = (53 * hash) + getNamespacesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List namespaces response.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.ListNamespacesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.ListNamespacesResponse) + com.google.cloud.datafusion.v1beta1.ListNamespacesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.class, + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNamespacesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (namespacesBuilder_ == null) { + namespaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + namespacesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesResponse build() { + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse result = + new com.google.cloud.datafusion.v1beta1.ListNamespacesResponse(this); + int from_bitField0_ = bitField0_; + if (namespacesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + namespaces_ = java.util.Collections.unmodifiableList(namespaces_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.namespaces_ = namespaces_; + } else { + result.namespaces_ = namespacesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.ListNamespacesResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.ListNamespacesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.ListNamespacesResponse other) { + if (other == com.google.cloud.datafusion.v1beta1.ListNamespacesResponse.getDefaultInstance()) + return this; + if (namespacesBuilder_ == null) { + if (!other.namespaces_.isEmpty()) { + if (namespaces_.isEmpty()) { + namespaces_ = other.namespaces_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamespacesIsMutable(); + namespaces_.addAll(other.namespaces_); + } + onChanged(); + } + } else { + if (!other.namespaces_.isEmpty()) { + if (namespacesBuilder_.isEmpty()) { + namespacesBuilder_.dispose(); + namespacesBuilder_ = null; + namespaces_ = other.namespaces_; + bitField0_ = (bitField0_ & ~0x00000001); + namespacesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNamespacesFieldBuilder() + : null; + } else { + namespacesBuilder_.addAllMessages(other.namespaces_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.ListNamespacesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.ListNamespacesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List namespaces_ = + java.util.Collections.emptyList(); + + private void ensureNamespacesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + namespaces_ = + new java.util.ArrayList(namespaces_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Namespace, + com.google.cloud.datafusion.v1beta1.Namespace.Builder, + com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder> + namespacesBuilder_; + + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public java.util.List getNamespacesList() { + if (namespacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(namespaces_); + } else { + return namespacesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public int getNamespacesCount() { + if (namespacesBuilder_ == null) { + return namespaces_.size(); + } else { + return namespacesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public com.google.cloud.datafusion.v1beta1.Namespace getNamespaces(int index) { + if (namespacesBuilder_ == null) { + return namespaces_.get(index); + } else { + return namespacesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder setNamespaces(int index, com.google.cloud.datafusion.v1beta1.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.set(index, value); + onChanged(); + } else { + namespacesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder setNamespaces( + int index, com.google.cloud.datafusion.v1beta1.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.set(index, builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder addNamespaces(com.google.cloud.datafusion.v1beta1.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.add(value); + onChanged(); + } else { + namespacesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder addNamespaces(int index, com.google.cloud.datafusion.v1beta1.Namespace value) { + if (namespacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespacesIsMutable(); + namespaces_.add(index, value); + onChanged(); + } else { + namespacesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder addNamespaces( + com.google.cloud.datafusion.v1beta1.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.add(builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder addNamespaces( + int index, com.google.cloud.datafusion.v1beta1.Namespace.Builder builderForValue) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.add(index, builderForValue.build()); + onChanged(); + } else { + namespacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder addAllNamespaces( + java.lang.Iterable values) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namespaces_); + onChanged(); + } else { + namespacesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder clearNamespaces() { + if (namespacesBuilder_ == null) { + namespaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + namespacesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public Builder removeNamespaces(int index) { + if (namespacesBuilder_ == null) { + ensureNamespacesIsMutable(); + namespaces_.remove(index); + onChanged(); + } else { + namespacesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public com.google.cloud.datafusion.v1beta1.Namespace.Builder getNamespacesBuilder(int index) { + return getNamespacesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder getNamespacesOrBuilder( + int index) { + if (namespacesBuilder_ == null) { + return namespaces_.get(index); + } else { + return namespacesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public java.util.List + getNamespacesOrBuilderList() { + if (namespacesBuilder_ != null) { + return namespacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(namespaces_); + } + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public com.google.cloud.datafusion.v1beta1.Namespace.Builder addNamespacesBuilder() { + return getNamespacesFieldBuilder() + .addBuilder(com.google.cloud.datafusion.v1beta1.Namespace.getDefaultInstance()); + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public com.google.cloud.datafusion.v1beta1.Namespace.Builder addNamespacesBuilder(int index) { + return getNamespacesFieldBuilder() + .addBuilder(index, com.google.cloud.datafusion.v1beta1.Namespace.getDefaultInstance()); + } + /** + * + * + *
+     * List of namespaces
+     * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + public java.util.List + getNamespacesBuilderList() { + return getNamespacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Namespace, + com.google.cloud.datafusion.v1beta1.Namespace.Builder, + com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder> + getNamespacesFieldBuilder() { + if (namespacesBuilder_ == null) { + namespacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Namespace, + com.google.cloud.datafusion.v1beta1.Namespace.Builder, + com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder>( + namespaces_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + namespaces_ = null; + } + return namespacesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.ListNamespacesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.ListNamespacesResponse) + private static final com.google.cloud.datafusion.v1beta1.ListNamespacesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.ListNamespacesResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.ListNamespacesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNamespacesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListNamespacesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.ListNamespacesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponseOrBuilder.java new file mode 100644 index 00000000..b9ec7ca0 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/ListNamespacesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface ListNamespacesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.ListNamespacesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + java.util.List getNamespacesList(); + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + com.google.cloud.datafusion.v1beta1.Namespace getNamespaces(int index); + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + int getNamespacesCount(); + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + java.util.List + getNamespacesOrBuilderList(); + /** + * + * + *
+   * List of namespaces
+   * 
+ * + * repeated .google.cloud.datafusion.v1beta1.Namespace namespaces = 1; + */ + com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder getNamespacesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Namespace.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Namespace.java new file mode 100644 index 00000000..80253403 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Namespace.java @@ -0,0 +1,912 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Represents the information of a namespace
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Namespace} + */ +public final class Namespace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.Namespace) + NamespaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Namespace.newBuilder() to construct. + private Namespace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Namespace() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Namespace(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Namespace( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.IAMPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Namespace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Namespace.class, + com.google.cloud.datafusion.v1beta1.Namespace.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the given namespace.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the given namespace.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IAM_POLICY_FIELD_NUMBER = 2; + private com.google.cloud.datafusion.v1beta1.IAMPolicy iamPolicy_; + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return Whether the iamPolicy field is set. + */ + @java.lang.Override + public boolean hasIamPolicy() { + return iamPolicy_ != null; + } + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return The iamPolicy. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicy getIamPolicy() { + return iamPolicy_ == null + ? com.google.cloud.datafusion.v1beta1.IAMPolicy.getDefaultInstance() + : iamPolicy_; + } + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder getIamPolicyOrBuilder() { + return getIamPolicy(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (iamPolicy_ != null) { + output.writeMessage(2, getIamPolicy()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (iamPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIamPolicy()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.Namespace)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.Namespace other = + (com.google.cloud.datafusion.v1beta1.Namespace) obj; + + if (!getName().equals(other.getName())) return false; + if (hasIamPolicy() != other.hasIamPolicy()) return false; + if (hasIamPolicy()) { + if (!getIamPolicy().equals(other.getIamPolicy())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasIamPolicy()) { + hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.Namespace prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the information of a namespace
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Namespace} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.Namespace) + com.google.cloud.datafusion.v1beta1.NamespaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Namespace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Namespace.class, + com.google.cloud.datafusion.v1beta1.Namespace.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.Namespace.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Namespace getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.Namespace.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Namespace build() { + com.google.cloud.datafusion.v1beta1.Namespace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Namespace buildPartial() { + com.google.cloud.datafusion.v1beta1.Namespace result = + new com.google.cloud.datafusion.v1beta1.Namespace(this); + result.name_ = name_; + if (iamPolicyBuilder_ == null) { + result.iamPolicy_ = iamPolicy_; + } else { + result.iamPolicy_ = iamPolicyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.Namespace) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.Namespace) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Namespace other) { + if (other == com.google.cloud.datafusion.v1beta1.Namespace.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasIamPolicy()) { + mergeIamPolicy(other.getIamPolicy()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.Namespace parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.Namespace) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the given namespace.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the given namespace.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the given namespace.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the given namespace.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the given namespace.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datafusion.v1beta1.IAMPolicy iamPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.IAMPolicy, + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder, + com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder> + iamPolicyBuilder_; + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return Whether the iamPolicy field is set. + */ + public boolean hasIamPolicy() { + return iamPolicyBuilder_ != null || iamPolicy_ != null; + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return The iamPolicy. + */ + public com.google.cloud.datafusion.v1beta1.IAMPolicy getIamPolicy() { + if (iamPolicyBuilder_ == null) { + return iamPolicy_ == null + ? com.google.cloud.datafusion.v1beta1.IAMPolicy.getDefaultInstance() + : iamPolicy_; + } else { + return iamPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public Builder setIamPolicy(com.google.cloud.datafusion.v1beta1.IAMPolicy value) { + if (iamPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicy_ = value; + onChanged(); + } else { + iamPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public Builder setIamPolicy( + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder builderForValue) { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public Builder mergeIamPolicy(com.google.cloud.datafusion.v1beta1.IAMPolicy value) { + if (iamPolicyBuilder_ == null) { + if (iamPolicy_ != null) { + iamPolicy_ = + com.google.cloud.datafusion.v1beta1.IAMPolicy.newBuilder(iamPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + iamPolicy_ = value; + } + onChanged(); + } else { + iamPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public Builder clearIamPolicy() { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + onChanged(); + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder getIamPolicyBuilder() { + + onChanged(); + return getIamPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + public com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder getIamPolicyOrBuilder() { + if (iamPolicyBuilder_ != null) { + return iamPolicyBuilder_.getMessageOrBuilder(); + } else { + return iamPolicy_ == null + ? com.google.cloud.datafusion.v1beta1.IAMPolicy.getDefaultInstance() + : iamPolicy_; + } + } + /** + * + * + *
+     * IAM policy associated with this namespace.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.IAMPolicy, + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder, + com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder> + getIamPolicyFieldBuilder() { + if (iamPolicyBuilder_ == null) { + iamPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.IAMPolicy, + com.google.cloud.datafusion.v1beta1.IAMPolicy.Builder, + com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder>( + getIamPolicy(), getParentForChildren(), isClean()); + iamPolicy_ = null; + } + return iamPolicyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.Namespace) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.Namespace) + private static final com.google.cloud.datafusion.v1beta1.Namespace DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.Namespace(); + } + + public static com.google.cloud.datafusion.v1beta1.Namespace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Namespace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Namespace(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Namespace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceName.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceName.java new file mode 100644 index 00000000..f00f73b9 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.datafusion.v1beta1; + +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 NamespaceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE_NAMESPACE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/namespaces/{namespace}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + private final String namespace; + + @Deprecated + protected NamespaceName() { + project = null; + location = null; + instance = null; + namespace = null; + } + + private NamespaceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + namespace = Preconditions.checkNotNull(builder.getNamespace()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getNamespace() { + return namespace; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NamespaceName of( + String project, String location, String instance, String namespace) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setNamespace(namespace) + .build(); + } + + public static String format(String project, String location, String instance, String namespace) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setNamespace(namespace) + .build() + .toString(); + } + + public static NamespaceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE_NAMESPACE.validatedMatch( + formattedString, "NamespaceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("instance"), + matchMap.get("namespace")); + } + + 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 (NamespaceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE_NAMESPACE.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 (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (namespace != null) { + fieldMapBuilder.put("namespace", namespace); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE_NAMESPACE.instantiate( + "project", project, "location", location, "instance", instance, "namespace", namespace); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NamespaceName that = ((NamespaceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.namespace, that.namespace); + } + 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(instance); + h *= 1000003; + h ^= Objects.hashCode(namespace); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/instances/{instance}/namespaces/{namespace}. + */ + public static class Builder { + private String project; + private String location; + private String instance; + private String namespace; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getNamespace() { + return namespace; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + private Builder(NamespaceName namespaceName) { + this.project = namespaceName.project; + this.location = namespaceName.location; + this.instance = namespaceName.instance; + this.namespace = namespaceName.namespace; + } + + public NamespaceName build() { + return new NamespaceName(this); + } + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceOrBuilder.java new file mode 100644 index 00000000..30778ae7 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface NamespaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.Namespace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the given namespace.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the given namespace.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return Whether the iamPolicy field is set. + */ + boolean hasIamPolicy(); + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + * + * @return The iamPolicy. + */ + com.google.cloud.datafusion.v1beta1.IAMPolicy getIamPolicy(); + /** + * + * + *
+   * IAM policy associated with this namespace.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.IAMPolicy iam_policy = 2; + */ + com.google.cloud.datafusion.v1beta1.IAMPolicyOrBuilder getIamPolicyOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceView.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceView.java new file mode 100644 index 00000000..bb070c76 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NamespaceView.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * A view for Namespace
+ * 
+ * + * Protobuf enum {@code google.cloud.datafusion.v1beta1.NamespaceView} + */ +public enum NamespaceView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default/unset value, which will use BASIC view.
+   * 
+ * + * NAMESPACE_VIEW_UNSPECIFIED = 0; + */ + NAMESPACE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Show the most basic metadata of a namespace
+   * 
+ * + * NAMESPACE_VIEW_BASIC = 1; + */ + NAMESPACE_VIEW_BASIC(1), + /** + * + * + *
+   * Returns all metadata of a namespace
+   * 
+ * + * NAMESPACE_VIEW_FULL = 2; + */ + NAMESPACE_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default/unset value, which will use BASIC view.
+   * 
+ * + * NAMESPACE_VIEW_UNSPECIFIED = 0; + */ + public static final int NAMESPACE_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Show the most basic metadata of a namespace
+   * 
+ * + * NAMESPACE_VIEW_BASIC = 1; + */ + public static final int NAMESPACE_VIEW_BASIC_VALUE = 1; + /** + * + * + *
+   * Returns all metadata of a namespace
+   * 
+ * + * NAMESPACE_VIEW_FULL = 2; + */ + public static final int NAMESPACE_VIEW_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NamespaceView 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 NamespaceView forNumber(int value) { + switch (value) { + case 0: + return NAMESPACE_VIEW_UNSPECIFIED; + case 1: + return NAMESPACE_VIEW_BASIC; + case 2: + return NAMESPACE_VIEW_FULL; + 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 NamespaceView findValueByNumber(int number) { + return NamespaceView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1.getDescriptor().getEnumTypes().get(0); + } + + private static final NamespaceView[] VALUES = values(); + + public static NamespaceView 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 NamespaceView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datafusion.v1beta1.NamespaceView) +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfig.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfig.java new file mode 100644 index 00000000..1fcd388a --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfig.java @@ -0,0 +1,860 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Network configuration for a Data Fusion instance. These configurations
+ * are used for peering with the customer network. Configurations are optional
+ * when a public Data Fusion instance is to be created. However, providing
+ * these configurations allows several benefits, such as reduced network latency
+ * while accessing the customer resources from managed Data Fusion instance
+ * nodes, as well as access to the customer on-prem resources.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.NetworkConfig} + */ +public final class NetworkConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.NetworkConfig) + NetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NetworkConfig() { + network_ = ""; + ipAllocation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NetworkConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NetworkConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + ipAllocation_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.NetworkConfig.class, + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + private volatile java.lang.Object network_; + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ALLOCATION_FIELD_NUMBER = 2; + private volatile java.lang.Object ipAllocation_; + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the Data
+   * Fusion instance network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + @java.lang.Override + public java.lang.String getIpAllocation() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAllocation_ = s; + return s; + } + } + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the Data
+   * Fusion instance network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAllocationBytes() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAllocation_ = 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 (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + if (!getIpAllocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAllocation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_); + } + if (!getIpAllocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAllocation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.NetworkConfig other = + (com.google.cloud.datafusion.v1beta1.NetworkConfig) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getIpAllocation().equals(other.getIpAllocation())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + IP_ALLOCATION_FIELD_NUMBER; + hash = (53 * hash) + getIpAllocation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.NetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network configuration for a Data Fusion instance. These configurations
+   * are used for peering with the customer network. Configurations are optional
+   * when a public Data Fusion instance is to be created. However, providing
+   * these configurations allows several benefits, such as reduced network latency
+   * while accessing the customer resources from managed Data Fusion instance
+   * nodes, as well as access to the customer on-prem resources.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.NetworkConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.NetworkConfig) + com.google.cloud.datafusion.v1beta1.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.NetworkConfig.class, + com.google.cloud.datafusion.v1beta1.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.NetworkConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + network_ = ""; + + ipAllocation_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfig build() { + com.google.cloud.datafusion.v1beta1.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfig buildPartial() { + com.google.cloud.datafusion.v1beta1.NetworkConfig result = + new com.google.cloud.datafusion.v1beta1.NetworkConfig(this); + result.network_ = network_; + result.ipAllocation_ = ipAllocation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.NetworkConfig) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.NetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.NetworkConfig other) { + if (other == com.google.cloud.datafusion.v1beta1.NetworkConfig.getDefaultInstance()) + return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getIpAllocation().isEmpty()) { + ipAllocation_ = other.ipAllocation_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.NetworkConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.NetworkConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the network in the customer project with which the Tenant Project
+     * will be peered for executing pipelines. In case of shared VPC where the
+     * network resides in another host project the network should specified in
+     * the form of projects/{host-project-id}/global/networks/{network}
+     * 
+ * + * string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object ipAllocation_ = ""; + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the Data
+     * Fusion instance network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + public java.lang.String getIpAllocation() { + java.lang.Object ref = ipAllocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAllocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the Data
+     * Fusion instance network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + public com.google.protobuf.ByteString getIpAllocationBytes() { + java.lang.Object ref = ipAllocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAllocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the Data
+     * Fusion instance network.
+     * 
+ * + * string ip_allocation = 2; + * + * @param value The ipAllocation to set. + * @return This builder for chaining. + */ + public Builder setIpAllocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ipAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the Data
+     * Fusion instance network.
+     * 
+ * + * string ip_allocation = 2; + * + * @return This builder for chaining. + */ + public Builder clearIpAllocation() { + + ipAllocation_ = getDefaultInstance().getIpAllocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * The IP range in CIDR notation to use for the managed Data Fusion instance
+     * nodes. This range must not overlap with any other ranges used in the Data
+     * Fusion instance network.
+     * 
+ * + * string ip_allocation = 2; + * + * @param value The bytes for ipAllocation to set. + * @return This builder for chaining. + */ + public Builder setIpAllocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ipAllocation_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.NetworkConfig) + private static final com.google.cloud.datafusion.v1beta1.NetworkConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.NetworkConfig(); + } + + public static com.google.cloud.datafusion.v1beta1.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NetworkConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfigOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfigOrBuilder.java new file mode 100644 index 00000000..88354288 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/NetworkConfigOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface NetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Name of the network in the customer project with which the Tenant Project
+   * will be peered for executing pipelines. In case of shared VPC where the
+   * network resides in another host project the network should specified in
+   * the form of projects/{host-project-id}/global/networks/{network}
+   * 
+ * + * string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the Data
+   * Fusion instance network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The ipAllocation. + */ + java.lang.String getIpAllocation(); + /** + * + * + *
+   * The IP range in CIDR notation to use for the managed Data Fusion instance
+   * nodes. This range must not overlap with any other ranges used in the Data
+   * Fusion instance network.
+   * 
+ * + * string ip_allocation = 2; + * + * @return The bytes for ipAllocation. + */ + com.google.protobuf.ByteString getIpAllocationBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java new file mode 100644 index 00000000..f41c8c66 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadata.java @@ -0,0 +1,1820 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusDetail_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusDetail_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.OperationMetadata.class, + com.google.cloud.datafusion.v1beta1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_DETAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object statusDetail_; + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + @java.lang.Override + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusDetail_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusDetailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusDetail_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.OperationMetadata other = + (com.google.cloud.datafusion.v1beta1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusDetail().equals(other.getStatusDetail())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetail().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.OperationMetadata) + com.google.cloud.datafusion.v1beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.OperationMetadata.class, + com.google.cloud.datafusion.v1beta1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusDetail_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.OperationMetadata build() { + com.google.cloud.datafusion.v1beta1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.OperationMetadata buildPartial() { + com.google.cloud.datafusion.v1beta1.OperationMetadata result = + new com.google.cloud.datafusion.v1beta1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusDetail_ = statusDetail_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.OperationMetadata) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.OperationMetadata other) { + if (other == com.google.cloud.datafusion.v1beta1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusDetail().isEmpty()) { + statusDetail_ = other.statusDetail_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusDetail_ = ""; + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + public java.lang.String getStatusDetail() { + java.lang.Object ref = statusDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + public com.google.protobuf.ByteString getStatusDetailBytes() { + java.lang.Object ref = statusDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusDetail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusDetail() { + + statusDetail_ = getDefaultInstance().getStatusDetail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation if any.
+     * 
+ * + * string status_detail = 5; + * + * @param value The bytes for statusDetail to set. + * @return This builder for chaining. + */ + public Builder setStatusDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusDetail_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.OperationMetadata) + private static final com.google.cloud.datafusion.v1beta1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.OperationMetadata(); + } + + public static com.google.cloud.datafusion.v1beta1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..a1774713 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,212 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The statusDetail. + */ + java.lang.String getStatusDetail(); + /** + * + * + *
+   * Human-readable status of the operation if any.
+   * 
+ * + * string status_detail = 5; + * + * @return The bytes for statusDetail. + */ + com.google.protobuf.ByteString getStatusDetailBytes(); + + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java new file mode 100644 index 00000000..9dc61acc --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequest.java @@ -0,0 +1,816 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message to remove dns peering.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest} + */ +public final class RemoveDnsPeeringRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) + RemoveDnsPeeringRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDnsPeeringRequest.newBuilder() to construct. + private RemoveDnsPeeringRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDnsPeeringRequest() { + parent_ = ""; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDnsPeeringRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDnsPeeringRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.class, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The resource on which DNS peering will be removed.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The resource on which DNS peering will be removed.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 2; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * Required. The zone to be removed.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The zone to be removed.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zone_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zone_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest other = + (com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getZone().equals(other.getZone())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message to remove dns peering.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.class, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + zone_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest build() { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest result = + new com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest(this); + result.parent_ = parent_; + result.zone_ = zone_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The resource on which DNS peering will be removed.
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource on which DNS peering will be removed.
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource on which DNS peering will be removed.
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which DNS peering will be removed.
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which DNS peering will be removed.
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Required. The zone to be removed.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The zone to be removed.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The zone to be removed.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to be removed.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to be removed.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) + private static final com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDnsPeeringRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDnsPeeringRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java new file mode 100644 index 00000000..c5d5eaef --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringRequestOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface RemoveDnsPeeringRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.RemoveDnsPeeringRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource on which DNS peering will be removed.
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The resource on which DNS peering will be removed.
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The zone to be removed.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Required. The zone to be removed.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponse.java new file mode 100644 index 00000000..69be7362 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponse.java @@ -0,0 +1,460 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Response message for set dns peering method.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse} + */ +public final class RemoveDnsPeeringResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) + RemoveDnsPeeringResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDnsPeeringResponse.newBuilder() to construct. + private RemoveDnsPeeringResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDnsPeeringResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDnsPeeringResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDnsPeeringResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.class, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse other = + (com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for set dns peering method.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.class, + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse + getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse build() { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse result = + new com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse other) { + if (other + == com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) + private static final com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDnsPeeringResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDnsPeeringResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponseOrBuilder.java new file mode 100644 index 00000000..ec8f21fc --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveDnsPeeringResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface RemoveDnsPeeringResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.RemoveDnsPeeringResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java new file mode 100644 index 00000000..a3e5583a --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for RemoveIamPolicy method.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest} + */ +public final class RemoveIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) + RemoveIamPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyRequest.newBuilder() to construct. + private RemoveIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveIamPolicyRequest() { + resource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveIamPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveIamPolicyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.class, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + * + * + *
+   * The resource on which IAM policy to be removed is attached to.
+   * 
+ * + * string resource = 1; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + * + * + *
+   * The resource on which IAM policy to be removed is attached to.
+   * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = 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 (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest other = + (com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) obj; + + if (!getResource().equals(other.getResource())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for RemoveIamPolicy method.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.class, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest build() { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest result = + new com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest(this); + result.resource_ = resource_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest.getDefaultInstance()) + return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+     * The resource on which IAM policy to be removed is attached to.
+     * 
+ * + * string resource = 1; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource on which IAM policy to be removed is attached to.
+     * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource on which IAM policy to be removed is attached to.
+     * 
+ * + * string resource = 1; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which IAM policy to be removed is attached to.
+     * 
+ * + * string resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource on which IAM policy to be removed is attached to.
+     * 
+ * + * string resource = 1; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) + private static final com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveIamPolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java new file mode 100644 index 00000000..ee9ab77b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface RemoveIamPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.RemoveIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource on which IAM policy to be removed is attached to.
+   * 
+ * + * string resource = 1; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * The resource on which IAM policy to be removed is attached to.
+   * 
+ * + * string resource = 1; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponse.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponse.java new file mode 100644 index 00000000..fa4a68e2 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Response message for RemoveIamPolicy method.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse} + */ +public final class RemoveIamPolicyResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) + RemoveIamPolicyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveIamPolicyResponse.newBuilder() to construct. + private RemoveIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveIamPolicyResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveIamPolicyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveIamPolicyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.class, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse other = + (com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for RemoveIamPolicy method.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.class, + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse build() { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse buildPartial() { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse result = + new com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse other) { + if (other == com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) + private static final com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse(); + } + + public static com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIamPolicyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveIamPolicyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponseOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponseOrBuilder.java new file mode 100644 index 00000000..69aa5d4a --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RemoveIamPolicyResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface RemoveIamPolicyResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.RemoveIamPolicyResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java new file mode 100644 index 00000000..0fe4de77 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for restarting a Data Fusion instance.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RestartInstanceRequest} + */ +public final class RestartInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.RestartInstanceRequest) + RestartInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestartInstanceRequest.newBuilder() to construct. + private RestartInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestartInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestartInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RestartInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.RestartInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.RestartInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for restarting a Data Fusion instance.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.RestartInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.RestartInstanceRequest) + com.google.cloud.datafusion.v1beta1.RestartInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RestartInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RestartInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RestartInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.RestartInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.RestartInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.RestartInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.RestartInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.RestartInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.RestartInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.RestartInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be restarted in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.RestartInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.RestartInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.RestartInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.RestartInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.RestartInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestartInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RestartInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.RestartInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java new file mode 100644 index 00000000..56ad24ca --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/RestartInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface RestartInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.RestartInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Data Fusion instance which need to be restarted in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java new file mode 100644 index 00000000..65865f8d --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequest.java @@ -0,0 +1,1095 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for updating a Data Fusion instance.
+ * Data Fusion only allows updating the labels, options, and stack driver
+ * settings.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.UpdateInstanceRequest} + */ +public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.UpdateInstanceRequest) + UpdateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstanceRequest.newBuilder() to construct. + private UpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstanceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datafusion.v1beta1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.datafusion.v1beta1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private com.google.cloud.datafusion.v1beta1.Instance instance_; + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstance()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for updating a Data Fusion instance.
+   * Data Fusion only allows updating the labels, options, and stack driver
+   * settings.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.UpdateInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.UpdateInstanceRequest) + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest.getDefaultInstance()) + return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datafusion.v1beta1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return The instance. + */ + public com.google.cloud.datafusion.v1beta1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public Builder setInstance(com.google.cloud.datafusion.v1beta1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public Builder setInstance( + com.google.cloud.datafusion.v1beta1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public Builder mergeInstance(com.google.cloud.datafusion.v1beta1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.datafusion.v1beta1.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public com.google.cloud.datafusion.v1beta1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + public com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.datafusion.v1beta1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * The instance resource that replaces the resource on the server. Currently,
+     * Data Fusion only allows replacing labels, options, and stack driver
+     * settings. All other fields will be ignored.
+     * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datafusion.v1beta1.Instance, + com.google.cloud.datafusion.v1beta1.Instance.Builder, + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Field mask is used to specify the fields that the update will overwrite
+     * in an instance resource. The fields specified in the update_mask are
+     * relative to the resource, not the full request.
+     * A field will be overwritten if it is in the mask.
+     * If the user does not provide a mask, all the supported fields (labels and
+     * options currently) will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.UpdateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.UpdateInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpdateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java new file mode 100644 index 00000000..421a918b --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpdateInstanceRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface UpdateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.UpdateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + * + * @return The instance. + */ + com.google.cloud.datafusion.v1beta1.Instance getInstance(); + /** + * + * + *
+   * The instance resource that replaces the resource on the server. Currently,
+   * Data Fusion only allows replacing labels, options, and stack driver
+   * settings. All other fields will be ignored.
+   * 
+ * + * .google.cloud.datafusion.v1beta1.Instance instance = 1; + */ + com.google.cloud.datafusion.v1beta1.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Field mask is used to specify the fields that the update will overwrite
+   * in an instance resource. The fields specified in the update_mask are
+   * relative to the resource, not the full request.
+   * A field will be overwritten if it is in the mask.
+   * If the user does not provide a mask, all the supported fields (labels and
+   * options currently) will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java new file mode 100644 index 00000000..1b9f43cf --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * Request message for upgrading a Data Fusion instance.
+ * To change the instance properties, instance update should be used.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.UpgradeInstanceRequest} + */ +public final class UpgradeInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) + UpgradeInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeInstanceRequest.newBuilder() to construct. + private UpgradeInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * Instance will be upgraded with the latest stable version of the Data
+   * Fusion.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * Instance will be upgraded with the latest stable version of the Data
+   * Fusion.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest other = + (com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for upgrading a Data Fusion instance.
+   * To change the instance properties, instance update should be used.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.UpgradeInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.class, + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest build() { + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest buildPartial() { + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest result = + new com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest other) { + if (other == com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * Instance will be upgraded with the latest stable version of the Data
+     * Fusion.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * Instance will be upgraded with the latest stable version of the Data
+     * Fusion.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * Instance will be upgraded with the latest stable version of the Data
+     * Fusion.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * Instance will be upgraded with the latest stable version of the Data
+     * Fusion.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the Data Fusion instance which need to be upgraded in the form of
+     * projects/{project}/locations/{location}/instances/{instance}
+     * Instance will be upgraded with the latest stable version of the Data
+     * Fusion.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) + private static final com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest(); + } + + public static com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.UpgradeInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java new file mode 100644 index 00000000..250d212a --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/UpgradeInstanceRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface UpgradeInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.UpgradeInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * Instance will be upgraded with the latest stable version of the Data
+   * Fusion.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the Data Fusion instance which need to be upgraded in the form of
+   * projects/{project}/locations/{location}/instances/{instance}
+   * Instance will be upgraded with the latest stable version of the Data
+   * Fusion.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java new file mode 100644 index 00000000..50005959 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/V1Beta1.java @@ -0,0 +1,675 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public final class V1Beta1 { + private V1Beta1() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Version_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Version_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Accelerator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_Namespace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_DnsPeering_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/datafusion/v1beta1/v1beta" + + "1.proto\022\037google.cloud.datafusion.v1beta1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032\032goo" + + "gle/iam/v1/policy.proto\032#google/longrunn" + + "ing/operations.proto\032 google/protobuf/fi" + + "eld_mask.proto\032\037google/protobuf/timestam" + + "p.proto\032\027google/rpc/status.proto\"7\n\rNetw" + + "orkConfig\022\017\n\007network\030\001 \001(\t\022\025\n\rip_allocat" + + "ion\030\002 \001(\t\"V\n\007Version\022\026\n\016version_number\030\001" + + " \001(\t\022\027\n\017default_version\030\002 \001(\010\022\032\n\022availab" + + "le_features\030\003 \003(\t\"\263\001\n\013Accelerator\022V\n\020acc" + + "elerator_type\030\001 \001(\0162<.google.cloud.dataf" + + "usion.v1beta1.Accelerator.AcceleratorTyp" + + "e\"L\n\017AcceleratorType\022 \n\034ACCELERATOR_TYPE" + + "_UNSPECIFIED\020\000\022\007\n\003CDC\020\001\022\016\n\nHEALTHCARE\020\002\"" + + "(\n\017CryptoKeyConfig\022\025\n\rkey_reference\030\001 \001(" + + "\t\"\255\014\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\023\n\013des" + + "cription\030\002 \001(\t\022A\n\004type\030\003 \001(\0162..google.cl" + + "oud.datafusion.v1beta1.Instance.TypeB\003\340A" + + "\002\022\"\n\032enable_stackdriver_logging\030\004 \001(\010\022%\n" + + "\035enable_stackdriver_monitoring\030\005 \001(\010\022\030\n\020" + + "private_instance\030\006 \001(\010\022F\n\016network_config" + + "\030\007 \001(\0132..google.cloud.datafusion.v1beta1" + + ".NetworkConfig\022E\n\006labels\030\010 \003(\01325.google." + + "cloud.datafusion.v1beta1.Instance.Labels" + + "Entry\022G\n\007options\030\t \003(\01326.google.cloud.da" + + "tafusion.v1beta1.Instance.OptionsEntry\0224" + + "\n\013create_time\030\n \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022C\n\005state\030\014 \001(" + + "\0162/.google.cloud.datafusion.v1beta1.Inst" + + "ance.StateB\003\340A\003\022\032\n\rstate_message\030\r \001(\tB\003" + + "\340A\003\022\035\n\020service_endpoint\030\016 \001(\tB\003\340A\003\022\014\n\004zo" + + "ne\030\017 \001(\t\022\017\n\007version\030\020 \001(\t\022\036\n\017service_acc" + + "ount\030\021 \001(\tB\005\030\001\340A\003\022\024\n\014display_name\030\022 \001(\t\022" + + "C\n\021available_version\030\023 \003(\0132(.google.clou" + + "d.datafusion.v1beta1.Version\022\031\n\014api_endp" + + "oint\030\024 \001(\tB\003\340A\003\022\027\n\ngcs_bucket\030\025 \001(\tB\003\340A\003" + + "\022B\n\014accelerators\030\026 \003(\0132,.google.cloud.da" + + "tafusion.v1beta1.Accelerator\022\037\n\022p4_servi" + + "ce_account\030\027 \001(\tB\003\340A\003\022\036\n\021tenant_project_" + + "id\030\030 \001(\tB\003\340A\003\022 \n\030dataproc_service_accoun" + + "t\030\031 \001(\t\022\023\n\013enable_rbac\030\032 \001(\010\022K\n\021crypto_k" + + "ey_config\030\033 \001(\01320.google.cloud.datafusio" + + "n.v1beta1.CryptoKeyConfig\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032.\n\014Opti" + + "onsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"F\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005BASIC\020" + + "\001\022\016\n\nENTERPRISE\020\002\022\r\n\tDEVELOPER\020\003\"\247\001\n\005Sta" + + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022" + + "\013\n\007RUNNING\020\002\022\n\n\006FAILED\020\003\022\014\n\010DELETING\020\004\022\r" + + "\n\tUPGRADING\020\005\022\016\n\nRESTARTING\020\006\022\014\n\010UPDATIN" + + "G\020\007\022\021\n\rAUTO_UPDATING\020\010\022\022\n\016AUTO_UPGRADING" + + "\020\t:e\352Ab\n\"datafusion.googleapis.com/Insta" + + "nce\022\n\niam_policy\030\002 \001(\0132*.google." + + "cloud.datafusion.v1beta1.IAMPolicy:}\352Az\n" + + "#datafusion.googleapis.com/Namespace\022Spr" + + "ojects/{project}/locations/{location}/in" + + "stances/{instance}/namespaces/{namespace" + + "}\"q\n\026ListNamespacesResponse\022>\n\nnamespace" + + "s\030\001 \003(\0132*.google.cloud.datafusion.v1beta" + + "1.Namespace\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n" + + "\nDnsPeering\022\021\n\004zone\030\001 \001(\tB\003\340A\002\022\023\n\006domain" + + "\030\002 \001(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022\033\n" + + "\016target_project\030\004 \001(\tB\003\340A\001\022\033\n\016target_net" + + "work\030\005 \001(\tB\003\340A\001\"h\n\024AddDnsPeeringRequest\022" + + "\016\n\006parent\030\001 \001(\t\022@\n\013dns_peering\030\002 \001(\0132+.g" + + "oogle.cloud.datafusion.v1beta1.DnsPeerin" + + "g\"\027\n\025AddDnsPeeringResponse\"<\n\027RemoveDnsP" + + "eeringRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\004zone\030\002 " + + "\001(\tB\003\340A\002\"\032\n\030RemoveDnsPeeringResponse\"{\n\026" + + "ListDnsPeeringsRequest\022:\n\006parent\030\001 \001(\tB*" + + "\340A\002\372A$\n\"datafusion.googleapis.com/Instan" + + "ce\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"u\n\027ListDnsPeeringsResponse\022A\n\014dns_peer" + + "ings\030\001 \003(\0132+.google.cloud.datafusion.v1b" + + "eta1.DnsPeering\022\027\n\017next_page_token\030\002 \001(\t" + + "*b\n\rNamespaceView\022\036\n\032NAMESPACE_VIEW_UNSP" + + "ECIFIED\020\000\022\030\n\024NAMESPACE_VIEW_BASIC\020\001\022\027\n\023N" + + "AMESPACE_VIEW_FULL\020\0022\311\026\n\nDataFusion\022\332\001\n\025" + + "ListAvailableVersions\022=.google.cloud.dat" + + "afusion.v1beta1.ListAvailableVersionsReq" + + "uest\032>.google.cloud.datafusion.v1beta1.L" + + "istAvailableVersionsResponse\"B\202\323\344\223\0023\0221/v" + + "1beta1/{parent=projects/*/locations/*}/v" + + "ersions\332A\006parent\022\272\001\n\rListInstances\0225.goo" + + "gle.cloud.datafusion.v1beta1.ListInstanc" + + "esRequest\0326.google.cloud.datafusion.v1be" + + "ta1.ListInstancesResponse\":\202\323\344\223\0024\0222/v1be" + + "ta1/{parent=projects/*/locations/*}/inst" + + "ances\022\251\001\n\013GetInstance\0223.google.cloud.dat" + + "afusion.v1beta1.GetInstanceRequest\032).goo" + + "gle.cloud.datafusion.v1beta1.Instance\":\202" + + "\323\344\223\0024\0222/v1beta1/{name=projects/*/locatio" + + "ns/*/instances/*}\022\354\001\n\016CreateInstance\0226.g" + + "oogle.cloud.datafusion.v1beta1.CreateIns" + + "tanceRequest\032\035.google.longrunning.Operat" + + "ion\"\202\001\202\323\344\223\002>\"2/v1beta1/{parent=projects/" + + "*/locations/*}/instances:\010instance\332A\033par" + + "ent,instance,instance_id\312A\035\n\010Instance\022\021O" + + "perationMetadata\022\327\001\n\016DeleteInstance\0226.go" + + "ogle.cloud.datafusion.v1beta1.DeleteInst" + + "anceRequest\032\035.google.longrunning.Operati" + + "on\"n\202\323\344\223\0024*2/v1beta1/{name=projects/*/lo" + + "cations/*/instances/*}\332A\004name\312A*\n\025google" + + ".protobuf.Empty\022\021OperationMetadata\022\356\001\n\016U" + + "pdateInstance\0226.google.cloud.datafusion." + + "v1beta1.UpdateInstanceRequest\032\035.google.l" + + "ongrunning.Operation\"\204\001\202\323\344\223\002G2;/v1beta1/" + + "{instance.name=projects/*/locations/*/in" + + "stances/*}:\010instance\332A\024instance,update_m" + + "ask\312A\035\n\010Instance\022\021OperationMetadata\022\320\001\n\017" + + "RestartInstance\0227.google.cloud.datafusio" + + "n.v1beta1.RestartInstanceRequest\032\035.googl" + + "e.longrunning.Operation\"e\202\323\344\223\002?\":/v1beta" + + "1/{name=projects/*/locations/*/instances" + + "/*}:restart:\001*\312A\035\n\010Instance\022\021OperationMe" + + "tadata\022\320\001\n\017UpgradeInstance\0227.google.clou" + + "d.datafusion.v1beta1.UpgradeInstanceRequ" + + "est\032\035.google.longrunning.Operation\"e\202\323\344\223" + + "\002?\":/v1beta1/{name=projects/*/locations/" + + "*/instances/*}:upgrade:\001*\312A\035\n\010Instance\022\021" + + "OperationMetadata\022\316\001\n\017RemoveIamPolicy\0227." + + "google.cloud.datafusion.v1beta1.RemoveIa" + + "mPolicyRequest\0328.google.cloud.datafusion" + + ".v1beta1.RemoveIamPolicyResponse\"H\202\323\344\223\002B" + + "\"=/v1beta1/{resource=projects/*/location" + + "s/*/**}:removeIamPolicy:\001*\022\323\001\n\016ListNames" + + "paces\0226.google.cloud.datafusion.v1beta1." + + "ListNamespacesRequest\0327.google.cloud.dat" + + "afusion.v1beta1.ListNamespacesResponse\"P" + + "\202\323\344\223\002A\022?/v1beta1/{parent=projects/*/loca" + + "tions/*/instances/*}/namespaces\332A\006parent" + + "\022\330\001\n\rAddDnsPeering\0225.google.cloud.datafu" + + "sion.v1beta1.AddDnsPeeringRequest\0326.goog" + + "le.cloud.datafusion.v1beta1.AddDnsPeerin" + + "gResponse\"X\202\323\344\223\002I\"D/v1beta1/{parent=proj" + + "ects/*/locations/*/instances/*}/dnsPeeri" + + "ngs:add:\001*\332A\006parent\022\344\001\n\020RemoveDnsPeering" + + "\0228.google.cloud.datafusion.v1beta1.Remov" + + "eDnsPeeringRequest\0329.google.cloud.datafu" + + "sion.v1beta1.RemoveDnsPeeringResponse\"[\202" + + "\323\344\223\002L\"G/v1beta1/{parent=projects/*/locat" + + "ions/*/instances/*}/dnsPeerings:remove:\001" + + "*\332A\006parent\022\334\001\n\017ListDnsPeerings\0227.google." + + "cloud.datafusion.v1beta1.ListDnsPeerings" + + "Request\0328.google.cloud.datafusion.v1beta" + + "1.ListDnsPeeringsResponse\"V\202\323\344\223\002G\022E/v1be" + + "ta1/{parent=projects/*/locations/*/insta" + + "nces/*}/dnsPeerings:list\332A\006parent\032M\312A\031da" + + "tafusion.googleapis.com\322A.https://www.go" + + "ogleapis.com/auth/cloud-platformB\333\001\n#com" + + ".google.cloud.datafusion.v1beta1P\001ZIgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "datafusion/v1beta1;datafusion\252\002\037Google.C" + + "loud.DataFusion.V1Beta1\312\002\037Google\\Cloud\\D" + + "ataFusion\\V1beta1\352\002\"Google::Cloud::DataF" + + "usion::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_NetworkConfig_descriptor, + new java.lang.String[] { + "Network", "IpAllocation", + }); + internal_static_google_cloud_datafusion_v1beta1_Version_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datafusion_v1beta1_Version_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Version_descriptor, + new java.lang.String[] { + "VersionNumber", "DefaultVersion", "AvailableFeatures", + }); + internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datafusion_v1beta1_Accelerator_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Accelerator_descriptor, + new java.lang.String[] { + "AcceleratorType", + }); + internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_CryptoKeyConfig_descriptor, + new java.lang.String[] { + "KeyReference", + }); + internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datafusion_v1beta1_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor, + new java.lang.String[] { + "Name", + "Description", + "Type", + "EnableStackdriverLogging", + "EnableStackdriverMonitoring", + "PrivateInstance", + "NetworkConfig", + "Labels", + "Options", + "CreateTime", + "UpdateTime", + "State", + "StateMessage", + "ServiceEndpoint", + "Zone", + "Version", + "ServiceAccount", + "DisplayName", + "AvailableVersion", + "ApiEndpoint", + "GcsBucket", + "Accelerators", + "P4ServiceAccount", + "TenantProjectId", + "DataprocServiceAccount", + "EnableRbac", + "CryptoKeyConfig", + }); + internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Instance_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_descriptor = + internal_static_google_cloud_datafusion_v1beta1_Instance_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Instance_OptionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListInstancesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListInstancesResponse_descriptor, + new java.lang.String[] { + "Instances", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "LatestPatchOnly", + }); + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListAvailableVersionsResponse_descriptor, + new java.lang.String[] { + "AvailableVersions", "NextPageToken", + }); + internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_GetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_CreateInstanceRequest_descriptor, + new java.lang.String[] { + "Parent", "InstanceId", "Instance", + }); + internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_DeleteInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_UpdateInstanceRequest_descriptor, + new java.lang.String[] { + "Instance", "UpdateMask", + }); + internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_RestartInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_UpgradeInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusDetail", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyRequest_descriptor, + new java.lang.String[] { + "Resource", + }); + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_RemoveIamPolicyResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_IAMPolicy_descriptor, + new java.lang.String[] { + "Policy", "Status", + }); + internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_datafusion_v1beta1_Namespace_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_Namespace_descriptor, + new java.lang.String[] { + "Name", "IamPolicy", + }); + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListNamespacesResponse_descriptor, + new java.lang.String[] { + "Namespaces", "NextPageToken", + }); + internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_datafusion_v1beta1_DnsPeering_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_DnsPeering_descriptor, + new java.lang.String[] { + "Zone", "Domain", "Description", "TargetProject", "TargetNetwork", + }); + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringRequest_descriptor, + new java.lang.String[] { + "Parent", "DnsPeering", + }); + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_AddDnsPeeringResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringRequest_descriptor, + new java.lang.String[] { + "Parent", "Zone", + }); + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_RemoveDnsPeeringResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datafusion_v1beta1_ListDnsPeeringsResponse_descriptor, + new java.lang.String[] { + "DnsPeerings", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java new file mode 100644 index 00000000..932a6e29 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/Version.java @@ -0,0 +1,1004 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +/** + * + * + *
+ * The Data Fusion version.
+ * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Version} + */ +public final class Version extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datafusion.v1beta1.Version) + VersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Version.newBuilder() to construct. + private Version(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Version() { + versionNumber_ = ""; + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Version(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Version( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + versionNumber_ = s; + break; + } + case 16: + { + defaultVersion_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + availableFeatures_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = availableFeatures_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Version.class, + com.google.cloud.datafusion.v1beta1.Version.Builder.class); + } + + public static final int VERSION_NUMBER_FIELD_NUMBER = 1; + private volatile java.lang.Object versionNumber_; + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + @java.lang.Override + public java.lang.String getVersionNumber() { + java.lang.Object ref = versionNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionNumber_ = s; + return s; + } + } + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionNumberBytes() { + java.lang.Object ref = versionNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VERSION_FIELD_NUMBER = 2; + private boolean defaultVersion_; + /** + * + * + *
+   * Whether this is currently the default version for Cloud Data Fusion
+   * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + @java.lang.Override + public boolean getDefaultVersion() { + return defaultVersion_; + } + + public static final int AVAILABLE_FEATURES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList availableFeatures_; + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + public com.google.protobuf.ProtocolStringList getAvailableFeaturesList() { + return availableFeatures_; + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + public int getAvailableFeaturesCount() { + return availableFeatures_.size(); + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + public java.lang.String getAvailableFeatures(int index) { + return availableFeatures_.get(index); + } + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { + return availableFeatures_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getVersionNumberBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, versionNumber_); + } + if (defaultVersion_ != false) { + output.writeBool(2, defaultVersion_); + } + for (int i = 0; i < availableFeatures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, availableFeatures_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionNumberBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, versionNumber_); + } + if (defaultVersion_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, defaultVersion_); + } + { + int dataSize = 0; + for (int i = 0; i < availableFeatures_.size(); i++) { + dataSize += computeStringSizeNoTag(availableFeatures_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvailableFeaturesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datafusion.v1beta1.Version)) { + return super.equals(obj); + } + com.google.cloud.datafusion.v1beta1.Version other = + (com.google.cloud.datafusion.v1beta1.Version) obj; + + if (!getVersionNumber().equals(other.getVersionNumber())) return false; + if (getDefaultVersion() != other.getDefaultVersion()) return false; + if (!getAvailableFeaturesList().equals(other.getAvailableFeaturesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VERSION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getVersionNumber().hashCode(); + hash = (37 * hash) + DEFAULT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDefaultVersion()); + if (getAvailableFeaturesCount() > 0) { + hash = (37 * hash) + AVAILABLE_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getAvailableFeaturesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datafusion.v1beta1.Version parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datafusion.v1beta1.Version prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Data Fusion version.
+   * 
+ * + * Protobuf type {@code google.cloud.datafusion.v1beta1.Version} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datafusion.v1beta1.Version) + com.google.cloud.datafusion.v1beta1.VersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Version_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Version_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datafusion.v1beta1.Version.class, + com.google.cloud.datafusion.v1beta1.Version.Builder.class); + } + + // Construct using com.google.cloud.datafusion.v1beta1.Version.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + versionNumber_ = ""; + + defaultVersion_ = false; + + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datafusion.v1beta1.V1Beta1 + .internal_static_google_cloud_datafusion_v1beta1_Version_descriptor; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version getDefaultInstanceForType() { + return com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version build() { + com.google.cloud.datafusion.v1beta1.Version result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version buildPartial() { + com.google.cloud.datafusion.v1beta1.Version result = + new com.google.cloud.datafusion.v1beta1.Version(this); + int from_bitField0_ = bitField0_; + result.versionNumber_ = versionNumber_; + result.defaultVersion_ = defaultVersion_; + if (((bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = availableFeatures_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.availableFeatures_ = availableFeatures_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datafusion.v1beta1.Version) { + return mergeFrom((com.google.cloud.datafusion.v1beta1.Version) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datafusion.v1beta1.Version other) { + if (other == com.google.cloud.datafusion.v1beta1.Version.getDefaultInstance()) return this; + if (!other.getVersionNumber().isEmpty()) { + versionNumber_ = other.versionNumber_; + onChanged(); + } + if (other.getDefaultVersion() != false) { + setDefaultVersion(other.getDefaultVersion()); + } + if (!other.availableFeatures_.isEmpty()) { + if (availableFeatures_.isEmpty()) { + availableFeatures_ = other.availableFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAvailableFeaturesIsMutable(); + availableFeatures_.addAll(other.availableFeatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datafusion.v1beta1.Version parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datafusion.v1beta1.Version) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object versionNumber_ = ""; + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + public java.lang.String getVersionNumber() { + java.lang.Object ref = versionNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + public com.google.protobuf.ByteString getVersionNumberBytes() { + java.lang.Object ref = versionNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + versionNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @param value The versionNumber to set. + * @return This builder for chaining. + */ + public Builder setVersionNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersionNumber() { + + versionNumber_ = getDefaultInstance().getVersionNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version number of the Data Fusion instance, such as '6.0.1.0'.
+     * 
+ * + * string version_number = 1; + * + * @param value The bytes for versionNumber to set. + * @return This builder for chaining. + */ + public Builder setVersionNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionNumber_ = value; + onChanged(); + return this; + } + + private boolean defaultVersion_; + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + @java.lang.Override + public boolean getDefaultVersion() { + return defaultVersion_; + } + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @param value The defaultVersion to set. + * @return This builder for chaining. + */ + public Builder setDefaultVersion(boolean value) { + + defaultVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this is currently the default version for Cloud Data Fusion
+     * 
+ * + * bool default_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearDefaultVersion() { + + defaultVersion_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList availableFeatures_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAvailableFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + availableFeatures_ = new com.google.protobuf.LazyStringArrayList(availableFeatures_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + public com.google.protobuf.ProtocolStringList getAvailableFeaturesList() { + return availableFeatures_.getUnmodifiableView(); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + public int getAvailableFeaturesCount() { + return availableFeatures_.size(); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + public java.lang.String getAvailableFeatures(int index) { + return availableFeatures_.get(index); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + public com.google.protobuf.ByteString getAvailableFeaturesBytes(int index) { + return availableFeatures_.getByteString(index); + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param index The index to set the value at. + * @param value The availableFeatures to set. + * @return This builder for chaining. + */ + public Builder setAvailableFeatures(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableFeaturesIsMutable(); + availableFeatures_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param value The availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAvailableFeatures(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableFeaturesIsMutable(); + availableFeatures_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param values The availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAllAvailableFeatures(java.lang.Iterable values) { + ensureAvailableFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableFeatures_); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @return This builder for chaining. + */ + public Builder clearAvailableFeatures() { + availableFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a list of available feature names for a given version.
+     * 
+ * + * repeated string available_features = 3; + * + * @param value The bytes of the availableFeatures to add. + * @return This builder for chaining. + */ + public Builder addAvailableFeaturesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAvailableFeaturesIsMutable(); + availableFeatures_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datafusion.v1beta1.Version) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datafusion.v1beta1.Version) + private static final com.google.cloud.datafusion.v1beta1.Version DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datafusion.v1beta1.Version(); + } + + public static com.google.cloud.datafusion.v1beta1.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Version parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Version(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datafusion.v1beta1.Version getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java new file mode 100644 index 00000000..20616424 --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/java/com/google/cloud/datafusion/v1beta1/VersionOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datafusion/v1beta1/v1beta1.proto + +package com.google.cloud.datafusion.v1beta1; + +public interface VersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datafusion.v1beta1.Version) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The versionNumber. + */ + java.lang.String getVersionNumber(); + /** + * + * + *
+   * The version number of the Data Fusion instance, such as '6.0.1.0'.
+   * 
+ * + * string version_number = 1; + * + * @return The bytes for versionNumber. + */ + com.google.protobuf.ByteString getVersionNumberBytes(); + + /** + * + * + *
+   * Whether this is currently the default version for Cloud Data Fusion
+   * 
+ * + * bool default_version = 2; + * + * @return The defaultVersion. + */ + boolean getDefaultVersion(); + + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return A list containing the availableFeatures. + */ + java.util.List getAvailableFeaturesList(); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @return The count of availableFeatures. + */ + int getAvailableFeaturesCount(); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the element to return. + * @return The availableFeatures at the given index. + */ + java.lang.String getAvailableFeatures(int index); + /** + * + * + *
+   * Represents a list of available feature names for a given version.
+   * 
+ * + * repeated string available_features = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableFeatures at the given index. + */ + com.google.protobuf.ByteString getAvailableFeaturesBytes(int index); +} diff --git a/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto b/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto new file mode 100644 index 00000000..d3f9565f --- /dev/null +++ b/proto-google-cloud-data-fusion-v1beta1/src/main/proto/google/cloud/datafusion/v1beta1/v1beta1.proto @@ -0,0 +1,712 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.datafusion.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DataFusion.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/datafusion/v1beta1;datafusion"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datafusion.v1beta1"; +option php_namespace = "Google\\Cloud\\DataFusion\\V1beta1"; +option ruby_package = "Google::Cloud::DataFusion::V1beta1"; + +// Service for creating and managing Data Fusion instances. +// Data Fusion enables ETL developers to build code-free, data integration +// pipelines via a point-and-click UI. +service DataFusion { + option (google.api.default_host) = "datafusion.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists possible versions for Data Fusion instances in the specified project + // and location. + rpc ListAvailableVersions(ListAvailableVersionsRequest) + returns (ListAvailableVersionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists Data Fusion instances in the specified project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/instances" + }; + } + + // Gets details of a single Data Fusion instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/instances/*}" + }; + } + + // Creates a new Data Fusion instance in the specified project and location. + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Data Fusion instance. + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates a single Data Fusion instance. + rpc UpdateInstance(UpdateInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{instance.name=projects/*/locations/*/instances/*}" + body: "instance" + }; + option (google.api.method_signature) = "instance,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Restart a single Data Fusion instance. + // At the end of an operation instance is fully restarted. + rpc RestartInstance(RestartInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:restart" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Upgrade a single Data Fusion instance. + // At the end of an operation instance is fully upgraded. + rpc UpgradeInstance(UpgradeInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Remove IAM policy that is currently set on the given resource. + rpc RemoveIamPolicy(RemoveIamPolicyRequest) + returns (RemoveIamPolicyResponse) { + option (google.api.http) = { + post: "/v1beta1/{resource=projects/*/locations/*/**}:removeIamPolicy" + body: "*" + }; + } + + // List namespaces in a given instance + rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/instances/*}/namespaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Add DNS peering on the given resource. + rpc AddDnsPeering(AddDnsPeeringRequest) returns (AddDnsPeeringResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/instances/*}/dnsPeerings:add" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Remove DNS peering on the given resource. + rpc RemoveDnsPeering(RemoveDnsPeeringRequest) + returns (RemoveDnsPeeringResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/instances/*}/dnsPeerings:remove" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // List DNS peering for a given resource. + rpc ListDnsPeerings(ListDnsPeeringsRequest) + returns (ListDnsPeeringsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/instances/*}/dnsPeerings:list" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Network configuration for a Data Fusion instance. These configurations +// are used for peering with the customer network. Configurations are optional +// when a public Data Fusion instance is to be created. However, providing +// these configurations allows several benefits, such as reduced network latency +// while accessing the customer resources from managed Data Fusion instance +// nodes, as well as access to the customer on-prem resources. +message NetworkConfig { + // Name of the network in the customer project with which the Tenant Project + // will be peered for executing pipelines. In case of shared VPC where the + // network resides in another host project the network should specified in + // the form of projects/{host-project-id}/global/networks/{network} + string network = 1; + + // The IP range in CIDR notation to use for the managed Data Fusion instance + // nodes. This range must not overlap with any other ranges used in the Data + // Fusion instance network. + string ip_allocation = 2; +} + +// The Data Fusion version. +message Version { + // The version number of the Data Fusion instance, such as '6.0.1.0'. + string version_number = 1; + + // Whether this is currently the default version for Cloud Data Fusion + bool default_version = 2; + + // Represents a list of available feature names for a given version. + repeated string available_features = 3; +} + +// Identifies Data Fusion accelerators for an instance. +message Accelerator { + // Each type represents an Accelerator (Add-On) supported by Cloud Data Fusion + // service. + enum AcceleratorType { + // Default value, if unspecified. + ACCELERATOR_TYPE_UNSPECIFIED = 0; + + // Change Data Capture accelerator for CDF. + CDC = 1; + + // Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud + // Healthcare specific CDF plugins developed by Healthcare team. + HEALTHCARE = 2; + } + + // The type of an accelator for a CDF instance. + AcceleratorType accelerator_type = 1; +} + +// The crypto key configuration. This field is used by the Customer-managed +// encryption keys (CMEK) feature. +message CryptoKeyConfig { + // The name of the key which is used to encrypt/decrypt customer data. For key + // in Cloud KMS, the key should be in the format of + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + string key_reference = 1; +} + +// Represents a Data Fusion instance. +message Instance { + option (google.api.resource) = { + type: "datafusion.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + }; + + // Represents the type of Data Fusion instance. Each type is configured with + // the default settings for processing and memory. + enum Type { + // No type specified. The instance creation will fail. + TYPE_UNSPECIFIED = 0; + + // Basic Data Fusion instance. In Basic type, the user will be able to + // create data pipelines using point and click UI. However, there are + // certain limitations, such as fewer number of concurrent pipelines, no + // support for streaming pipelines, etc. + BASIC = 1; + + // Enterprise Data Fusion instance. In Enterprise type, the user will have + // all features available, such as support for streaming pipelines, + // unlimited number of concurrent pipelines, etc. + ENTERPRISE = 2; + + // Developer Data Fusion instance. In Developer type, the user will have all + // features available but with restrictive capabilities. This is to help + // enterprises design and develop their data ingestion and integration + // pipelines at low cost. + DEVELOPER = 3; + } + + // Represents the state of a Data Fusion instance + enum State { + // Instance does not have a state yet + STATE_UNSPECIFIED = 0; + + // Instance is being created + CREATING = 1; + + // Instance is running and ready for requests + RUNNING = 2; + + // Instance creation failed + FAILED = 3; + + // Instance is being deleted + DELETING = 4; + + // Instance is being upgraded + UPGRADING = 5; + + // Instance is being restarted + RESTARTING = 6; + + // Instance is being updated on customer request + UPDATING = 7; + + // Instance is being auto-updated + AUTO_UPDATING = 8; + + // Instance is being auto-upgraded + AUTO_UPGRADING = 9; + } + + // Output only. The name of this instance is in the form of + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of this instance. + string description = 2; + + // Required. Instance type. + Type type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Option to enable Stackdriver Logging. + bool enable_stackdriver_logging = 4; + + // Option to enable Stackdriver Monitoring. + bool enable_stackdriver_monitoring = 5; + + // Specifies whether the Data Fusion instance should be private. If set to + // true, all Data Fusion nodes will have private IP addresses and will not be + // able to access the public internet. + bool private_instance = 6; + + // Network configuration options. These are required when a private Data + // Fusion instance is to be created. + NetworkConfig network_config = 7; + + // The resource labels for instance to use to annotate any related underlying + // resources such as Compute Engine VMs. The character '=' is not allowed to + // be used within the labels. + map labels = 8; + + // Map of additional options used to configure the behavior of + // Data Fusion instance. + map options = 9; + + // Output only. The time the instance was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the instance was last updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of this Data Fusion instance. + State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state of this Data + // Fusion instance if available. + string state_message = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Endpoint on which the Data Fusion UI is accessible. + string service_endpoint = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Name of the zone in which the Data Fusion instance will be created. Only + // DEVELOPER instances use this field. + string zone = 15; + + // Current version of Data Fusion. + string version = 16; + + // Output only. Deprecated. Use tenant_project_id instead to extract the + // tenant project ID. + string service_account = 17 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name for an instance. + string display_name = 18; + + // Available versions that the instance can be upgraded to using + // UpdateInstanceRequest. + repeated Version available_version = 19; + + // Output only. Endpoint on which the REST APIs is accessible. + string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Storage bucket generated by Data Fusion in the customer + // project. + string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // List of accelerators enabled for this CDF instance. + repeated Accelerator accelerators = 22; + + // Output only. P4 service account for the customer project. + string p4_service_account = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the tenant project. + string tenant_project_id = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-managed service account to set on Dataproc when Cloud Data Fusion + // creates Dataproc to run data processing pipelines. + // + // This allows users to have fine-grained access control on Dataproc's + // accesses to cloud resources. + string dataproc_service_account = 25; + + // Option to enable granular role-based access control. + bool enable_rbac = 26; + + // The crypto key configuration. This field is used by the Customer-Managed + // Encryption Keys (CMEK) feature. + CryptoKeyConfig crypto_key_config = 27; +} + +// Request message for listing Data Fusion instances. +message ListInstancesRequest { + // The project and location for which to retrieve instance information + // in the format projects/{project}/locations/{location}. If the location is + // specified as '-' (wildcard), then all regions available to the project + // are queried, and the results are aggregated. + string parent = 1; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // List filter. + string filter = 4; + + // Sort results. Supported values are "name", "name desc", or "" (unsorted). + string order_by = 5; +} + +// Response message for the list instance request. +message ListInstancesResponse { + // Represents a list of Data Fusion instances. + repeated Instance instances = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for the list available versions request. +message ListAvailableVersionsRequest { + // Required. The project and location for which to retrieve instance + // information in the format projects/{project}/locations/{location}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Whether or not to return the latest patch of every available minor version. + // If true, only the latest patch will be returned. Ex. if allowed versions is + // [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0] + bool latest_patch_only = 4; +} + +// Response message for the list available versions request. +message ListAvailableVersionsResponse { + // Represents a list of versions that are supported. + repeated Version available_versions = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Request message for getting details about a Data Fusion instance. +message GetInstanceRequest { + // The instance resource name in the format + // projects/{project}/locations/{location}/instances/{instance}. + string name = 1; +} + +// Request message for creating a Data Fusion instance. +message CreateInstanceRequest { + // The instance's project and location in the format + // projects/{project}/locations/{location}. + string parent = 1; + + // The name of the instance to create. + string instance_id = 2; + + // An instance resource. + Instance instance = 3; +} + +// Request message for deleting a Data Fusion instance. +message DeleteInstanceRequest { + // The instance resource name in the format + // projects/{project}/locations/{location}/instances/{instance} + string name = 1; +} + +// Request message for updating a Data Fusion instance. +// Data Fusion only allows updating the labels, options, and stack driver +// settings. +message UpdateInstanceRequest { + // The instance resource that replaces the resource on the server. Currently, + // Data Fusion only allows replacing labels, options, and stack driver + // settings. All other fields will be ignored. + Instance instance = 1; + + // Field mask is used to specify the fields that the update will overwrite + // in an instance resource. The fields specified in the update_mask are + // relative to the resource, not the full request. + // A field will be overwritten if it is in the mask. + // If the user does not provide a mask, all the supported fields (labels and + // options currently) will be overwritten. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for restarting a Data Fusion instance. +message RestartInstanceRequest { + // Name of the Data Fusion instance which need to be restarted in the form of + // projects/{project}/locations/{location}/instances/{instance} + string name = 1; +} + +// Request message for upgrading a Data Fusion instance. +// To change the instance properties, instance update should be used. +message UpgradeInstanceRequest { + // Name of the Data Fusion instance which need to be upgraded in the form of + // projects/{project}/locations/{location}/instances/{instance} + // Instance will be upgraded with the latest stable version of the Data + // Fusion. + string name = 1; +} + +// Represents the metadata of a long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation if any. + string status_detail = 5; + + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6; + + // API version used to start the operation. + string api_version = 7; +} + +// Request message for RemoveIamPolicy method. +message RemoveIamPolicyRequest { + // The resource on which IAM policy to be removed is attached to. + string resource = 1; +} + +// Response message for RemoveIamPolicy method. +message RemoveIamPolicyResponse {} + +// List namespaces request. +message ListNamespacesRequest { + // Required. The instance to list its namespaces. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // By default, only basic information about a namespace is returned + // (e.g. name). When `NAMESPACE_VIEW_FULL` is specified, additional + // information associated with a namespace gets returned + // (e.g. IAM policy set on the namespace) + NamespaceView view = 4; +} + +// IAMPolicy encapsulates the IAM policy name, definition and status of +// policy fetching. +message IAMPolicy { + // Policy definition if IAM policy fetching is successful, + // otherwise empty. + google.iam.v1.Policy policy = 1; + + // Status of iam policy fetching. + google.rpc.Status status = 2; +} + +// Represents the information of a namespace +message Namespace { + option (google.api.resource) = { + type: "datafusion.googleapis.com/Namespace" + pattern: "projects/{project}/locations/{location}/instances/{instance}/namespaces/{namespace}" + }; + + // Name of the given namespace. + string name = 1; + + // IAM policy associated with this namespace. + IAMPolicy iam_policy = 2; +} + +// List namespaces response. +message ListNamespacesResponse { + // List of namespaces + repeated Namespace namespaces = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// DNS peering configuration. These configurations are used to create +// DNS peering with the customer Cloud DNS. +message DnsPeering { + // Required. Name of the zone. + string zone = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the dns. + string domain = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Optional description of the dns zone. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional target project to which dns peering should happen. + string target_project = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional target network to which dns peering should happen. + string target_network = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message to create dns peering. +message AddDnsPeeringRequest { + // The resource on which DNS peering will be created. + string parent = 1; + + // Dns peering config. + DnsPeering dns_peering = 2; +} + +// Response message for set dns peering method. +message AddDnsPeeringResponse {} + +// A view for Namespace +enum NamespaceView { + // Default/unset value, which will use BASIC view. + NAMESPACE_VIEW_UNSPECIFIED = 0; + + // Show the most basic metadata of a namespace + NAMESPACE_VIEW_BASIC = 1; + + // Returns all metadata of a namespace + NAMESPACE_VIEW_FULL = 2; +} + +// Request message to remove dns peering. +message RemoveDnsPeeringRequest { + // The resource on which DNS peering will be removed. + string parent = 1; + + // Required. The zone to be removed. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for set dns peering method. +message RemoveDnsPeeringResponse {} + +// List dns peering request. +message ListDnsPeeringsRequest { + // Required. The resource on which dns peering will be listed. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datafusion.googleapis.com/Instance" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; +} + +// List dns peering response. +message ListDnsPeeringsResponse { + // List of dns peering configs. + repeated DnsPeering dns_peerings = 1; + + // Token to retrieve the next page of results or empty if there are no more + // results in the list. + string next_page_token = 2; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..711af8a6 --- /dev/null +++ b/renovate.json @@ -0,0 +1,73 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-data-fusion", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..626c56be --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + data-fusion-install-without-bom + jar + Google Cloud Data Fusion Install Without Bom + https://github.com/googleapis/java-data-fusion + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-data-fusion + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..8b6eb1be --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-data-fusion-samples + 0.0.1-SNAPSHOT + pom + Google Cloud Data Fusion Samples Parent + https://github.com/googleapis/java-data-fusion + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 00000000..e776c768 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + data-fusion-snapshot + jar + Google Cloud Data Fusion Snapshot Samples + https://github.com/googleapis/java-data-fusion + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-data-fusion + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 00000000..8c7a3134 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + data-fusion-snippets + jar + Google Cloud Data Fusion Snippets + https://github.com/googleapis/java-data-fusion + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-data-fusion + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..ffcd88ff --- /dev/null +++ b/versions.txt @@ -0,0 +1,8 @@ +# Format: +# module:released-version:current-version + +google-cloud-data-fusion:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-data-fusion-v1beta1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-data-fusion-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-data-fusion-v1beta1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-data-fusion-v1:0.0.0:0.0.1-SNAPSHOT