diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 9351fdfb..00000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 68b4814f..00000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# 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/cloud-devrel-public-resources/owlbot-java:latest" - -deep-remove-regex: -- "/grpc-google-.*/src" -- "/proto-google-.*/src" -- "/google-.*/src" - -deep-preserve-regex: -- "/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v.*/it/ITSystemTest.java" - -deep-copy-regex: -- source: "/google/cloud/dataproc/(v.*)/.*-java/proto-google-.*/src" - dest: "/owl-bot-staging/$1/proto-google-cloud-dataproc-$1/src" -- source: "/google/cloud/dataproc/(v.*)/.*-java/grpc-google-.*/src" - dest: "/owl-bot-staging/$1/grpc-google-cloud-dataproc-$1/src" -- source: "/google/cloud/dataproc/(v.*)/.*-java/gapic-google-.*/src" - dest: "/owl-bot-staging/$1/google-cloud-dataproc/src" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index d0d7c99f..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,12 +0,0 @@ -# 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 - -# The @googleapis/api-dataproc is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/api-dataproc -**/*.java @googleapis/api-dataproc - -# 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 deleted file mode 100644 index 748a88f1..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -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-dataproc/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. 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 deleted file mode 100644 index 754e30c6..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -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 deleted file mode 100644 index 99586903..00000000 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -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 deleted file mode 100644 index 4c345b28..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -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-dataproc/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 # ☕️ - -If you write sample code, please follow the [samples format]( -https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml deleted file mode 100644 index 2176b054..00000000 --- a/.github/blunderbuss.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/main/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 deleted file mode 100644 index c644a24e..00000000 --- a/.github/generated-files-bot.yml +++ /dev/null @@ -1,12 +0,0 @@ -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/release-trigger.yml b/.github/release-trigger.yml index d4ca9418..67c70eb2 100644 --- a/.github/release-trigger.yml +++ b/.github/release-trigger.yml @@ -1 +1,2 @@ enabled: true +multiScmName: java-dataproc diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 6f09d695..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,42 +0,0 @@ -rebaseMergeAllowed: false -squashMergeAllowed: true -mergeCommitAllowed: false -branchProtectionRules: - - pattern: main - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - clirr - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor - - pattern: java7 - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - clirr - - units (7) - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor -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 deleted file mode 100644 index a0ba1f7d..00000000 --- a/.github/trusted-contribution.yml +++ /dev/null @@ -1,3 +0,0 @@ -trustedContributors: -- renovate-bot -- gcf-owl-bot[bot] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml deleted file mode 100644 index 1bb18232..00000000 --- a/.github/workflows/approve-readme.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -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@v5 - 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 deleted file mode 100644 index 18e23230..00000000 --- a/.github/workflows/auto-release.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-release -jobs: - approve: - runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-please') - steps: - - uses: actions/github-script@v5 - 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(main): release " - if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { - return; - } - - // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.rest.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.rest.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.rest.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.rest.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 deleted file mode 100644 index 6b5e56aa..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - push: - branches: - - main - pull_request: -name: ci -jobs: - units: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: zulu - 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@v2 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.bat - env: - JOB_TYPE: test - dependencies: - runs-on: ubuntu-latest - strategy: - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/dependencies.sh - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: zulu - java-version: 11 - - 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@v2 - with: - distribution: zulu - 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 deleted file mode 100644 index d5d964df..00000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -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 deleted file mode 100644 index 1956161c..00000000 --- a/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -.gitignore - -# Packages -dist -bin -var -sdist -target - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg - -.metadata -.project -.pydevproject -*.iml -.idea -.settings -.DS_Store -.classpath - -# Built documentation -docs/ - - -# Wheel directory used in Travis builds. -gcloud-java-wheels/ -src/test/resources/gcd-head.zip -src/test/resources/gcd-v1beta2-rev1-2.1.1.zip - -# API key file containing value of GOOGLE_API_KEY for integration tests -api_key - -# Python utilities -*.pyc -artman-genfiles - -.flattened-pom.xml diff --git a/.kokoro/build.bat b/.kokoro/build.bat deleted file mode 100644 index cc602c9e..00000000 --- a/.kokoro/build.bat +++ /dev/null @@ -1,18 +0,0 @@ -:: See documentation in type-shell-output.bat -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. - -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh deleted file mode 100755 index e1ad4ed9..00000000 --- a/.kokoro/build.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/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 -ntp -Dclirr.skip=true -Denforcer.skip=true - RETURN_CODE=$? - ;; -lint) - mvn com.coveo:fmt-maven-plugin:check -B -ntp - RETURN_CODE=$? - ;; -javadoc) - mvn javadoc:javadoc javadoc:test-javadoc -B -ntp - RETURN_CODE=$? - ;; -integration) - mvn -B ${INTEGRATION_TEST_ARGS} \ - -ntp \ - -Penable-integration-tests \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - ;; -graalvm) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test - 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 \ - -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 -ntp -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_FLAKYBOT}" == "true" ]] -then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot - ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-dataproc -fi - -echo "exiting with ${RETURN_CODE}" -exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh deleted file mode 100755 index 46edbf7f..00000000 --- a/.kokoro/coerce_logs.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/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 deleted file mode 100644 index 1de7c956..00000000 --- a/.kokoro/common.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# 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-dataproc/.kokoro/trampoline.sh" - -# Tell the trampoline which build file to use. -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/build.sh" -} diff --git a/.kokoro/common.sh b/.kokoro/common.sh deleted file mode 100644 index ace89f45..00000000 --- a/.kokoro/common.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 deleted file mode 100644 index 3bf031d0..00000000 --- a/.kokoro/continuous/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# 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-dataproc/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/continuous/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh deleted file mode 100755 index ac879db3..00000000 --- a/.kokoro/continuous/propose_release.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then - # Groom the release PR as new commits are merged. - npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ - --repo-url=googleapis/java-dataproc \ - --package-name="dataproc" \ - --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ - --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ - --release-type=java-yoshi -fi diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh deleted file mode 100755 index d7476cfe..00000000 --- a/.kokoro/dependencies.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/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 - -function determineMavenOpts() { - local javaVersion=$( - # filter down to the version line, then pull out the version between quotes, - # then trim the version number down to its minimal number (removing any - # update or suffix number). - java -version 2>&1 | grep "version" \ - | sed -E 's/^.*"(.*?)".*$/\1/g' \ - | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' - ) - - if [[ $javaVersion == 17* ]] - then - # MaxPermSize is no longer supported as of jdk 17 - echo -n "-Xmx1024m" - else - echo -n "-Xmx1024m -XX:MaxPermSize=128m" - fi -} - -export MAVEN_OPTS=$(determineMavenOpts) - -# 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 deleted file mode 100644 index 3bf031d0..00000000 --- a/.kokoro/nightly/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# 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-dataproc/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg deleted file mode 100644 index e51c7b4c..00000000 --- a/.kokoro/nightly/integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# 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_FLAKYBOT" - 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-integration.cfg b/.kokoro/nightly/java11-integration.cfg deleted file mode 100644 index 58049cc3..00000000 --- a/.kokoro/nightly/java11-integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/java11014" -} - -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_FLAKYBOT" - 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 deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/nightly/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/nightly/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg deleted file mode 100644 index 9dd53731..00000000 --- a/.kokoro/nightly/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-dataproc/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg deleted file mode 100644 index 29a47726..00000000 --- a/.kokoro/nightly/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-dataproc/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/nightly/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg deleted file mode 100644 index 9761fd86..00000000 --- a/.kokoro/nightly/samples.cfg +++ /dev/null @@ -1,38 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "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_FLAKYBOT" - value: "true" -} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh deleted file mode 100755 index f5251425..00000000 --- a/.kokoro/populate-secrets.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 deleted file mode 100644 index ec572442..00000000 --- a/.kokoro/presubmit/clirr.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "clirr" -} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg deleted file mode 100644 index 2fea3234..00000000 --- a/.kokoro/presubmit/common.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# 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-dataproc/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.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 deleted file mode 100644 index b3dc0718..00000000 --- a/.kokoro/presubmit/dependencies.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/dependencies.sh" -} diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg deleted file mode 100644 index 4c7225ec..00000000 --- a/.kokoro/presubmit/graalvm-native.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" -} - -env_vars: { - key: "JOB_TYPE" - value: "graalvm" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg deleted file mode 100644 index dded67a9..00000000 --- a/.kokoro/presubmit/integration.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} - -# 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 deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/presubmit/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/presubmit/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg deleted file mode 100644 index 9dd53731..00000000 --- a/.kokoro/presubmit/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-dataproc/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg deleted file mode 100644 index 29a47726..00000000 --- a/.kokoro/presubmit/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-dataproc/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/presubmit/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg deleted file mode 100644 index 458a3b73..00000000 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/linkage-monitor.sh" -} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg deleted file mode 100644 index 6d323c8a..00000000 --- a/.kokoro/presubmit/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg deleted file mode 100644 index 01e09600..00000000 --- a/.kokoro/presubmit/samples.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "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 deleted file mode 100755 index 19b977e6..00000000 --- a/.kokoro/readme.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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-dataproc - -# 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-dataproc \ - --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 deleted file mode 100644 index 0aa62eed..00000000 --- a/.kokoro/release/bump_snapshot.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# 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-dataproc/.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-dataproc/.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/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh deleted file mode 100755 index a6422a52..00000000 --- a/.kokoro/release/bump_snapshot.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then - # Groom the snapshot release PR immediately after publishing a release - npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ - --repo-url=googleapis/java-dataproc \ - --package-name="dataproc" \ - --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ - --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ - --snapshot \ - --release-type=java-auth-yoshi -fi diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg deleted file mode 100644 index c161698a..00000000 --- a/.kokoro/release/common.cfg +++ /dev/null @@ -1,49 +0,0 @@ -# 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-dataproc/.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 deleted file mode 100755 index 7f78ee41..00000000 --- a/.kokoro/release/common.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# 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 deleted file mode 100644 index f9764cb2..00000000 --- a/.kokoro/release/drop.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/release/drop.sh" -} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh deleted file mode 100755 index 742ec1a8..00000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# 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 deleted file mode 100644 index ce611a84..00000000 --- a/.kokoro/release/promote.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/release/promote.sh" -} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh deleted file mode 100755 index 3cac3d8a..00000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# 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 deleted file mode 100644 index 5e9f8e43..00000000 --- a/.kokoro/release/publish_javadoc.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# 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-dataproc/.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 deleted file mode 100755 index e8ab72fe..00000000 --- a/.kokoro/release/publish_javadoc.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/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 - -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-dataproc -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 deleted file mode 100644 index 41ce051b..00000000 --- a/.kokoro/release/publish_javadoc11.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# 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-dataproc/.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 deleted file mode 100755 index 0890a208..00000000 --- a/.kokoro/release/publish_javadoc11.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# 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. - -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-dataproc -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# cloud RAD generation -mvn clean javadoc:aggregate -B -q -P docFX -# include CHANGELOG -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 deleted file mode 100644 index 3c27185e..00000000 --- a/.kokoro/release/snapshot.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/release/snapshot.sh" -} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh deleted file mode 100755 index 1f55b770..00000000 --- a/.kokoro/release/snapshot.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/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 deleted file mode 100644 index 8d302abc..00000000 --- a/.kokoro/release/stage.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/release/stage.sh" -} - -# Need to save the properties file -action { - define_artifacts { - regex: "github/java-dataproc/target/nexus-staging/staging/*.properties" - strip_prefix: "github/java-dataproc" - } -} - -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 deleted file mode 100755 index 77dc4e8f..00000000 --- a/.kokoro/release/stage.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# 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 deleted file mode 100644 index 8b69b793..00000000 --- a/.kokoro/trampoline.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# 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 deleted file mode 100644 index 23421b0c..00000000 --- a/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_shortname": "dataproc", - "name_pretty": "Dataproc", - "product_documentation": "https://cloud.google.com/dataproc", - "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/history", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559745", - "release_level": "stable", - "language": "java", - "repo": "googleapis/java-dataproc", - "repo_short": "java-dataproc", - "distribution_name": "com.google.cloud:google-cloud-dataproc", - "codeowner_team": "@googleapis/api-dataproc", - "api_id": "dataproc.googleapis.com", - "transport": "grpc", - "requires_billing": true, - "api_description": "is a faster, easier, more cost-effective way to run Apache Spark and Apache Hadoop.", - "library_type": "GAPIC_AUTO" - } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 83911042..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,519 +0,0 @@ -# Changelog - -### [2.3.2](https://github.com/googleapis/java-dataproc/compare/v2.3.1...v2.3.2) (2022-02-03) - - -### Dependencies - -* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-dataproc/issues/1339)) ([#777](https://github.com/googleapis/java-dataproc/issues/777)) ([2477ea5](https://github.com/googleapis/java-dataproc/commit/2477ea5fb5c8e35847d76b27f8359ca8c92ae47a)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#779](https://github.com/googleapis/java-dataproc/issues/779)) ([6040385](https://github.com/googleapis/java-dataproc/commit/6040385f4cec61ab7a5d443b864344308bec66ae)) -* update dependency com.google.cloud:google-cloud-storage to v2.2.3 ([#765](https://github.com/googleapis/java-dataproc/issues/765)) ([d4f4a2e](https://github.com/googleapis/java-dataproc/commit/d4f4a2ebb1a1f7d9fb71642f69d135f81798583e)) -* update dependency com.google.cloud:google-cloud-storage to v2.3.0 ([#775](https://github.com/googleapis/java-dataproc/issues/775)) ([b538d4d](https://github.com/googleapis/java-dataproc/commit/b538d4dc66131239ac988950d9e2b8b7006a1b9f)) - -### [2.3.1](https://www.github.com/googleapis/java-dataproc/compare/v2.3.0...v2.3.1) (2022-01-07) - - -### Bug Fixes - -* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-dataproc/issues/1299)) ([#746](https://www.github.com/googleapis/java-dataproc/issues/746)) ([1cfdaae](https://www.github.com/googleapis/java-dataproc/commit/1cfdaae5ef043a12c5bb9debf3bb8f1ffe366b5f)) -* **java:** run Maven in plain console-friendly mode ([#1301](https://www.github.com/googleapis/java-dataproc/issues/1301)) ([#755](https://www.github.com/googleapis/java-dataproc/issues/755)) ([5035a44](https://www.github.com/googleapis/java-dataproc/commit/5035a44dcedf0d993c750086c78813b886fceca3)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#760](https://www.github.com/googleapis/java-dataproc/issues/760)) ([04a07b6](https://www.github.com/googleapis/java-dataproc/commit/04a07b6689f6a7df8410ddf7f454c2a639650939)) -* update dependency com.google.cloud:google-cloud-storage to v2.2.2 ([#748](https://www.github.com/googleapis/java-dataproc/issues/748)) ([e5cd53a](https://www.github.com/googleapis/java-dataproc/commit/e5cd53a670fe6efd712ee2415604feceb68ad3d0)) - -## [2.3.0](https://www.github.com/googleapis/java-dataproc/compare/v2.2.2...v2.3.0) (2021-12-03) - - -### Features - -* Add support for dataproc BatchController service ([#719](https://www.github.com/googleapis/java-dataproc/issues/719)) ([4556a3f](https://www.github.com/googleapis/java-dataproc/commit/4556a3fc0de8e432c0abd12b5ee0d6b013448b36)) - - -### Bug Fixes - -* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-dataproc/issues/1266)) ([#727](https://www.github.com/googleapis/java-dataproc/issues/727)) ([9d9c9cf](https://www.github.com/googleapis/java-dataproc/commit/9d9c9cf8c70f845fc8f189644df1d64464d44492)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#737](https://www.github.com/googleapis/java-dataproc/issues/737)) ([e0ea4e9](https://www.github.com/googleapis/java-dataproc/commit/e0ea4e9ef10df26733ddba5a0eb084e32ee043e3)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#743](https://www.github.com/googleapis/java-dataproc/issues/743)) ([8efd821](https://www.github.com/googleapis/java-dataproc/commit/8efd821b00f1b64d35e78ccdf8f2ea72277575cf)) -* update dependency com.google.cloud:google-cloud-storage to v2.2.0 ([#729](https://www.github.com/googleapis/java-dataproc/issues/729)) ([dc2a3b4](https://www.github.com/googleapis/java-dataproc/commit/dc2a3b40bd2aa8a22483b6698c994940ebead9b1)) -* update dependency com.google.cloud:google-cloud-storage to v2.2.1 ([#738](https://www.github.com/googleapis/java-dataproc/issues/738)) ([9449a98](https://www.github.com/googleapis/java-dataproc/commit/9449a98d0293c0a3f426e2391068195d05e9df32)) - -### [2.2.2](https://www.github.com/googleapis/java-dataproc/compare/v2.2.1...v2.2.2) (2021-10-20) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v2.1.9 ([#721](https://www.github.com/googleapis/java-dataproc/issues/721)) ([376b0bf](https://www.github.com/googleapis/java-dataproc/commit/376b0bf38aaefe6f13ee604c830fa6967247bd6f)) - -### [2.2.1](https://www.github.com/googleapis/java-dataproc/compare/v2.2.0...v2.2.1) (2021-10-19) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#716](https://www.github.com/googleapis/java-dataproc/issues/716)) ([2ae9ae0](https://www.github.com/googleapis/java-dataproc/commit/2ae9ae0b4f222e67c32a2ea41f1dda6bf2d73cb9)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.6 ([#701](https://www.github.com/googleapis/java-dataproc/issues/701)) ([dc7de22](https://www.github.com/googleapis/java-dataproc/commit/dc7de2234aaff6582d9f3c302b7de97671838d4f)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.7 ([#709](https://www.github.com/googleapis/java-dataproc/issues/709)) ([dda0313](https://www.github.com/googleapis/java-dataproc/commit/dda03134149ba95f5061dbc60ad7ba9c05cedf38)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.8 ([#715](https://www.github.com/googleapis/java-dataproc/issues/715)) ([91cfd37](https://www.github.com/googleapis/java-dataproc/commit/91cfd376bce87b492fdb9319dffb5d109ec62526)) - -## [2.2.0](https://www.github.com/googleapis/java-dataproc/compare/v2.1.4...v2.2.0) (2021-09-22) - - -### Features - -* delete deprecated Dataproc v1beta2 API client ([#651](https://www.github.com/googleapis/java-dataproc/issues/651)) ([1415252](https://www.github.com/googleapis/java-dataproc/commit/1415252bc06133dfa2db43feccfcbc448e60672a)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#696](https://www.github.com/googleapis/java-dataproc/issues/696)) ([e0e66e1](https://www.github.com/googleapis/java-dataproc/commit/e0e66e1c3cf4bab0ac939343a4b35de4d3dce4b1)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.4 ([#693](https://www.github.com/googleapis/java-dataproc/issues/693)) ([d83fee0](https://www.github.com/googleapis/java-dataproc/commit/d83fee0d7c6f766324a01624c73b017488656129)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.5 ([#697](https://www.github.com/googleapis/java-dataproc/issues/697)) ([fcd23bf](https://www.github.com/googleapis/java-dataproc/commit/fcd23bf81f0de10084e20874f8bc5f6a07307612)) - -### [2.1.4](https://www.github.com/googleapis/java-dataproc/compare/v2.1.3...v2.1.4) (2021-09-16) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v2.1.3 ([#688](https://www.github.com/googleapis/java-dataproc/issues/688)) ([35f38a3](https://www.github.com/googleapis/java-dataproc/commit/35f38a3b3ad8de2c6ef4c0804c0b6f29f75c020c)) - -### [2.1.3](https://www.github.com/googleapis/java-dataproc/compare/v2.1.2...v2.1.3) (2021-09-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v2.1.2 ([#684](https://www.github.com/googleapis/java-dataproc/issues/684)) ([75390d1](https://www.github.com/googleapis/java-dataproc/commit/75390d1ada45101c679bbd271e98ac7070b22c20)) - -### [2.1.2](https://www.github.com/googleapis/java-dataproc/compare/v2.1.1...v2.1.2) (2021-09-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#679](https://www.github.com/googleapis/java-dataproc/issues/679)) ([31ab3b9](https://www.github.com/googleapis/java-dataproc/commit/31ab3b91450f0f6a8993182bda17e535abd3b1d6)) - -### [2.1.1](https://www.github.com/googleapis/java-dataproc/compare/v2.1.0...v2.1.1) (2021-09-03) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v2.1.1 ([#663](https://www.github.com/googleapis/java-dataproc/issues/663)) ([461cb95](https://www.github.com/googleapis/java-dataproc/commit/461cb9504957d3a6a11f53c019ed230bd1d8fac0)) - -## [2.1.0](https://www.github.com/googleapis/java-dataproc/compare/v2.0.2...v2.1.0) (2021-08-31) - - -### Features - -* Remove use of deprecated gradle command in java README ([#1196](https://www.github.com/googleapis/java-dataproc/issues/1196)) ([#655](https://www.github.com/googleapis/java-dataproc/issues/655)) ([abd29be](https://www.github.com/googleapis/java-dataproc/commit/abd29beeb85a2e2bf9063c54d51f7339fbfb1c42)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#658](https://www.github.com/googleapis/java-dataproc/issues/658)) ([313dab9](https://www.github.com/googleapis/java-dataproc/commit/313dab9c1f34626ca3c2f97a93891786426b04c3)) -* update dependency com.google.cloud:google-cloud-storage to v2.1.0 ([#652](https://www.github.com/googleapis/java-dataproc/issues/652)) ([3cc8f67](https://www.github.com/googleapis/java-dataproc/commit/3cc8f67b6695411043d01692b1cfcd1031437c1f)) - -### [2.0.2](https://www.github.com/googleapis/java-dataproc/compare/v2.0.1...v2.0.2) (2021-08-24) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#646](https://www.github.com/googleapis/java-dataproc/issues/646)) ([f150209](https://www.github.com/googleapis/java-dataproc/commit/f1502094726542302086beb76e3b371da2a36bf4)) -* update dependency com.google.cloud:google-cloud-storage to v2.0.2 ([#645](https://www.github.com/googleapis/java-dataproc/issues/645)) ([ca43a5b](https://www.github.com/googleapis/java-dataproc/commit/ca43a5b553403c3c2075da67f84733f522b488ae)) - -### [2.0.1](https://www.github.com/googleapis/java-dataproc/compare/v2.0.0...v2.0.1) (2021-08-12) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#635](https://www.github.com/googleapis/java-dataproc/issues/635)) ([bc5162a](https://www.github.com/googleapis/java-dataproc/commit/bc5162a46c5bef3829c18e32c93f7fc08c59c4da)) -* update dependency com.google.cloud:google-cloud-storage to v2.0.1 ([#636](https://www.github.com/googleapis/java-dataproc/issues/636)) ([12c182b](https://www.github.com/googleapis/java-dataproc/commit/12c182bae21b2a4a5ef38c09df729559380cc369)) - -## [2.0.0](https://www.github.com/googleapis/java-dataproc/compare/v1.5.4...v2.0.0) (2021-08-09) - - -### ⚠ BREAKING CHANGES - -* release gapic-generator-java v2.0.0 - -### Features - -* release gapic-generator-java v2.0.0 ([ff1784f](https://www.github.com/googleapis/java-dataproc/commit/ff1784fd5e2997fcf3cbbb69fcfd49cc29bcbd44)) - -### [1.5.4](https://www.github.com/googleapis/java-dataproc/compare/v1.5.3...v1.5.4) (2021-08-09) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2 ([#625](https://www.github.com/googleapis/java-dataproc/issues/625)) ([6c7c935](https://www.github.com/googleapis/java-dataproc/commit/6c7c9350381ba1543e05dd8f9804b545e7342a1c)) -* update dependency com.google.cloud:google-cloud-storage to v1.118.0 ([#604](https://www.github.com/googleapis/java-dataproc/issues/604)) ([e2fb23c](https://www.github.com/googleapis/java-dataproc/commit/e2fb23cd2bad3bce5d13a2891ff8a4f8d0085cc7)) -* update dependency com.google.cloud:google-cloud-storage to v2 ([#629](https://www.github.com/googleapis/java-dataproc/issues/629)) ([2541ee5](https://www.github.com/googleapis/java-dataproc/commit/2541ee5a9ef7d27c217355875bf5ae3d3699fe22)) - -### [1.5.3](https://www.github.com/googleapis/java-dataproc/compare/v1.5.2...v1.5.3) (2021-07-05) - - -### Bug Fixes - -* Add `shopt -s nullglob` to dependencies script ([#1130](https://www.github.com/googleapis/java-dataproc/issues/1130)) ([#588](https://www.github.com/googleapis/java-dataproc/issues/588)) ([f19587f](https://www.github.com/googleapis/java-dataproc/commit/f19587f164b3961095ee2ffd4f6e37b57f6f79f3)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#593](https://www.github.com/googleapis/java-dataproc/issues/593)) ([55fb5f4](https://www.github.com/googleapis/java-dataproc/commit/55fb5f42b7e06ca1b590c0f8bc8d8dd0f3677c75)) -* update dependency com.google.cloud:google-cloud-storage to v1.117.1 ([#592](https://www.github.com/googleapis/java-dataproc/issues/592)) ([c6e3f76](https://www.github.com/googleapis/java-dataproc/commit/c6e3f76289f6703c627b899ce9397ac5d3e2d338)) - -### [1.5.2](https://www.github.com/googleapis/java-dataproc/compare/v1.5.1...v1.5.2) (2021-06-04) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 ([#572](https://www.github.com/googleapis/java-dataproc/issues/572)) ([525af16](https://www.github.com/googleapis/java-dataproc/commit/525af16403796180618787c4bca29777104a66bc)) - -### [1.5.1](https://www.github.com/googleapis/java-dataproc/compare/v1.5.0...v1.5.1) (2021-06-02) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v1.115.0 ([#565](https://www.github.com/googleapis/java-dataproc/issues/565)) ([9183a22](https://www.github.com/googleapis/java-dataproc/commit/9183a2251b9fbaf07b62ad6fa2e2dc04659ec779)) - -## [1.5.0](https://www.github.com/googleapis/java-dataproc/compare/v1.4.3...v1.5.0) (2021-05-31) - - -### Features - -* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#554](https://www.github.com/googleapis/java-dataproc/issues/554)) ([c6fbf45](https://www.github.com/googleapis/java-dataproc/commit/c6fbf45f964242cd249e6aebfd85b8d63cf1697c)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#553](https://www.github.com/googleapis/java-dataproc/issues/553)) ([2fe5a5d](https://www.github.com/googleapis/java-dataproc/commit/2fe5a5de5ad05ac83c948d59edb1fecb6f3f12d6)) - -### [1.4.3](https://www.github.com/googleapis/java-dataproc/compare/v1.4.2...v1.4.3) (2021-05-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#544](https://www.github.com/googleapis/java-dataproc/issues/544)) ([67fcadd](https://www.github.com/googleapis/java-dataproc/commit/67fcadd562407d01b8aca7551ea4bc4e57c5940f)) -* update dependency com.google.cloud:google-cloud-storage to v1.114.0 ([#545](https://www.github.com/googleapis/java-dataproc/issues/545)) ([94c963c](https://www.github.com/googleapis/java-dataproc/commit/94c963cf511c7a5e75bca7e145fad626bf8a5c5c)) - -### [1.4.2](https://www.github.com/googleapis/java-dataproc/compare/v1.4.1...v1.4.2) (2021-04-26) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v1.113.16 ([#526](https://www.github.com/googleapis/java-dataproc/issues/526)) ([779d5b5](https://www.github.com/googleapis/java-dataproc/commit/779d5b5e99b6124911784d5973aa66e47777845c)) - -### [1.4.1](https://www.github.com/googleapis/java-dataproc/compare/v1.4.0...v1.4.1) (2021-04-23) - - -### Bug Fixes - -* release scripts from issuing overlapping phases ([#512](https://www.github.com/googleapis/java-dataproc/issues/512)) ([077e71d](https://www.github.com/googleapis/java-dataproc/commit/077e71d177ce1cd2827006ab60f56f05888a8b1d)) -* typo ([#508](https://www.github.com/googleapis/java-dataproc/issues/508)) ([894ce84](https://www.github.com/googleapis/java-dataproc/commit/894ce84afaada6edeb85809802522e81d2ba1f9d)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#515](https://www.github.com/googleapis/java-dataproc/issues/515)) ([863dbc9](https://www.github.com/googleapis/java-dataproc/commit/863dbc99d71f67776e919c6c6eb832ecd6cf516b)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#524](https://www.github.com/googleapis/java-dataproc/issues/524)) ([95606d8](https://www.github.com/googleapis/java-dataproc/commit/95606d8a28e55271fff71f3323e260bf9210f7ee)) -* update dependency com.google.cloud:google-cloud-storage to v1.113.15 ([#510](https://www.github.com/googleapis/java-dataproc/issues/510)) ([917ea60](https://www.github.com/googleapis/java-dataproc/commit/917ea60907308ac84583cbeeb05b1f0b6583600c)) - -## [1.4.0](https://www.github.com/googleapis/java-dataproc/compare/v1.3.0...v1.4.0) (2021-04-09) - - -### Features - -* update the Dataproc V1 API client library ([#497](https://www.github.com/googleapis/java-dataproc/issues/497)) ([3c78a97](https://www.github.com/googleapis/java-dataproc/commit/3c78a971133b3809ac3c962a1c07951480047c31)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#500](https://www.github.com/googleapis/java-dataproc/issues/500)) ([bc31368](https://www.github.com/googleapis/java-dataproc/commit/bc31368719be3083b5bb8ffe80ea9f3db7c69907)) -* update dependency com.google.cloud:google-cloud-storage to v1.113.14 ([#479](https://www.github.com/googleapis/java-dataproc/issues/479)) ([81b26b1](https://www.github.com/googleapis/java-dataproc/commit/81b26b1b38536ab2fc4c52796a19b66646072ccc)) - -## [1.3.0](https://www.github.com/googleapis/java-dataproc/compare/v1.2.1...v1.3.0) (2021-03-11) - - -### Features - -* **generator:** update protoc to v3.15.3 ([#462](https://www.github.com/googleapis/java-dataproc/issues/462)) ([ef5f0bc](https://www.github.com/googleapis/java-dataproc/commit/ef5f0bcf9981a1f61ed460f798b932b1d74291c0)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#475](https://www.github.com/googleapis/java-dataproc/issues/475)) ([42f464a](https://www.github.com/googleapis/java-dataproc/commit/42f464a672c0b6a2595a847de689b0e4171ee7f9)) -* update dependency com.google.cloud:google-cloud-storage to v1.113.13 ([#465](https://www.github.com/googleapis/java-dataproc/issues/465)) ([096f64a](https://www.github.com/googleapis/java-dataproc/commit/096f64a1773f2bc20c348a7e28e225439b56faca)) - -### [1.2.1](https://www.github.com/googleapis/java-dataproc/compare/v1.2.0...v1.2.1) (2021-02-26) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#458](https://www.github.com/googleapis/java-dataproc/issues/458)) ([ed4e9eb](https://www.github.com/googleapis/java-dataproc/commit/ed4e9eb666896855a4fec07f996192d2c09004a6)) - -## [1.2.0](https://www.github.com/googleapis/java-dataproc/compare/v1.1.10...v1.2.0) (2021-02-22) - - -### Features - -* **v1beta2:** remove DOCKER/FLINK enums from Component, add fields to ClusterConfig, InstanceGroupConfig, WorkflowTemplate, WorkflowMetadata ([#411](https://www.github.com/googleapis/java-dataproc/issues/411)) ([e8025d4](https://www.github.com/googleapis/java-dataproc/commit/e8025d4a5dd68b430b25e60cac823f570bdab3f4)) - - -### Documentation - -* generate sample code in the Java microgenerator ([#437](https://www.github.com/googleapis/java-dataproc/issues/437)) ([bb35671](https://www.github.com/googleapis/java-dataproc/commit/bb356719e818b896259f399c084092c056549a6a)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#422](https://www.github.com/googleapis/java-dataproc/issues/422)) ([69a78e1](https://www.github.com/googleapis/java-dataproc/commit/69a78e192957f1c00943be624ce29fe2e2d333cb)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#448](https://www.github.com/googleapis/java-dataproc/issues/448)) ([db549f9](https://www.github.com/googleapis/java-dataproc/commit/db549f9a231eca393c0c1bfda8f004be8e0f7cd9)) -* update dependency com.google.cloud:google-cloud-storage to v1.113.9 ([#416](https://www.github.com/googleapis/java-dataproc/issues/416)) ([d7503e7](https://www.github.com/googleapis/java-dataproc/commit/d7503e7c005c240672741fbc5541a7281c55be23)) - -### [1.1.10](https://www.github.com/googleapis/java-dataproc/compare/v1.1.9...v1.1.10) (2020-12-16) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#404](https://www.github.com/googleapis/java-dataproc/issues/404)) ([6e73894](https://www.github.com/googleapis/java-dataproc/commit/6e738949e8aea8323e83a21d31e7cc26f397653b)) - -### [1.1.9](https://www.github.com/googleapis/java-dataproc/compare/v1.1.8...v1.1.9) (2020-12-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([#399](https://www.github.com/googleapis/java-dataproc/issues/399)) ([2234430](https://www.github.com/googleapis/java-dataproc/commit/2234430a65e1efc416f75b275e922592f2d71ed2)) - -### [1.1.8](https://www.github.com/googleapis/java-dataproc/compare/v1.1.7...v1.1.8) (2020-12-02) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#388](https://www.github.com/googleapis/java-dataproc/issues/388)) ([71f7650](https://www.github.com/googleapis/java-dataproc/commit/71f76506ffbec57e1bf40bec7499652b9684e508)) - -### [1.1.7](https://www.github.com/googleapis/java-dataproc/compare/v1.1.6...v1.1.7) (2020-11-17) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.15.0 ([#370](https://www.github.com/googleapis/java-dataproc/issues/370)) ([8b7cb8a](https://www.github.com/googleapis/java-dataproc/commit/8b7cb8a9f8f0d4148020ab919995d266fbd48f53)) -* update dependency com.google.cloud:google-cloud-storage to v1.113.4 ([#368](https://www.github.com/googleapis/java-dataproc/issues/368)) ([26d4171](https://www.github.com/googleapis/java-dataproc/commit/26d4171bccf35e92ac7d4fc235f356597bdd3438)) - -### [1.1.6](https://www.github.com/googleapis/java-dataproc/compare/v1.1.5...v1.1.6) (2020-10-31) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#358](https://www.github.com/googleapis/java-dataproc/issues/358)) ([6a5c477](https://www.github.com/googleapis/java-dataproc/commit/6a5c477a0705fd9dbcb3a82f7493001db9a6c85e)) - -### [1.1.5](https://www.github.com/googleapis/java-dataproc/compare/v1.1.4...v1.1.5) (2020-10-28) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-storage to v1.113.2 ([#346](https://www.github.com/googleapis/java-dataproc/issues/346)) ([59ffe90](https://www.github.com/googleapis/java-dataproc/commit/59ffe901cc71d845feaec13a99cc802e6655c54b)) - -### [1.1.4](https://www.github.com/googleapis/java-dataproc/compare/v1.1.3...v1.1.4) (2020-10-21) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#334](https://www.github.com/googleapis/java-dataproc/issues/334)) ([6b9af6c](https://www.github.com/googleapis/java-dataproc/commit/6b9af6c10faca6820f6faabeac0c1fa1c63acf93)) - -### [1.1.3](https://www.github.com/googleapis/java-dataproc/compare/v1.1.2...v1.1.3) (2020-10-19) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#326](https://www.github.com/googleapis/java-dataproc/issues/326)) ([31a6573](https://www.github.com/googleapis/java-dataproc/commit/31a6573fb32599020b4463643ba69847d23398c1)) - -### [1.1.2](https://www.github.com/googleapis/java-dataproc/compare/v1.1.1...v1.1.2) (2020-10-08) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#311](https://www.github.com/googleapis/java-dataproc/issues/311)) ([44ac709](https://www.github.com/googleapis/java-dataproc/commit/44ac709e95478f082260117672e82bc1f31d3d77)) - -### [1.1.1](https://www.github.com/googleapis/java-dataproc/compare/v1.1.0...v1.1.1) (2020-09-23) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#298](https://www.github.com/googleapis/java-dataproc/issues/298)) ([7f2088c](https://www.github.com/googleapis/java-dataproc/commit/7f2088c5faf83d74da6775d3a57f4cc9489a8838)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.9.0 ([#278](https://www.github.com/googleapis/java-dataproc/issues/278)) ([73d38d9](https://www.github.com/googleapis/java-dataproc/commit/73d38d954a69cabd223d9df51c7b3ee7e9989a3c)) - -## [1.1.0](https://www.github.com/googleapis/java-dataproc/compare/v1.0.0...v1.1.0) (2020-08-10) - - -### Features - -* Additional fields for the `ClusterConfig` and `InstanceGroupConfig` messages. ([#253](https://www.github.com/googleapis/java-dataproc/issues/253)) ([9f43c64](https://www.github.com/googleapis/java-dataproc/commit/9f43c64e464c5ac2418e2d399e72584db885ec57)) - - -### Bug Fixes - -* fix LRO annotations for method `DiagnoseCluster`. ([#250](https://www.github.com/googleapis/java-dataproc/issues/250)) ([50f0ad0](https://www.github.com/googleapis/java-dataproc/commit/50f0ad0e3f3184d227927c172a1055bbaa8bdcb0)) -* migrate to grpc_service_config ([#248](https://www.github.com/googleapis/java-dataproc/issues/248)) ([bef1b0d](https://www.github.com/googleapis/java-dataproc/commit/bef1b0d43ffa90cf27303a87ce8e020083512841)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.2 ([#244](https://www.github.com/googleapis/java-dataproc/issues/244)) ([f5d3415](https://www.github.com/googleapis/java-dataproc/commit/f5d341507d78c4d9268dc1932808dfc53d4857c3)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.3 ([#247](https://www.github.com/googleapis/java-dataproc/issues/247)) ([b2cb7c6](https://www.github.com/googleapis/java-dataproc/commit/b2cb7c689e440481a539fba9ac005959b4ca6ba7)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.6 ([#259](https://www.github.com/googleapis/java-dataproc/issues/259)) ([96f955a](https://www.github.com/googleapis/java-dataproc/commit/96f955ad616e31a0e919d805503245423861c0b9)) - -## [1.0.0](https://www.github.com/googleapis/java-dataproc/compare/v0.122.3...v1.0.0) (2020-06-17) - - -### Features - -* promote to GA ([#226](https://www.github.com/googleapis/java-dataproc/issues/226)) ([3edcdfc](https://www.github.com/googleapis/java-dataproc/commit/3edcdfcb5ae060e4f83782dac8ae29bc3c26a5a6)) -* **deps:** adopt flatten plugin and google-cloud-shared-dependencies ([#228](https://www.github.com/googleapis/java-dataproc/issues/228)) ([31a94aa](https://www.github.com/googleapis/java-dataproc/commit/31a94aa465e850258a23637588cc89db9f726825)) - - -### Dependencies - -* update dependency com.google.protobuf:protobuf-java to v3.12.2 ([#192](https://www.github.com/googleapis/java-dataproc/issues/192)) ([7762282](https://www.github.com/googleapis/java-dataproc/commit/7762282f57212548d6091b34e8e1ce5bc90c711e)) -* update dependency io.grpc:grpc-bom to v1.30.0 ([#209](https://www.github.com/googleapis/java-dataproc/issues/209)) ([141db4b](https://www.github.com/googleapis/java-dataproc/commit/141db4b85428264b35dfa8a7501e90c09e06b2e4)) - -### [0.122.3](https://www.github.com/googleapis/java-dataproc/compare/v0.122.2...v0.122.3) (2020-06-09) - - -### Bug Fixes - -* fix LRO polling and workflow template timeouts ([#213](https://www.github.com/googleapis/java-dataproc/issues/213)) ([c8ebb39](https://www.github.com/googleapis/java-dataproc/commit/c8ebb39e33bc3c622878ecdc4191c80511f95490)) - -### [0.122.2](https://www.github.com/googleapis/java-dataproc/compare/v0.122.1...v0.122.2) (2020-06-06) - - -### Bug Fixes - -* dataproc/v1 raise timeouts in gapic v2 ([#207](https://www.github.com/googleapis/java-dataproc/issues/207)) ([0295e36](https://www.github.com/googleapis/java-dataproc/commit/0295e36c41b54d09e814d391f7e56349c91619ff)) - - -### Documentation - -* change relative URLs to absolute URLs to fix broken links. ([#202](https://www.github.com/googleapis/java-dataproc/issues/202)) ([8e2f707](https://www.github.com/googleapis/java-dataproc/commit/8e2f707becbd2302c4480b798a7d1d1335b79b3b)) - - -### Dependencies - -* update dependency com.google.api:api-common to v1.9.1 ([#195](https://www.github.com/googleapis/java-dataproc/issues/195)) ([6fe7813](https://www.github.com/googleapis/java-dataproc/commit/6fe7813949bf54af974768822ef24c17d0b20db9)) -* update dependency com.google.api:api-common to v1.9.2 ([#204](https://www.github.com/googleapis/java-dataproc/issues/204)) ([dbae656](https://www.github.com/googleapis/java-dataproc/commit/dbae656ca82d705e7f725f5fbae49ef24a12f5ef)) -* update dependency com.google.api.grpc:proto-google-common-protos to v1.18.0 ([#178](https://www.github.com/googleapis/java-dataproc/issues/178)) ([a70d3a5](https://www.github.com/googleapis/java-dataproc/commit/a70d3a5e75a195effe4be9f1d981178219ddcdf2)) -* update dependency com.google.cloud:google-cloud-core to v1.93.5 ([#196](https://www.github.com/googleapis/java-dataproc/issues/196)) ([8867d5a](https://www.github.com/googleapis/java-dataproc/commit/8867d5a224f885b9281ac7d95834ad66e0b0a9fc)) -* update dependency com.google.protobuf:protobuf-java to v3.12.0 ([#187](https://www.github.com/googleapis/java-dataproc/issues/187)) ([aa7379c](https://www.github.com/googleapis/java-dataproc/commit/aa7379c20b750acd59cdc521304c19e5b3b197da)) -* update dependency io.grpc:grpc-bom to v1.29.0 ([#170](https://www.github.com/googleapis/java-dataproc/issues/170)) ([6e256fd](https://www.github.com/googleapis/java-dataproc/commit/6e256fd8f2b7bb978fe598088f3ce1f04370bc46)) -* update dependency org.threeten:threetenbp to v1.4.4 ([#172](https://www.github.com/googleapis/java-dataproc/issues/172)) ([8514a2e](https://www.github.com/googleapis/java-dataproc/commit/8514a2e840403f226f1a9fee52d3c782b2744869)) - -### [0.122.1](https://www.github.com/googleapis/java-dataproc/compare/v0.122.0...v0.122.1) (2020-04-20) - - -### Dependencies - -* update dependency com.google.guava:guava-bom to v29 ([#147](https://www.github.com/googleapis/java-dataproc/issues/147)) ([dae5b3d](https://www.github.com/googleapis/java-dataproc/commit/dae5b3dee3213d309e6dd8adc92cd29bffadae2c)) - -## [0.122.0](https://www.github.com/googleapis/java-dataproc/compare/v0.121.0...v0.122.0) (2020-04-09) - - -### Features - -* **v1:** add Jobs.SubmitJobAsOperation, SparkR and Presto job types to WorkflowTemplates ([#137](https://www.github.com/googleapis/java-dataproc/issues/137)) ([ac18c87](https://www.github.com/googleapis/java-dataproc/commit/ac18c872f270d1a3248797ceceaf0923375bfc2f)) - - -### Dependencies - -* update core dependencies ([#91](https://www.github.com/googleapis/java-dataproc/issues/91)) ([2e8fce0](https://www.github.com/googleapis/java-dataproc/commit/2e8fce05b413f52efa7dc9b0c3d40e19d0d687ab)) -* update dependency com.google.cloud:google-cloud-core to v1.93.4 ([#127](https://www.github.com/googleapis/java-dataproc/issues/127)) ([9dd5f1a](https://www.github.com/googleapis/java-dataproc/commit/9dd5f1a28cf735a611a570026e4762137ac4b9e0)) -* update dependency org.threeten:threetenbp to v1.4.3 ([#111](https://www.github.com/googleapis/java-dataproc/issues/111)) ([3d7178b](https://www.github.com/googleapis/java-dataproc/commit/3d7178b323615d8ddde92b03349da2ec81aee809)) - -## [0.121.0](https://www.github.com/googleapis/java-dataproc/compare/v0.120.0...v0.121.0) (2020-04-01) - - -### ⚠ BREAKING CHANGES - -* Please use AutoscalingPolicyName$Builder.setLocation(String) - -### Bug Fixes - -* AutoscalingPolicyName now uses locations instead of regions ([#118](https://www.github.com/googleapis/java-dataproc/issues/118)) ([48110e6](https://www.github.com/googleapis/java-dataproc/commit/48110e6a7c6426172b81b126001a609650a4f3bd)) - - -### Dependencies - -* update dependency com.google.api:api-common to v1.9.0 ([#113](https://www.github.com/googleapis/java-dataproc/issues/113)) ([34b0ec6](https://www.github.com/googleapis/java-dataproc/commit/34b0ec60c21d76217d45b29410c1472ff8869ba0)) - -## [0.120.0](https://www.github.com/googleapis/java-dataproc/compare/v0.119.0...v0.120.0) (2020-03-13) - - -### Features - -* add LifecycleConfig, ReservationAffinity, SparkRJob, PrestoJob to v1 ([ce4bd91](https://www.github.com/googleapis/java-dataproc/commit/ce4bd9177439ff9431cec1f8e56ee2c07ab75870)) - - -### Dependencies - -* update core dependencies ([#89](https://www.github.com/googleapis/java-dataproc/issues/89)) ([0698b62](https://www.github.com/googleapis/java-dataproc/commit/0698b6262729cab28e9e95dc227669fc3f239b42)) -* update dependency com.google.cloud:google-cloud-core to v1.92.5 ([574c5c5](https://www.github.com/googleapis/java-dataproc/commit/574c5c55978b3930ac083c941fba4df251959084)) -* update dependency com.google.protobuf:protobuf-java to v3.11.4 ([86b32ba](https://www.github.com/googleapis/java-dataproc/commit/86b32baaeee93749e8e50f623ca405bd8167b32a)) -* update dependency io.grpc:grpc-bom to v1.27.1 ([cb1e4b7](https://www.github.com/googleapis/java-dataproc/commit/cb1e4b78c58079a6cc82fef62d993cf2b2259b38)) - - -### Documentation - -* **regen:** update sample code to set total timeout, add API client header test ([9d7dddc](https://www.github.com/googleapis/java-dataproc/commit/9d7dddc630a1b4c2d1b8330fdefd2297ac802019)) -* **regen:** updated docs from proto comments ([#87](https://www.github.com/googleapis/java-dataproc/issues/87)) ([b541715](https://www.github.com/googleapis/java-dataproc/commit/b5417153daf8238fcc0833d6148d2a6ec70e2b99)) - -## [0.119.0](https://www.github.com/googleapis/java-dataproc/compare/v0.118.1...v0.119.0) (2020-02-04) - - -### Features - -* add AutoscalingPolicyServiceClient ([#66](https://www.github.com/googleapis/java-dataproc/issues/66)) ([b612d8e](https://www.github.com/googleapis/java-dataproc/commit/b612d8e2ce9d133449a9eef8e760fe9f138e5a57)) - - -### Dependencies - -* update core dependencies ([#47](https://www.github.com/googleapis/java-dataproc/issues/47)) ([4a7e1de](https://www.github.com/googleapis/java-dataproc/commit/4a7e1de068246efd23129293170efdf417e4645b)) -* update core dependencies ([#65](https://www.github.com/googleapis/java-dataproc/issues/65)) ([521d6a2](https://www.github.com/googleapis/java-dataproc/commit/521d6a22d4c0be9af3df46c0b7186cdf13b5b8f9)) -* update dependency com.google.guava:guava-bom to v28.2-android ([#45](https://www.github.com/googleapis/java-dataproc/issues/45)) ([231844e](https://www.github.com/googleapis/java-dataproc/commit/231844e6340d251d1d08c745235dd2e87e445af2)) -* update dependency com.google.protobuf:protobuf-java to v3.11.3 ([#67](https://www.github.com/googleapis/java-dataproc/issues/67)) ([5321a0f](https://www.github.com/googleapis/java-dataproc/commit/5321a0fecd010fef6895b5f715794dd1f460aec7)) -* update dependency org.threeten:threetenbp to v1.4.1 ([d2af17b](https://www.github.com/googleapis/java-dataproc/commit/d2af17b6ee0672b8fa6d03d6f649415098d11127)) - - -### Documentation - -* **regen:** fix javadoc return annotation ([#60](https://www.github.com/googleapis/java-dataproc/issues/60)) ([28ff392](https://www.github.com/googleapis/java-dataproc/commit/28ff392d36a7a686750010ca860bf797b07fc312)) - -### [0.118.1](https://www.github.com/googleapis/java-dataproc/compare/v0.118.0...v0.118.1) (2020-01-07) - - -### Dependencies - -* update core dependencies ([#42](https://www.github.com/googleapis/java-dataproc/issues/42)) ([0f76b61](https://www.github.com/googleapis/java-dataproc/commit/0f76b61bdc53738e941da9fc6987c141bea4df68)) -* update dependency io.grpc:grpc-bom to v1.26.0 ([#39](https://www.github.com/googleapis/java-dataproc/issues/39)) ([1156a6b](https://www.github.com/googleapis/java-dataproc/commit/1156a6b21b8fde07a56d4ab4a8c280266ef78249)) -* update gax.version to v1.51.0 ([#28](https://www.github.com/googleapis/java-dataproc/issues/28)) ([45314dc](https://www.github.com/googleapis/java-dataproc/commit/45314dc50947d5375378baea07db76020940789f)) - - -### Documentation - -* **regen:** updated javadocs from protoc update ([#34](https://www.github.com/googleapis/java-dataproc/issues/34)) ([a87d161](https://www.github.com/googleapis/java-dataproc/commit/a87d1614eeacf5e1b5ff303f8e09ab930737061b)) -* **regen:** updated javadocs from protos ([#40](https://www.github.com/googleapis/java-dataproc/issues/40)) ([f174b99](https://www.github.com/googleapis/java-dataproc/commit/f174b992fa65dbade37dc1df210b477d44af6758)) - -## [0.118.0](https://www.github.com/googleapis/java-dataproc/compare/0.117.0...v0.118.0) (2019-12-05) - - -### Features - -* make repo releasable, add parent/bom ([#1](https://www.github.com/googleapis/java-dataproc/issues/1)) ([e186726](https://www.github.com/googleapis/java-dataproc/commit/e186726a8fd79e44c999e230f2566708d65619de)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-core to v1.91.3 ([#22](https://www.github.com/googleapis/java-dataproc/issues/22)) ([97c2a37](https://www.github.com/googleapis/java-dataproc/commit/97c2a377f3bdb45984f168b33e476591266ae83f)) -* update dependency com.google.protobuf:protobuf-java to v3.11.0 ([#23](https://www.github.com/googleapis/java-dataproc/issues/23)) ([da12d98](https://www.github.com/googleapis/java-dataproc/commit/da12d98d90d17e6b0583ec4849d6282c9d7f910e)) -* update dependency com.google.protobuf:protobuf-java to v3.11.1 ([#27](https://www.github.com/googleapis/java-dataproc/issues/27)) ([243abd1](https://www.github.com/googleapis/java-dataproc/commit/243abd18e651ab6a0e6be7c54171f40732e38788)) -* update gax.version to v1.50.1 ([#5](https://www.github.com/googleapis/java-dataproc/issues/5)) ([c8aab8a](https://www.github.com/googleapis/java-dataproc/commit/c8aab8a44fe0f7f5848322749c5741ad4810d335)) diff --git a/README.md b/README.md index 5543ad13..e124cb08 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,16 @@ Java idiomatic client for [Dataproc][product-docs]. - [Client Library Documentation][javadocs] +:bus: In October 2022, this library has moved to +[google-cloud-java/java-dataproc]( +https://github.com/googleapis/google-cloud-java/tree/main/java-dataproc). +This repository will be archived in the future. +Future releases will appear in the new repository (https://github.com/googleapis/google-cloud-java/releases). +The Maven artifact coordinates (`com.google.cloud:google-cloud-dataproc`) remain the same. + ## Quickstart -If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: ```xml @@ -19,7 +26,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 24.3.0 + 26.1.3 pom import @@ -42,28 +49,28 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-dataproc - 2.3.2 + 4.0.8 ``` -If you are using Gradle 5.x or later, add this to your dependencies +If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:24.3.0') +implementation platform('com.google.cloud:libraries-bom:26.1.4') implementation 'com.google.cloud:google-cloud-dataproc' ``` -If you are using Gradle without BOM, add this to your dependencies +If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-dataproc:2.3.2' +implementation 'com.google.cloud:google-cloud-dataproc:4.2.0' ``` -If you are using SBT, add this to your dependencies +If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "2.3.2" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.2.0" ``` ## Authentication diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5724ea94..00000000 --- a/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com diff --git a/google-cloud-dataproc-bom/pom.xml b/google-cloud-dataproc-bom/pom.xml deleted file mode 100644 index 3dac3379..00000000 --- a/google-cloud-dataproc-bom/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc-bom - 2.3.3-SNAPSHOT - pom - - com.google.cloud - google-cloud-shared-config - 1.2.7 - - - Google Cloud Dataproc BOM - https://github.com/googleapis/java-dataproc - - BOM for Google Cloud Dataproc - - - - Google LLC - - - - - chingor13 - Jeff Ching - chingor@google.com - Google LLC - - Developer - - - - - - scm:git:https://github.com/googleapis/java-dataproc.git - scm:git:git@github.com:googleapis/java-dataproc.git - https://github.com/googleapis/java-dataproc - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - - com.google.cloud - google-cloud-dataproc - 2.3.3-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - - - - diff --git a/google-cloud-dataproc/pom.xml b/google-cloud-dataproc/pom.xml deleted file mode 100644 index 0b0c3019..00000000 --- a/google-cloud-dataproc/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc - 2.3.3-SNAPSHOT - jar - Google Cloud Dataproc - https://github.com/googleapis/java-dataproc - Java idiomatic client for Google Cloud Dataproc - - com.google.cloud - google-cloud-dataproc-parent - 2.3.3-SNAPSHOT - - - google-cloud-dataproc - - - - 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-dataproc-v1 - - - com.google.guava - guava - - - com.google.api - gax - - - com.google.api - gax-grpc - - - org.threeten - threetenbp - - - - - junit - junit - test - - - com.google.cloud - google-cloud-core - test - - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - test - - - - com.google.api - gax-grpc - testlib - test - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java deleted file mode 100644 index af011a44..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java +++ /dev/null @@ -1,995 +0,0 @@ -/* - * 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.dataproc.v1; - -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.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1.stub.AutoscalingPolicyServiceStub; -import com.google.cloud.dataproc.v1.stub.AutoscalingPolicyServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The API interface for managing autoscaling policies in the Dataproc API. - * - *

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 (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response =
- *       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- * }
- * - *

Note: close() needs to be called on the AutoscalingPolicyServiceClient 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 - * AutoscalingPolicyServiceSettings to create(). For example: - * - *

To customize credentials: - * - *

{@code
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class AutoscalingPolicyServiceClient implements BackgroundResource { - private final AutoscalingPolicyServiceSettings settings; - private final AutoscalingPolicyServiceStub stub; - - /** Constructs an instance of AutoscalingPolicyServiceClient with default settings. */ - public static final AutoscalingPolicyServiceClient create() throws IOException { - return create(AutoscalingPolicyServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, 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 AutoscalingPolicyServiceClient create( - AutoscalingPolicyServiceSettings settings) throws IOException { - return new AutoscalingPolicyServiceClient(settings); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, using the given stub for making - * calls. This is for advanced usage - prefer using create(AutoscalingPolicyServiceSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final AutoscalingPolicyServiceClient create(AutoscalingPolicyServiceStub stub) { - return new AutoscalingPolicyServiceClient(stub); - } - - /** - * Constructs an instance of AutoscalingPolicyServiceClient, 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 AutoscalingPolicyServiceClient(AutoscalingPolicyServiceSettings settings) - throws IOException { - this.settings = settings; - this.stub = ((AutoscalingPolicyServiceStubSettings) settings.getStubSettings()).createStub(); - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - protected AutoscalingPolicyServiceClient(AutoscalingPolicyServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AutoscalingPolicyServiceSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AutoscalingPolicyServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response =
-   *       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param policy Required. The autoscaling policy to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy createAutoscalingPolicy( - LocationName parent, AutoscalingPolicy policy) { - CreateAutoscalingPolicyRequest request = - CreateAutoscalingPolicyRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setPolicy(policy) - .build(); - return createAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response =
-   *       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param policy Required. The autoscaling policy to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy createAutoscalingPolicy( - RegionName parent, AutoscalingPolicy policy) { - CreateAutoscalingPolicyRequest request = - CreateAutoscalingPolicyRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setPolicy(policy) - .build(); - return createAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response =
-   *       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param policy Required. The autoscaling policy to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy createAutoscalingPolicy(String parent, AutoscalingPolicy policy) { - CreateAutoscalingPolicyRequest request = - CreateAutoscalingPolicyRequest.newBuilder().setParent(parent).setPolicy(policy).build(); - return createAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   CreateAutoscalingPolicyRequest request =
-   *       CreateAutoscalingPolicyRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPolicy(AutoscalingPolicy.newBuilder().build())
-   *           .build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(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 AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRequest request) { - return createAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   CreateAutoscalingPolicyRequest request =
-   *       CreateAutoscalingPolicyRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPolicy(AutoscalingPolicy.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       autoscalingPolicyServiceClient.createAutoscalingPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   AutoscalingPolicy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createAutoscalingPolicyCallable() { - return stub.createAutoscalingPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) autoscaling policy. - * - *

Disabled check for update_mask, because all updates will be full replacements. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
-   * }
-   * }
- * - * @param policy Required. The updated autoscaling policy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) { - UpdateAutoscalingPolicyRequest request = - UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build(); - return updateAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) autoscaling policy. - * - *

Disabled check for update_mask, because all updates will be full replacements. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   UpdateAutoscalingPolicyRequest request =
-   *       UpdateAutoscalingPolicyRequest.newBuilder()
-   *           .setPolicy(AutoscalingPolicy.newBuilder().build())
-   *           .build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(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 AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) { - return updateAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) autoscaling policy. - * - *

Disabled check for update_mask, because all updates will be full replacements. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   UpdateAutoscalingPolicyRequest request =
-   *       UpdateAutoscalingPolicyRequest.newBuilder()
-   *           .setPolicy(AutoscalingPolicy.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   AutoscalingPolicy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateAutoscalingPolicyCallable() { - return stub.updateAutoscalingPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name =
-   *       AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *           "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name);
-   * }
-   * }
- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.get`, the resource name of the policy has - * the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.get`, the resource name of the policy has - * the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy getAutoscalingPolicy(AutoscalingPolicyName name) { - GetAutoscalingPolicyRequest request = - GetAutoscalingPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   String name =
-   *       AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *               "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *           .toString();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name);
-   * }
-   * }
- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.get`, the resource name of the policy has - * the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.get`, the resource name of the policy has - * the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AutoscalingPolicy getAutoscalingPolicy(String name) { - GetAutoscalingPolicyRequest request = - GetAutoscalingPolicyRequest.newBuilder().setName(name).build(); - return getAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   GetAutoscalingPolicyRequest request =
-   *       GetAutoscalingPolicyRequest.newBuilder()
-   *           .setName(
-   *               AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *                       "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *                   .toString())
-   *           .build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(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 AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest request) { - return getAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves autoscaling policy. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   GetAutoscalingPolicyRequest request =
-   *       GetAutoscalingPolicyRequest.newBuilder()
-   *           .setName(
-   *               AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *                       "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       autoscalingPolicyServiceClient.getAutoscalingPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   AutoscalingPolicy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getAutoscalingPolicyCallable() { - return stub.getAutoscalingPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (AutoscalingPolicy element :
-   *       autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(LocationName parent) { - ListAutoscalingPoliciesRequest request = - ListAutoscalingPoliciesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listAutoscalingPolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (AutoscalingPolicy element :
-   *       autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(RegionName parent) { - ListAutoscalingPoliciesRequest request = - ListAutoscalingPoliciesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listAutoscalingPolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (AutoscalingPolicy element :
-   *       autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(String parent) { - ListAutoscalingPoliciesRequest request = - ListAutoscalingPoliciesRequest.newBuilder().setParent(parent).build(); - return listAutoscalingPolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   ListAutoscalingPoliciesRequest request =
-   *       ListAutoscalingPoliciesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (AutoscalingPolicy element :
-   *       autoscalingPolicyServiceClient.listAutoscalingPolicies(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 ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies( - ListAutoscalingPoliciesRequest request) { - return listAutoscalingPoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   ListAutoscalingPoliciesRequest request =
-   *       ListAutoscalingPoliciesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       autoscalingPolicyServiceClient.listAutoscalingPoliciesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (AutoscalingPolicy element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listAutoscalingPoliciesPagedCallable() { - return stub.listAutoscalingPoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists autoscaling policies in the project. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   ListAutoscalingPoliciesRequest request =
-   *       ListAutoscalingPoliciesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListAutoscalingPoliciesResponse response =
-   *         autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
-   *     for (AutoscalingPolicy element : response.getResponsesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listAutoscalingPoliciesCallable() { - return stub.listAutoscalingPoliciesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by - * one or more clusters. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name =
-   *       AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *           "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name);
-   * }
-   * }
- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAutoscalingPolicy(AutoscalingPolicyName name) { - DeleteAutoscalingPolicyRequest request = - DeleteAutoscalingPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by - * one or more clusters. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   String name =
-   *       AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *               "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *           .toString();
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name);
-   * }
-   * }
- * - * @param name Required. The "resource name" of the autoscaling policy, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - *
- *
    - *
  • For `projects.locations.autoscalingPolicies.delete`, the resource name of the policy - * has the following format: - * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAutoscalingPolicy(String name) { - DeleteAutoscalingPolicyRequest request = - DeleteAutoscalingPolicyRequest.newBuilder().setName(name).build(); - deleteAutoscalingPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by - * one or more clusters. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   DeleteAutoscalingPolicyRequest request =
-   *       DeleteAutoscalingPolicyRequest.newBuilder()
-   *           .setName(
-   *               AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *                       "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *                   .toString())
-   *           .build();
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request) { - deleteAutoscalingPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by - * one or more clusters. - * - *

Sample code: - * - *

{@code
-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
-   *     AutoscalingPolicyServiceClient.create()) {
-   *   DeleteAutoscalingPolicyRequest request =
-   *       DeleteAutoscalingPolicyRequest.newBuilder()
-   *           .setName(
-   *               AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
-   *                       "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       autoscalingPolicyServiceClient.deleteAutoscalingPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteAutoscalingPolicyCallable() { - return stub.deleteAutoscalingPolicyCallable(); - } - - @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 ListAutoscalingPoliciesPagedResponse - extends AbstractPagedListResponse< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - AutoscalingPolicy, - ListAutoscalingPoliciesPage, - ListAutoscalingPoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse, AutoscalingPolicy> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAutoscalingPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListAutoscalingPoliciesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListAutoscalingPoliciesPagedResponse(ListAutoscalingPoliciesPage page) { - super(page, ListAutoscalingPoliciesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAutoscalingPoliciesPage - extends AbstractPage< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - AutoscalingPolicy, - ListAutoscalingPoliciesPage> { - - private ListAutoscalingPoliciesPage( - PageContext< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse, AutoscalingPolicy> - context, - ListAutoscalingPoliciesResponse response) { - super(context, response); - } - - private static ListAutoscalingPoliciesPage createEmptyPage() { - return new ListAutoscalingPoliciesPage(null, null); - } - - @Override - protected ListAutoscalingPoliciesPage createPage( - PageContext< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse, AutoscalingPolicy> - context, - ListAutoscalingPoliciesResponse response) { - return new ListAutoscalingPoliciesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse, AutoscalingPolicy> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAutoscalingPoliciesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - AutoscalingPolicy, - ListAutoscalingPoliciesPage, - ListAutoscalingPoliciesFixedSizeCollection> { - - private ListAutoscalingPoliciesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAutoscalingPoliciesFixedSizeCollection createEmptyCollection() { - return new ListAutoscalingPoliciesFixedSizeCollection(null, 0); - } - - @Override - protected ListAutoscalingPoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAutoscalingPoliciesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java deleted file mode 100644 index 28bc9d98..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -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.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.dataproc.v1.stub.AutoscalingPolicyServiceStubSettings; -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 AutoscalingPolicyServiceClient}. - * - *

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

    - *
  • The default service address (dataproc.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 createAutoscalingPolicy to 30 seconds: - * - *

{@code
- * AutoscalingPolicyServiceSettings.Builder autoscalingPolicyServiceSettingsBuilder =
- *     AutoscalingPolicyServiceSettings.newBuilder();
- * autoscalingPolicyServiceSettingsBuilder
- *     .createAutoscalingPolicySettings()
- *     .setRetrySettings(
- *         autoscalingPolicyServiceSettingsBuilder
- *             .createAutoscalingPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     autoscalingPolicyServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AutoscalingPolicyServiceSettings - extends ClientSettings { - - /** Returns the object with the settings used for calls to createAutoscalingPolicy. */ - public UnaryCallSettings - createAutoscalingPolicySettings() { - return ((AutoscalingPolicyServiceStubSettings) getStubSettings()) - .createAutoscalingPolicySettings(); - } - - /** Returns the object with the settings used for calls to updateAutoscalingPolicy. */ - public UnaryCallSettings - updateAutoscalingPolicySettings() { - return ((AutoscalingPolicyServiceStubSettings) getStubSettings()) - .updateAutoscalingPolicySettings(); - } - - /** Returns the object with the settings used for calls to getAutoscalingPolicy. */ - public UnaryCallSettings - getAutoscalingPolicySettings() { - return ((AutoscalingPolicyServiceStubSettings) getStubSettings()) - .getAutoscalingPolicySettings(); - } - - /** Returns the object with the settings used for calls to listAutoscalingPolicies. */ - public PagedCallSettings< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings() { - return ((AutoscalingPolicyServiceStubSettings) getStubSettings()) - .listAutoscalingPoliciesSettings(); - } - - /** Returns the object with the settings used for calls to deleteAutoscalingPolicy. */ - public UnaryCallSettings - deleteAutoscalingPolicySettings() { - return ((AutoscalingPolicyServiceStubSettings) getStubSettings()) - .deleteAutoscalingPolicySettings(); - } - - public static final AutoscalingPolicyServiceSettings create( - AutoscalingPolicyServiceStubSettings stub) throws IOException { - return new AutoscalingPolicyServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AutoscalingPolicyServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AutoscalingPolicyServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AutoscalingPolicyServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AutoscalingPolicyServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AutoscalingPolicyServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AutoscalingPolicyServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AutoscalingPolicyServiceStubSettings.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 AutoscalingPolicyServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AutoscalingPolicyServiceSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AutoscalingPolicyServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AutoscalingPolicyServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AutoscalingPolicyServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AutoscalingPolicyServiceStubSettings.newBuilder()); - } - - public AutoscalingPolicyServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AutoscalingPolicyServiceStubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */ - public UnaryCallSettings.Builder - createAutoscalingPolicySettings() { - return getStubSettingsBuilder().createAutoscalingPolicySettings(); - } - - /** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */ - public UnaryCallSettings.Builder - updateAutoscalingPolicySettings() { - return getStubSettingsBuilder().updateAutoscalingPolicySettings(); - } - - /** Returns the builder for the settings used for calls to getAutoscalingPolicy. */ - public UnaryCallSettings.Builder - getAutoscalingPolicySettings() { - return getStubSettingsBuilder().getAutoscalingPolicySettings(); - } - - /** Returns the builder for the settings used for calls to listAutoscalingPolicies. */ - public PagedCallSettings.Builder< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings() { - return getStubSettingsBuilder().listAutoscalingPoliciesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteAutoscalingPolicy. */ - public UnaryCallSettings.Builder - deleteAutoscalingPolicySettings() { - return getStubSettingsBuilder().deleteAutoscalingPolicySettings(); - } - - @Override - public AutoscalingPolicyServiceSettings build() throws IOException { - return new AutoscalingPolicyServiceSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerClient.java deleted file mode 100644 index 6a52d75e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerClient.java +++ /dev/null @@ -1,732 +0,0 @@ -/* - * 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.dataproc.v1; - -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.dataproc.v1.stub.BatchControllerStub; -import com.google.cloud.dataproc.v1.stub.BatchControllerStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The BatchController provides methods to manage batch workloads. - * - *

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 (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
- *   BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
- *   Batch response = batchControllerClient.getBatch(name);
- * }
- * }
- * - *

Note: close() needs to be called on the BatchControllerClient 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 BatchControllerSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * BatchControllerSettings batchControllerSettings =
- *     BatchControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * BatchControllerClient batchControllerClient =
- *     BatchControllerClient.create(batchControllerSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * BatchControllerSettings batchControllerSettings =
- *     BatchControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * BatchControllerClient batchControllerClient =
- *     BatchControllerClient.create(batchControllerSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class BatchControllerClient implements BackgroundResource { - private final BatchControllerSettings settings; - private final BatchControllerStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of BatchControllerClient with default settings. */ - public static final BatchControllerClient create() throws IOException { - return create(BatchControllerSettings.newBuilder().build()); - } - - /** - * Constructs an instance of BatchControllerClient, 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 BatchControllerClient create(BatchControllerSettings settings) - throws IOException { - return new BatchControllerClient(settings); - } - - /** - * Constructs an instance of BatchControllerClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(BatchControllerSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final BatchControllerClient create(BatchControllerStub stub) { - return new BatchControllerClient(stub); - } - - /** - * Constructs an instance of BatchControllerClient, 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 BatchControllerClient(BatchControllerSettings settings) throws IOException { - this.settings = settings; - this.stub = ((BatchControllerStubSettings) 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 BatchControllerClient(BatchControllerStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final BatchControllerSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public BatchControllerStub 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. - /** - * Creates a batch workload that executes asynchronously. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Batch batch = Batch.newBuilder().build();
-   *   String batchId = "batchId-331744779";
-   *   Batch response = batchControllerClient.createBatchAsync(parent, batch, batchId).get();
-   * }
-   * }
- * - * @param parent Required. The parent resource where this batch will be created. - * @param batch Required. The batch to create. - * @param batchId Optional. The ID to use for the batch, which will become the final component of - * the batch's resource name. - *

This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBatchAsync( - LocationName parent, Batch batch, String batchId) { - CreateBatchRequest request = - CreateBatchRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setBatch(batch) - .setBatchId(batchId) - .build(); - return createBatchAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a batch workload that executes asynchronously. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Batch batch = Batch.newBuilder().build();
-   *   String batchId = "batchId-331744779";
-   *   Batch response = batchControllerClient.createBatchAsync(parent, batch, batchId).get();
-   * }
-   * }
- * - * @param parent Required. The parent resource where this batch will be created. - * @param batch Required. The batch to create. - * @param batchId Optional. The ID to use for the batch, which will become the final component of - * the batch's resource name. - *

This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createBatchAsync( - String parent, Batch batch, String batchId) { - CreateBatchRequest request = - CreateBatchRequest.newBuilder() - .setParent(parent) - .setBatch(batch) - .setBatchId(batchId) - .build(); - return createBatchAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a batch workload that executes asynchronously. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   CreateBatchRequest request =
-   *       CreateBatchRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBatch(Batch.newBuilder().build())
-   *           .setBatchId("batchId-331744779")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Batch response = batchControllerClient.createBatchAsync(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 createBatchAsync( - CreateBatchRequest request) { - return createBatchOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a batch workload that executes asynchronously. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   CreateBatchRequest request =
-   *       CreateBatchRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBatch(Batch.newBuilder().build())
-   *           .setBatchId("batchId-331744779")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       batchControllerClient.createBatchOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Batch response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createBatchOperationCallable() { - return stub.createBatchOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a batch workload that executes asynchronously. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   CreateBatchRequest request =
-   *       CreateBatchRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setBatch(Batch.newBuilder().build())
-   *           .setBatchId("batchId-331744779")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future = batchControllerClient.createBatchCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createBatchCallable() { - return stub.createBatchCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the batch workload resource representation. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
-   *   Batch response = batchControllerClient.getBatch(name);
-   * }
-   * }
- * - * @param name Required. The name of the batch to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Batch getBatch(BatchName name) { - GetBatchRequest request = - GetBatchRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getBatch(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the batch workload resource representation. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   String name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString();
-   *   Batch response = batchControllerClient.getBatch(name);
-   * }
-   * }
- * - * @param name Required. The name of the batch to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Batch getBatch(String name) { - GetBatchRequest request = GetBatchRequest.newBuilder().setName(name).build(); - return getBatch(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the batch workload resource representation. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   GetBatchRequest request =
-   *       GetBatchRequest.newBuilder()
-   *           .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString())
-   *           .build();
-   *   Batch response = batchControllerClient.getBatch(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 Batch getBatch(GetBatchRequest request) { - return getBatchCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the batch workload resource representation. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   GetBatchRequest request =
-   *       GetBatchRequest.newBuilder()
-   *           .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString())
-   *           .build();
-   *   ApiFuture future = batchControllerClient.getBatchCallable().futureCall(request);
-   *   // Do something.
-   *   Batch response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getBatchCallable() { - return stub.getBatchCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists batch workloads. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Batch element : batchControllerClient.listBatches(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of batches. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBatchesPagedResponse listBatches(LocationName parent) { - ListBatchesRequest request = - ListBatchesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listBatches(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists batch workloads. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Batch element : batchControllerClient.listBatches(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent, which owns this collection of batches. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListBatchesPagedResponse listBatches(String parent) { - ListBatchesRequest request = ListBatchesRequest.newBuilder().setParent(parent).build(); - return listBatches(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists batch workloads. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   ListBatchesRequest request =
-   *       ListBatchesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Batch element : batchControllerClient.listBatches(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 ListBatchesPagedResponse listBatches(ListBatchesRequest request) { - return listBatchesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists batch workloads. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   ListBatchesRequest request =
-   *       ListBatchesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       batchControllerClient.listBatchesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Batch element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listBatchesPagedCallable() { - return stub.listBatchesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists batch workloads. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   ListBatchesRequest request =
-   *       ListBatchesRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListBatchesResponse response = batchControllerClient.listBatchesCallable().call(request);
-   *     for (Batch element : response.getResponsesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listBatchesCallable() { - return stub.listBatchesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the batch workload resource. If the batch is not in terminal state, the delete fails - * and the response returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
-   *   batchControllerClient.deleteBatch(name);
-   * }
-   * }
- * - * @param name Required. The name of the batch resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteBatch(BatchName name) { - DeleteBatchRequest request = - DeleteBatchRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteBatch(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the batch workload resource. If the batch is not in terminal state, the delete fails - * and the response returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   String name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString();
-   *   batchControllerClient.deleteBatch(name);
-   * }
-   * }
- * - * @param name Required. The name of the batch resource to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteBatch(String name) { - DeleteBatchRequest request = DeleteBatchRequest.newBuilder().setName(name).build(); - deleteBatch(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the batch workload resource. If the batch is not in terminal state, the delete fails - * and the response returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   DeleteBatchRequest request =
-   *       DeleteBatchRequest.newBuilder()
-   *           .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString())
-   *           .build();
-   *   batchControllerClient.deleteBatch(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteBatch(DeleteBatchRequest request) { - deleteBatchCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the batch workload resource. If the batch is not in terminal state, the delete fails - * and the response returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
-   *   DeleteBatchRequest request =
-   *       DeleteBatchRequest.newBuilder()
-   *           .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString())
-   *           .build();
-   *   ApiFuture future = batchControllerClient.deleteBatchCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteBatchCallable() { - return stub.deleteBatchCallable(); - } - - @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 ListBatchesPagedResponse - extends AbstractPagedListResponse< - ListBatchesRequest, - ListBatchesResponse, - Batch, - ListBatchesPage, - ListBatchesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListBatchesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListBatchesPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListBatchesPagedResponse(ListBatchesPage page) { - super(page, ListBatchesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListBatchesPage - extends AbstractPage { - - private ListBatchesPage( - PageContext context, - ListBatchesResponse response) { - super(context, response); - } - - private static ListBatchesPage createEmptyPage() { - return new ListBatchesPage(null, null); - } - - @Override - protected ListBatchesPage createPage( - PageContext context, - ListBatchesResponse response) { - return new ListBatchesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListBatchesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListBatchesRequest, - ListBatchesResponse, - Batch, - ListBatchesPage, - ListBatchesFixedSizeCollection> { - - private ListBatchesFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListBatchesFixedSizeCollection createEmptyCollection() { - return new ListBatchesFixedSizeCollection(null, 0); - } - - @Override - protected ListBatchesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListBatchesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerSettings.java deleted file mode 100644 index 0aceb61d..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/BatchControllerSettings.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse; - -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.dataproc.v1.stub.BatchControllerStubSettings; -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 BatchControllerClient}. - * - *

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

    - *
  • The default service address (dataproc.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 getBatch to 30 seconds: - * - *

{@code
- * BatchControllerSettings.Builder batchControllerSettingsBuilder =
- *     BatchControllerSettings.newBuilder();
- * batchControllerSettingsBuilder
- *     .getBatchSettings()
- *     .setRetrySettings(
- *         batchControllerSettingsBuilder
- *             .getBatchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BatchControllerSettings batchControllerSettings = batchControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class BatchControllerSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createBatch. */ - public UnaryCallSettings createBatchSettings() { - return ((BatchControllerStubSettings) getStubSettings()).createBatchSettings(); - } - - /** Returns the object with the settings used for calls to createBatch. */ - public OperationCallSettings - createBatchOperationSettings() { - return ((BatchControllerStubSettings) getStubSettings()).createBatchOperationSettings(); - } - - /** Returns the object with the settings used for calls to getBatch. */ - public UnaryCallSettings getBatchSettings() { - return ((BatchControllerStubSettings) getStubSettings()).getBatchSettings(); - } - - /** Returns the object with the settings used for calls to listBatches. */ - public PagedCallSettings - listBatchesSettings() { - return ((BatchControllerStubSettings) getStubSettings()).listBatchesSettings(); - } - - /** Returns the object with the settings used for calls to deleteBatch. */ - public UnaryCallSettings deleteBatchSettings() { - return ((BatchControllerStubSettings) getStubSettings()).deleteBatchSettings(); - } - - public static final BatchControllerSettings create(BatchControllerStubSettings stub) - throws IOException { - return new BatchControllerSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return BatchControllerStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return BatchControllerStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return BatchControllerStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return BatchControllerStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return BatchControllerStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return BatchControllerStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return BatchControllerStubSettings.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 BatchControllerSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for BatchControllerSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(BatchControllerStubSettings.newBuilder(clientContext)); - } - - protected Builder(BatchControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(BatchControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(BatchControllerStubSettings.newBuilder()); - } - - public BatchControllerStubSettings.Builder getStubSettingsBuilder() { - return ((BatchControllerStubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createBatch. */ - public UnaryCallSettings.Builder createBatchSettings() { - return getStubSettingsBuilder().createBatchSettings(); - } - - /** Returns the builder for the settings used for calls to createBatch. */ - public OperationCallSettings.Builder - createBatchOperationSettings() { - return getStubSettingsBuilder().createBatchOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getBatch. */ - public UnaryCallSettings.Builder getBatchSettings() { - return getStubSettingsBuilder().getBatchSettings(); - } - - /** Returns the builder for the settings used for calls to listBatches. */ - public PagedCallSettings.Builder< - ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse> - listBatchesSettings() { - return getStubSettingsBuilder().listBatchesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteBatch. */ - public UnaryCallSettings.Builder deleteBatchSettings() { - return getStubSettingsBuilder().deleteBatchSettings(); - } - - @Override - public BatchControllerSettings build() throws IOException { - return new BatchControllerSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java deleted file mode 100644 index 9cf9ec25..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java +++ /dev/null @@ -1,1235 +0,0 @@ -/* - * 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.dataproc.v1; - -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.dataproc.v1.stub.ClusterControllerStub; -import com.google.cloud.dataproc.v1.stub.ClusterControllerStubSettings; -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: The ClusterControllerService provides methods to manage clusters of Compute - * Engine instances. - * - *

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 (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "projectId-894832108";
- *   String region = "region-934795532";
- *   String clusterName = "clusterName-1141738587";
- *   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * }
- * - *

Note: close() needs to be called on the ClusterControllerClient 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 ClusterControllerSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ClusterControllerClient implements BackgroundResource { - private final ClusterControllerSettings settings; - private final ClusterControllerStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of ClusterControllerClient with default settings. */ - public static final ClusterControllerClient create() throws IOException { - return create(ClusterControllerSettings.newBuilder().build()); - } - - /** - * Constructs an instance of ClusterControllerClient, 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 ClusterControllerClient create(ClusterControllerSettings settings) - throws IOException { - return new ClusterControllerClient(settings); - } - - /** - * Constructs an instance of ClusterControllerClient, using the given stub for making calls. This - * is for advanced usage - prefer using create(ClusterControllerSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final ClusterControllerClient create(ClusterControllerStub stub) { - return new ClusterControllerClient(stub); - } - - /** - * Constructs an instance of ClusterControllerClient, 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 ClusterControllerClient(ClusterControllerSettings settings) throws IOException { - this.settings = settings; - this.stub = ((ClusterControllerStubSettings) 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 ClusterControllerClient(ClusterControllerStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final ClusterControllerSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ClusterControllerStub 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. - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   Cluster response =
-   *       clusterControllerClient.createClusterAsync(projectId, region, cluster).get();
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @param cluster Required. The cluster to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createClusterAsync( - String projectId, String region, Cluster cluster) { - CreateClusterRequest request = - CreateClusterRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setCluster(cluster) - .build(); - return createClusterAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   CreateClusterRequest request =
-   *       CreateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .setActionOnFailedPrimaryWorkers(FailureAction.forNumber(0))
-   *           .build();
-   *   Cluster response = clusterControllerClient.createClusterAsync(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 createClusterAsync( - CreateClusterRequest request) { - return createClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   CreateClusterRequest request =
-   *       CreateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .setActionOnFailedPrimaryWorkers(FailureAction.forNumber(0))
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.createClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Cluster response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createClusterOperationCallable() { - return stub.createClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   CreateClusterRequest request =
-   *       CreateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .setActionOnFailedPrimaryWorkers(FailureAction.forNumber(0))
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.createClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createClusterCallable() { - return stub.createClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an - * error is returned. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String clusterName = "clusterName-1141738587";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Cluster response =
-   *       clusterControllerClient
-   *           .updateClusterAsync(projectId, region, clusterName, cluster, updateMask)
-   *           .get();
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project the cluster belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param clusterName Required. The cluster name. - * @param cluster Required. The changes to the cluster. - * @param updateMask Required. Specifies the path, relative to `Cluster`, of the field to update. - * For example, to change the number of workers in a cluster to 5, the `update_mask` parameter - * would be specified as `config.worker_config.num_instances`, and the `PATCH` request body - * would specify the new value, as follows: - *

{ "config":{ "workerConfig":{ "numInstances":"5" } } } Similarly, to change the number - * of preemptible workers in a cluster to 5, the `update_mask` parameter would be - * `config.secondary_worker_config.num_instances`, and the `PATCH` request body would be set - * as follows: - *

{ "config":{ "secondaryWorkerConfig":{ "numInstances":"5" } } } - * <strong>Note:</strong> Currently, only the following fields can be updated: - *

<table> <tbody> <tr> - * <td><strong>Mask</strong></td> - * <td><strong>Purpose</strong></td> </tr> <tr> - * <td><strong><em>labels</em></strong></td> - * <td>Update labels</td> </tr> <tr> - * <td><strong><em>config.worker_config.num_instances</em></strong></td> - * <td>Resize primary worker group</td> </tr> <tr> - * <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td> - * <td>Resize secondary worker group</td> </tr> <tr> - * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or - * change autoscaling policies</td> </tr> </tbody> </table> - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture updateClusterAsync( - String projectId, String region, String clusterName, Cluster cluster, FieldMask updateMask) { - UpdateClusterRequest request = - UpdateClusterRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setClusterName(clusterName) - .setCluster(cluster) - .setUpdateMask(updateMask) - .build(); - return updateClusterAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an - * error is returned. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   UpdateClusterRequest request =
-   *       UpdateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Cluster response = clusterControllerClient.updateClusterAsync(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 updateClusterAsync( - UpdateClusterRequest request) { - return updateClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an - * error is returned. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   UpdateClusterRequest request =
-   *       UpdateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.updateClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Cluster response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateClusterOperationCallable() { - return stub.updateClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an - * error is returned. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   UpdateClusterRequest request =
-   *       UpdateClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setCluster(Cluster.newBuilder().build())
-   *           .setGracefulDecommissionTimeout(Duration.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.updateClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateClusterCallable() { - return stub.updateClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StopClusterRequest request =
-   *       StopClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Cluster response = clusterControllerClient.stopClusterAsync(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 stopClusterAsync( - StopClusterRequest request) { - return stopClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StopClusterRequest request =
-   *       StopClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.stopClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Cluster response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - stopClusterOperationCallable() { - return stub.stopClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Stops a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StopClusterRequest request =
-   *       StopClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.stopClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable stopClusterCallable() { - return stub.stopClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StartClusterRequest request =
-   *       StartClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Cluster response = clusterControllerClient.startClusterAsync(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 startClusterAsync( - StartClusterRequest request) { - return startClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StartClusterRequest request =
-   *       StartClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.startClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Cluster response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - startClusterOperationCallable() { - return stub.startClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   StartClusterRequest request =
-   *       StartClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.startClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable startClusterCallable() { - return stub.startClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String clusterName = "clusterName-1141738587";
-   *   clusterControllerClient.deleteClusterAsync(projectId, region, clusterName).get();
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @param clusterName Required. The cluster name. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteClusterAsync( - String projectId, String region, String clusterName) { - DeleteClusterRequest request = - DeleteClusterRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setClusterName(clusterName) - .build(); - return deleteClusterAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DeleteClusterRequest request =
-   *       DeleteClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   clusterControllerClient.deleteClusterAsync(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 deleteClusterAsync( - DeleteClusterRequest request) { - return deleteClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DeleteClusterRequest request =
-   *       DeleteClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.deleteClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteClusterOperationCallable() { - return stub.deleteClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a cluster in a project. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DeleteClusterRequest request =
-   *       DeleteClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setClusterUuid("clusterUuid-1141510955")
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.deleteClusterCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteClusterCallable() { - return stub.deleteClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String clusterName = "clusterName-1141738587";
-   *   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @param clusterName Required. The cluster name. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Cluster getCluster(String projectId, String region, String clusterName) { - GetClusterRequest request = - GetClusterRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setClusterName(clusterName) - .build(); - return getCluster(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   GetClusterRequest request =
-   *       GetClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .build();
-   *   Cluster response = clusterControllerClient.getCluster(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 Cluster getCluster(GetClusterRequest request) { - return getClusterCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a cluster in a project. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   GetClusterRequest request =
-   *       GetClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .build();
-   *   ApiFuture future = clusterControllerClient.getClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Cluster response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getClusterCallable() { - return stub.getClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   for (Cluster element : clusterControllerClient.listClusters(projectId, region).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListClustersPagedResponse listClusters(String projectId, String region) { - ListClustersRequest request = - ListClustersRequest.newBuilder().setProjectId(projectId).setRegion(region).build(); - return listClusters(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String filter = "filter-1274492040";
-   *   for (Cluster element :
-   *       clusterControllerClient.listClusters(projectId, region, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @param filter Optional. A filter constraining the clusters to list. Filters are case-sensitive - * and have the following syntax: - *

field = value [AND [field = value]] ... - *

where **field** is one of `status.state`, `clusterName`, or - * `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `*` to - * match all values. `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` contains the - * `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` contains the `DELETING` and - * `ERROR` states. `clusterName` is the name of the cluster provided at creation time. Only - * the logical `AND` operator is supported; space-separated items are treated as having an - * implicit `AND` operator. - *

Example filter: - *

status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND - * labels.starred = * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListClustersPagedResponse listClusters( - String projectId, String region, String filter) { - ListClustersRequest request = - ListClustersRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setFilter(filter) - .build(); - return listClusters(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   ListClustersRequest request =
-   *       ListClustersRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Cluster element : clusterControllerClient.listClusters(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 ListClustersPagedResponse listClusters(ListClustersRequest request) { - return listClustersPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   ListClustersRequest request =
-   *       ListClustersRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.listClustersPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Cluster element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listClustersPagedCallable() { - return stub.listClustersPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all regions/{region}/clusters in a project alphabetically. - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   ListClustersRequest request =
-   *       ListClustersRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListClustersResponse response =
-   *         clusterControllerClient.listClustersCallable().call(request);
-   *     for (Cluster element : response.getResponsesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listClustersCallable() { - return stub.listClustersCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String clusterName = "clusterName-1141738587";
-   *   DiagnoseClusterResults response =
-   *       clusterControllerClient.diagnoseClusterAsync(projectId, region, clusterName).get();
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the cluster belongs - * to. - * @param region Required. The Dataproc region in which to handle the request. - * @param clusterName Required. The cluster name. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture - diagnoseClusterAsync(String projectId, String region, String clusterName) { - DiagnoseClusterRequest request = - DiagnoseClusterRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setClusterName(clusterName) - .build(); - return diagnoseClusterAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DiagnoseClusterRequest request =
-   *       DiagnoseClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .build();
-   *   DiagnoseClusterResults response = clusterControllerClient.diagnoseClusterAsync(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 - diagnoseClusterAsync(DiagnoseClusterRequest request) { - return diagnoseClusterOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DiagnoseClusterRequest request =
-   *       DiagnoseClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .build();
-   *   OperationFuture future =
-   *       clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
-   *   // Do something.
-   *   DiagnoseClusterResults response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationCallable() { - return stub.diagnoseClusterOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets cluster diagnostic information. The returned - * [Operation.metadata][google.longrunning.Operation.metadata] will be - * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains - * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - * - *

Sample code: - * - *

{@code
-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   DiagnoseClusterRequest request =
-   *       DiagnoseClusterRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setClusterName("clusterName-1141738587")
-   *           .build();
-   *   ApiFuture future =
-   *       clusterControllerClient.diagnoseClusterCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable diagnoseClusterCallable() { - return stub.diagnoseClusterCallable(); - } - - @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 ListClustersPagedResponse - extends AbstractPagedListResponse< - ListClustersRequest, - ListClustersResponse, - Cluster, - ListClustersPage, - ListClustersFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListClustersPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListClustersPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListClustersPagedResponse(ListClustersPage page) { - super(page, ListClustersFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListClustersPage - extends AbstractPage { - - private ListClustersPage( - PageContext context, - ListClustersResponse response) { - super(context, response); - } - - private static ListClustersPage createEmptyPage() { - return new ListClustersPage(null, null); - } - - @Override - protected ListClustersPage createPage( - PageContext context, - ListClustersResponse response) { - return new ListClustersPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListClustersFixedSizeCollection - extends AbstractFixedSizeCollection< - ListClustersRequest, - ListClustersResponse, - Cluster, - ListClustersPage, - ListClustersFixedSizeCollection> { - - private ListClustersFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListClustersFixedSizeCollection createEmptyCollection() { - return new ListClustersFixedSizeCollection(null, 0); - } - - @Override - protected ListClustersFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListClustersFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java deleted file mode 100644 index b608594b..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -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.dataproc.v1.stub.ClusterControllerStubSettings; -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 ClusterControllerClient}. - * - *

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

    - *
  • The default service address (dataproc.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 getCluster to 30 seconds: - * - *

{@code
- * ClusterControllerSettings.Builder clusterControllerSettingsBuilder =
- *     ClusterControllerSettings.newBuilder();
- * clusterControllerSettingsBuilder
- *     .getClusterSettings()
- *     .setRetrySettings(
- *         clusterControllerSettingsBuilder
- *             .getClusterSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ClusterControllerSettings clusterControllerSettings = clusterControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ClusterControllerSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createCluster. */ - public UnaryCallSettings createClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).createClusterSettings(); - } - - /** Returns the object with the settings used for calls to createCluster. */ - public OperationCallSettings - createClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).createClusterOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateCluster. */ - public UnaryCallSettings updateClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).updateClusterSettings(); - } - - /** Returns the object with the settings used for calls to updateCluster. */ - public OperationCallSettings - updateClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).updateClusterOperationSettings(); - } - - /** Returns the object with the settings used for calls to stopCluster. */ - public UnaryCallSettings stopClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).stopClusterSettings(); - } - - /** Returns the object with the settings used for calls to stopCluster. */ - public OperationCallSettings - stopClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).stopClusterOperationSettings(); - } - - /** Returns the object with the settings used for calls to startCluster. */ - public UnaryCallSettings startClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).startClusterSettings(); - } - - /** Returns the object with the settings used for calls to startCluster. */ - public OperationCallSettings - startClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).startClusterOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteCluster. */ - public UnaryCallSettings deleteClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).deleteClusterSettings(); - } - - /** Returns the object with the settings used for calls to deleteCluster. */ - public OperationCallSettings - deleteClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).deleteClusterOperationSettings(); - } - - /** Returns the object with the settings used for calls to getCluster. */ - public UnaryCallSettings getClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).getClusterSettings(); - } - - /** Returns the object with the settings used for calls to listClusters. */ - public PagedCallSettings - listClustersSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).listClustersSettings(); - } - - /** Returns the object with the settings used for calls to diagnoseCluster. */ - public UnaryCallSettings diagnoseClusterSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).diagnoseClusterSettings(); - } - - /** Returns the object with the settings used for calls to diagnoseCluster. */ - public OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).diagnoseClusterOperationSettings(); - } - - public static final ClusterControllerSettings create(ClusterControllerStubSettings stub) - throws IOException { - return new ClusterControllerSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ClusterControllerStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ClusterControllerStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ClusterControllerStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ClusterControllerStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ClusterControllerStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ClusterControllerStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ClusterControllerStubSettings.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 ClusterControllerSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ClusterControllerSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ClusterControllerStubSettings.newBuilder(clientContext)); - } - - protected Builder(ClusterControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ClusterControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ClusterControllerStubSettings.newBuilder()); - } - - public ClusterControllerStubSettings.Builder getStubSettingsBuilder() { - return ((ClusterControllerStubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createCluster. */ - public UnaryCallSettings.Builder createClusterSettings() { - return getStubSettingsBuilder().createClusterSettings(); - } - - /** Returns the builder for the settings used for calls to createCluster. */ - public OperationCallSettings.Builder - createClusterOperationSettings() { - return getStubSettingsBuilder().createClusterOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateCluster. */ - public UnaryCallSettings.Builder updateClusterSettings() { - return getStubSettingsBuilder().updateClusterSettings(); - } - - /** Returns the builder for the settings used for calls to updateCluster. */ - public OperationCallSettings.Builder - updateClusterOperationSettings() { - return getStubSettingsBuilder().updateClusterOperationSettings(); - } - - /** Returns the builder for the settings used for calls to stopCluster. */ - public UnaryCallSettings.Builder stopClusterSettings() { - return getStubSettingsBuilder().stopClusterSettings(); - } - - /** Returns the builder for the settings used for calls to stopCluster. */ - public OperationCallSettings.Builder - stopClusterOperationSettings() { - return getStubSettingsBuilder().stopClusterOperationSettings(); - } - - /** Returns the builder for the settings used for calls to startCluster. */ - public UnaryCallSettings.Builder startClusterSettings() { - return getStubSettingsBuilder().startClusterSettings(); - } - - /** Returns the builder for the settings used for calls to startCluster. */ - public OperationCallSettings.Builder - startClusterOperationSettings() { - return getStubSettingsBuilder().startClusterOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteCluster. */ - public UnaryCallSettings.Builder deleteClusterSettings() { - return getStubSettingsBuilder().deleteClusterSettings(); - } - - /** Returns the builder for the settings used for calls to deleteCluster. */ - public OperationCallSettings.Builder - deleteClusterOperationSettings() { - return getStubSettingsBuilder().deleteClusterOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getCluster. */ - public UnaryCallSettings.Builder getClusterSettings() { - return getStubSettingsBuilder().getClusterSettings(); - } - - /** Returns the builder for the settings used for calls to listClusters. */ - public PagedCallSettings.Builder< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings() { - return getStubSettingsBuilder().listClustersSettings(); - } - - /** Returns the builder for the settings used for calls to diagnoseCluster. */ - public UnaryCallSettings.Builder diagnoseClusterSettings() { - return getStubSettingsBuilder().diagnoseClusterSettings(); - } - - /** Returns the builder for the settings used for calls to diagnoseCluster. */ - public OperationCallSettings.Builder< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return getStubSettingsBuilder().diagnoseClusterOperationSettings(); - } - - @Override - public ClusterControllerSettings build() throws IOException { - return new ClusterControllerSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java deleted file mode 100644 index d052c400..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java +++ /dev/null @@ -1,906 +0,0 @@ -/* - * 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.dataproc.v1; - -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.dataproc.v1.stub.JobControllerStub; -import com.google.cloud.dataproc.v1.stub.JobControllerStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The JobController provides methods to manage jobs. - * - *

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 (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "projectId-894832108";
- *   String region = "region-934795532";
- *   Job job = Job.newBuilder().build();
- *   Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- * }
- * - *

Note: close() needs to be called on the JobControllerClient 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 JobControllerSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobControllerClient jobControllerClient = JobControllerClient.create(jobControllerSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class JobControllerClient implements BackgroundResource { - private final JobControllerSettings settings; - private final JobControllerStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of JobControllerClient with default settings. */ - public static final JobControllerClient create() throws IOException { - return create(JobControllerSettings.newBuilder().build()); - } - - /** - * Constructs an instance of JobControllerClient, 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 JobControllerClient create(JobControllerSettings settings) - throws IOException { - return new JobControllerClient(settings); - } - - /** - * Constructs an instance of JobControllerClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(JobControllerSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final JobControllerClient create(JobControllerStub stub) { - return new JobControllerClient(stub); - } - - /** - * Constructs an instance of JobControllerClient, 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 JobControllerClient(JobControllerSettings settings) throws IOException { - this.settings = settings; - this.stub = ((JobControllerStubSettings) 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 JobControllerClient(JobControllerStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final JobControllerSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public JobControllerStub 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. - /** - * Submits a job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   Job job = Job.newBuilder().build();
-   *   Job response = jobControllerClient.submitJob(projectId, region, job);
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param job Required. The job resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Job submitJob(String projectId, String region, Job job) { - SubmitJobRequest request = - SubmitJobRequest.newBuilder().setProjectId(projectId).setRegion(region).setJob(job).build(); - return submitJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits a job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   SubmitJobRequest request =
-   *       SubmitJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJob(Job.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Job response = jobControllerClient.submitJob(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 Job submitJob(SubmitJobRequest request) { - return submitJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits a job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   SubmitJobRequest request =
-   *       SubmitJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJob(Job.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future = jobControllerClient.submitJobCallable().futureCall(request);
-   *   // Do something.
-   *   Job response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable submitJobCallable() { - return stub.submitJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   Job job = Job.newBuilder().build();
-   *   Job response = jobControllerClient.submitJobAsOperationAsync(projectId, region, job).get();
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param job Required. The job resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture submitJobAsOperationAsync( - String projectId, String region, Job job) { - SubmitJobRequest request = - SubmitJobRequest.newBuilder().setProjectId(projectId).setRegion(region).setJob(job).build(); - return submitJobAsOperationAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   SubmitJobRequest request =
-   *       SubmitJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJob(Job.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   Job response = jobControllerClient.submitJobAsOperationAsync(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 submitJobAsOperationAsync( - SubmitJobRequest request) { - return submitJobAsOperationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   SubmitJobRequest request =
-   *       SubmitJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJob(Job.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       jobControllerClient.submitJobAsOperationOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Job response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - submitJobAsOperationOperationCallable() { - return stub.submitJobAsOperationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Submits job to a cluster. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   SubmitJobRequest request =
-   *       SubmitJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJob(Job.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       jobControllerClient.submitJobAsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable submitJobAsOperationCallable() { - return stub.submitJobAsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a job in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String jobId = "jobId101296568";
-   *   Job response = jobControllerClient.getJob(projectId, region, jobId);
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param jobId Required. The job ID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Job getJob(String projectId, String region, String jobId) { - GetJobRequest request = - GetJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .build(); - return getJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a job in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   GetJobRequest request =
-   *       GetJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   Job response = jobControllerClient.getJob(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 Job getJob(GetJobRequest request) { - return getJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the resource representation for a job in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   GetJobRequest request =
-   *       GetJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   ApiFuture future = jobControllerClient.getJobCallable().futureCall(request);
-   *   // Do something.
-   *   Job response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getJobCallable() { - return stub.getJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists regions/{region}/jobs in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   for (Job element : jobControllerClient.listJobs(projectId, region).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobsPagedResponse listJobs(String projectId, String region) { - ListJobsRequest request = - ListJobsRequest.newBuilder().setProjectId(projectId).setRegion(region).build(); - return listJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists regions/{region}/jobs in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String filter = "filter-1274492040";
-   *   for (Job element : jobControllerClient.listJobs(projectId, region, filter).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param filter Optional. A filter constraining the jobs to list. Filters are case-sensitive and - * have the following syntax: - *

[field = value] AND [field [= value]] ... - *

where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a - * label key. **value** can be `*` to match all values. `status.state` can - * be either `ACTIVE` or `NON_ACTIVE`. Only the logical `AND` operator is supported; - * space-separated items are treated as having an implicit `AND` operator. - *

Example filter: - *

status.state = ACTIVE AND labels.env = staging AND labels.starred = * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobsPagedResponse listJobs(String projectId, String region, String filter) { - ListJobsRequest request = - ListJobsRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setFilter(filter) - .build(); - return listJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists regions/{region}/jobs in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   ListJobsRequest request =
-   *       ListJobsRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   for (Job element : jobControllerClient.listJobs(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 ListJobsPagedResponse listJobs(ListJobsRequest request) { - return listJobsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists regions/{region}/jobs in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   ListJobsRequest request =
-   *       ListJobsRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   ApiFuture future = jobControllerClient.listJobsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Job element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listJobsPagedCallable() { - return stub.listJobsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists regions/{region}/jobs in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   ListJobsRequest request =
-   *       ListJobsRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setClusterName("clusterName-1141738587")
-   *           .setFilter("filter-1274492040")
-   *           .build();
-   *   while (true) {
-   *     ListJobsResponse response = jobControllerClient.listJobsCallable().call(request);
-   *     for (Job element : response.getResponsesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listJobsCallable() { - return stub.listJobsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   UpdateJobRequest request =
-   *       UpdateJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .setJob(Job.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Job response = jobControllerClient.updateJob(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 Job updateJob(UpdateJobRequest request) { - return updateJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job in a project. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   UpdateJobRequest request =
-   *       UpdateJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .setJob(Job.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = jobControllerClient.updateJobCallable().futureCall(request);
-   *   // Do something.
-   *   Job response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateJobCallable() { - return stub.updateJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a job cancellation request. To access the job resource after cancellation, call - * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String jobId = "jobId101296568";
-   *   Job response = jobControllerClient.cancelJob(projectId, region, jobId);
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param jobId Required. The job ID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Job cancelJob(String projectId, String region, String jobId) { - CancelJobRequest request = - CancelJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .build(); - return cancelJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a job cancellation request. To access the job resource after cancellation, call - * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   CancelJobRequest request =
-   *       CancelJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   Job response = jobControllerClient.cancelJob(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 Job cancelJob(CancelJobRequest request) { - return cancelJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts a job cancellation request. To access the job resource after cancellation, call - * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   CancelJobRequest request =
-   *       CancelJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   ApiFuture future = jobControllerClient.cancelJobCallable().futureCall(request);
-   *   // Do something.
-   *   Job response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable cancelJobCallable() { - return stub.cancelJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the job from the project. If the job is active, the delete fails, and the response - * returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "projectId-894832108";
-   *   String region = "region-934795532";
-   *   String jobId = "jobId101296568";
-   *   jobControllerClient.deleteJob(projectId, region, jobId);
-   * }
-   * }
- * - * @param projectId Required. The ID of the Google Cloud Platform project that the job belongs to. - * @param region Required. The Dataproc region in which to handle the request. - * @param jobId Required. The job ID. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteJob(String projectId, String region, String jobId) { - DeleteJobRequest request = - DeleteJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .build(); - deleteJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the job from the project. If the job is active, the delete fails, and the response - * returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   DeleteJobRequest request =
-   *       DeleteJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   jobControllerClient.deleteJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteJob(DeleteJobRequest request) { - deleteJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes the job from the project. If the job is active, the delete fails, and the response - * returns `FAILED_PRECONDITION`. - * - *

Sample code: - * - *

{@code
-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   DeleteJobRequest request =
-   *       DeleteJobRequest.newBuilder()
-   *           .setProjectId("projectId-894832108")
-   *           .setRegion("region-934795532")
-   *           .setJobId("jobId101296568")
-   *           .build();
-   *   ApiFuture future = jobControllerClient.deleteJobCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteJobCallable() { - return stub.deleteJobCallable(); - } - - @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 ListJobsPagedResponse - extends AbstractPagedListResponse< - ListJobsRequest, ListJobsResponse, Job, ListJobsPage, ListJobsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListJobsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListJobsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListJobsPagedResponse(ListJobsPage page) { - super(page, ListJobsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListJobsPage - extends AbstractPage { - - private ListJobsPage( - PageContext context, ListJobsResponse response) { - super(context, response); - } - - private static ListJobsPage createEmptyPage() { - return new ListJobsPage(null, null); - } - - @Override - protected ListJobsPage createPage( - PageContext context, ListJobsResponse response) { - return new ListJobsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListJobsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListJobsRequest, ListJobsResponse, Job, ListJobsPage, ListJobsFixedSizeCollection> { - - private ListJobsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListJobsFixedSizeCollection createEmptyCollection() { - return new ListJobsFixedSizeCollection(null, 0); - } - - @Override - protected ListJobsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListJobsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java deleted file mode 100644 index 4a443d10..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -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.dataproc.v1.stub.JobControllerStubSettings; -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 JobControllerClient}. - * - *

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

    - *
  • The default service address (dataproc.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 submitJob to 30 seconds: - * - *

{@code
- * JobControllerSettings.Builder jobControllerSettingsBuilder = JobControllerSettings.newBuilder();
- * jobControllerSettingsBuilder
- *     .submitJobSettings()
- *     .setRetrySettings(
- *         jobControllerSettingsBuilder
- *             .submitJobSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * JobControllerSettings jobControllerSettings = jobControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class JobControllerSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to submitJob. */ - public UnaryCallSettings submitJobSettings() { - return ((JobControllerStubSettings) getStubSettings()).submitJobSettings(); - } - - /** Returns the object with the settings used for calls to submitJobAs. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return ((JobControllerStubSettings) getStubSettings()).submitJobAsOperationSettings(); - } - - /** Returns the object with the settings used for calls to submitJobAsOperation. */ - public OperationCallSettings - submitJobAsOperationOperationSettings() { - return ((JobControllerStubSettings) getStubSettings()).submitJobAsOperationOperationSettings(); - } - - /** Returns the object with the settings used for calls to getJob. */ - public UnaryCallSettings getJobSettings() { - return ((JobControllerStubSettings) getStubSettings()).getJobSettings(); - } - - /** Returns the object with the settings used for calls to listJobs. */ - public PagedCallSettings - listJobsSettings() { - return ((JobControllerStubSettings) getStubSettings()).listJobsSettings(); - } - - /** Returns the object with the settings used for calls to updateJob. */ - public UnaryCallSettings updateJobSettings() { - return ((JobControllerStubSettings) getStubSettings()).updateJobSettings(); - } - - /** Returns the object with the settings used for calls to cancelJob. */ - public UnaryCallSettings cancelJobSettings() { - return ((JobControllerStubSettings) getStubSettings()).cancelJobSettings(); - } - - /** Returns the object with the settings used for calls to deleteJob. */ - public UnaryCallSettings deleteJobSettings() { - return ((JobControllerStubSettings) getStubSettings()).deleteJobSettings(); - } - - public static final JobControllerSettings create(JobControllerStubSettings stub) - throws IOException { - return new JobControllerSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return JobControllerStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return JobControllerStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return JobControllerStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return JobControllerStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return JobControllerStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return JobControllerStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return JobControllerStubSettings.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 JobControllerSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for JobControllerSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(JobControllerStubSettings.newBuilder(clientContext)); - } - - protected Builder(JobControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(JobControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(JobControllerStubSettings.newBuilder()); - } - - public JobControllerStubSettings.Builder getStubSettingsBuilder() { - return ((JobControllerStubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return getStubSettingsBuilder().submitJobSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAs. */ - public UnaryCallSettings.Builder submitJobAsOperationSettings() { - return getStubSettingsBuilder().submitJobAsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - public OperationCallSettings.Builder - submitJobAsOperationOperationSettings() { - return getStubSettingsBuilder().submitJobAsOperationOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getJob. */ - public UnaryCallSettings.Builder getJobSettings() { - return getStubSettingsBuilder().getJobSettings(); - } - - /** Returns the builder for the settings used for calls to listJobs. */ - public PagedCallSettings.Builder - listJobsSettings() { - return getStubSettingsBuilder().listJobsSettings(); - } - - /** Returns the builder for the settings used for calls to updateJob. */ - public UnaryCallSettings.Builder updateJobSettings() { - return getStubSettingsBuilder().updateJobSettings(); - } - - /** Returns the builder for the settings used for calls to cancelJob. */ - public UnaryCallSettings.Builder cancelJobSettings() { - return getStubSettingsBuilder().cancelJobSettings(); - } - - /** Returns the builder for the settings used for calls to deleteJob. */ - public UnaryCallSettings.Builder deleteJobSettings() { - return getStubSettingsBuilder().deleteJobSettings(); - } - - @Override - public JobControllerSettings build() throws IOException { - return new JobControllerSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java deleted file mode 100644 index c9478f49..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java +++ /dev/null @@ -1,1715 +0,0 @@ -/* - * 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.dataproc.v1; - -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.dataproc.v1.stub.WorkflowTemplateServiceStub; -import com.google.cloud.dataproc.v1.stub.WorkflowTemplateServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The API interface for managing Workflow Templates in the Dataproc API. - * - *

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 (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- *   WorkflowTemplate response =
- *       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- * - *

Note: close() needs to be called on the WorkflowTemplateServiceClient 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 - * WorkflowTemplateServiceSettings to create(). For example: - * - *

To customize credentials: - * - *

{@code
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class WorkflowTemplateServiceClient implements BackgroundResource { - private final WorkflowTemplateServiceSettings settings; - private final WorkflowTemplateServiceStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of WorkflowTemplateServiceClient with default settings. */ - public static final WorkflowTemplateServiceClient create() throws IOException { - return create(WorkflowTemplateServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of WorkflowTemplateServiceClient, 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 WorkflowTemplateServiceClient create(WorkflowTemplateServiceSettings settings) - throws IOException { - return new WorkflowTemplateServiceClient(settings); - } - - /** - * Constructs an instance of WorkflowTemplateServiceClient, using the given stub for making calls. - * This is for advanced usage - prefer using create(WorkflowTemplateServiceSettings). - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final WorkflowTemplateServiceClient create(WorkflowTemplateServiceStub stub) { - return new WorkflowTemplateServiceClient(stub); - } - - /** - * Constructs an instance of WorkflowTemplateServiceClient, 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 WorkflowTemplateServiceClient(WorkflowTemplateServiceSettings settings) - throws IOException { - this.settings = settings; - this.stub = ((WorkflowTemplateServiceStubSettings) 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 WorkflowTemplateServiceClient(WorkflowTemplateServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final WorkflowTemplateServiceSettings getSettings() { - return settings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public WorkflowTemplateServiceStub 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. - /** - * Creates new workflow template. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response =
-   *       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.create`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.create`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The Dataproc workflow template to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate createWorkflowTemplate( - LocationName parent, WorkflowTemplate template) { - CreateWorkflowTemplateRequest request = - CreateWorkflowTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setTemplate(template) - .build(); - return createWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new workflow template. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response =
-   *       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.create`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.create`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The Dataproc workflow template to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate createWorkflowTemplate( - RegionName parent, WorkflowTemplate template) { - CreateWorkflowTemplateRequest request = - CreateWorkflowTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setTemplate(template) - .build(); - return createWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new workflow template. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String parent = RegionName.of("[PROJECT]", "[REGION]").toString();
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response =
-   *       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.create`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.create`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The Dataproc workflow template to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate createWorkflowTemplate(String parent, WorkflowTemplate template) { - CreateWorkflowTemplateRequest request = - CreateWorkflowTemplateRequest.newBuilder().setParent(parent).setTemplate(template).build(); - return createWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new workflow template. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   CreateWorkflowTemplateRequest request =
-   *       CreateWorkflowTemplateRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(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 WorkflowTemplate createWorkflowTemplate(CreateWorkflowTemplateRequest request) { - return createWorkflowTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates new workflow template. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   CreateWorkflowTemplateRequest request =
-   *       CreateWorkflowTemplateRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.createWorkflowTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   WorkflowTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createWorkflowTemplateCallable() { - return stub.createWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the latest workflow template. - * - *

Can retrieve previously instantiated template by specifying optional version parameter. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *           "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.get`, the resource name of the template has - * the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.get`, the resource name of the template has - * the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate getWorkflowTemplate(WorkflowTemplateName name) { - GetWorkflowTemplateRequest request = - GetWorkflowTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the latest workflow template. - * - *

Can retrieve previously instantiated template by specifying optional version parameter. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *               "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *           .toString();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.get`, the resource name of the template has - * the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.get`, the resource name of the template has - * the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate getWorkflowTemplate(String name) { - GetWorkflowTemplateRequest request = - GetWorkflowTemplateRequest.newBuilder().setName(name).build(); - return getWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the latest workflow template. - * - *

Can retrieve previously instantiated template by specifying optional version parameter. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   GetWorkflowTemplateRequest request =
-   *       GetWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(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 WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest request) { - return getWorkflowTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the latest workflow template. - * - *

Can retrieve previously instantiated template by specifying optional version parameter. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   GetWorkflowTemplateRequest request =
-   *       GetWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.getWorkflowTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   WorkflowTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getWorkflowTemplateCallable() { - return stub.getWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *           "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateWorkflowTemplateAsync( - WorkflowTemplateName name) { - InstantiateWorkflowTemplateRequest request = - InstantiateWorkflowTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return instantiateWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *               "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *           .toString();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateWorkflowTemplateAsync( - String name) { - InstantiateWorkflowTemplateRequest request = - InstantiateWorkflowTemplateRequest.newBuilder().setName(name).build(); - return instantiateWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *           "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   Map parameters = new HashMap<>();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name, parameters).get();
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @param parameters Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateWorkflowTemplateAsync( - WorkflowTemplateName name, Map parameters) { - InstantiateWorkflowTemplateRequest request = - InstantiateWorkflowTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .putAllParameters(parameters) - .build(); - return instantiateWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *               "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *           .toString();
-   *   Map parameters = new HashMap<>();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name, parameters).get();
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @param parameters Optional. Map from parameter names to values that should be used for those - * parameters. Values may not exceed 1000 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateWorkflowTemplateAsync( - String name, Map parameters) { - InstantiateWorkflowTemplateRequest request = - InstantiateWorkflowTemplateRequest.newBuilder() - .setName(name) - .putAllParameters(parameters) - .build(); - return instantiateWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateWorkflowTemplateRequest request =
-   *       InstantiateWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .setRequestId("requestId693933066")
-   *           .putAllParameters(new HashMap())
-   *           .build();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(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 instantiateWorkflowTemplateAsync( - InstantiateWorkflowTemplateRequest request) { - return instantiateWorkflowTemplateOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateWorkflowTemplateRequest request =
-   *       InstantiateWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .setRequestId("requestId693933066")
-   *           .putAllParameters(new HashMap())
-   *           .build();
-   *   OperationFuture future =
-   *       workflowTemplateServiceClient
-   *           .instantiateWorkflowTemplateOperationCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - instantiateWorkflowTemplateOperationCallable() { - return stub.instantiateWorkflowTemplateOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateWorkflowTemplateRequest request =
-   *       InstantiateWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .setRequestId("requestId693933066")
-   *           .putAllParameters(new HashMap())
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.instantiateWorkflowTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - instantiateWorkflowTemplateCallable() { - return stub.instantiateWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,instantiateinline`, the resource name of the - * region has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiateinline`, the resource name of - * the location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The workflow template to instantiate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateInlineWorkflowTemplateAsync( - LocationName parent, WorkflowTemplate template) { - InstantiateInlineWorkflowTemplateRequest request = - InstantiateInlineWorkflowTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setTemplate(template) - .build(); - return instantiateInlineWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,instantiateinline`, the resource name of the - * region has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiateinline`, the resource name of - * the location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The workflow template to instantiate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateInlineWorkflowTemplateAsync( - RegionName parent, WorkflowTemplate template) { - InstantiateInlineWorkflowTemplateRequest request = - InstantiateInlineWorkflowTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setTemplate(template) - .build(); - return instantiateInlineWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String parent = RegionName.of("[PROJECT]", "[REGION]").toString();
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,instantiateinline`, the resource name of the - * region has the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiateinline`, the resource name of - * the location has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @param template Required. The workflow template to instantiate. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture instantiateInlineWorkflowTemplateAsync( - String parent, WorkflowTemplate template) { - InstantiateInlineWorkflowTemplateRequest request = - InstantiateInlineWorkflowTemplateRequest.newBuilder() - .setParent(parent) - .setTemplate(template) - .build(); - return instantiateInlineWorkflowTemplateAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateInlineWorkflowTemplateRequest request =
-   *       InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(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 instantiateInlineWorkflowTemplateAsync( - InstantiateInlineWorkflowTemplateRequest request) { - return instantiateInlineWorkflowTemplateOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateInlineWorkflowTemplateRequest request =
-   *       InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   OperationFuture future =
-   *       workflowTemplateServiceClient
-   *           .instantiateInlineWorkflowTemplateOperationCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - return stub.instantiateInlineWorkflowTemplateOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Instantiates a template and begins execution. - * - *

This method is equivalent to executing the sequence - * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - * - *

The returned Operation can be used to track execution of workflow by polling - * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when - * entire workflow is finished. - * - *

The running workflow can be aborted via - * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any - * inflight jobs to be cancelled and workflow-owned clusters to be deleted. - * - *

The [Operation.metadata][google.longrunning.Operation.metadata] will be - * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - * Also see [Using - * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - * - *

On successful completion, [Operation.response][google.longrunning.Operation.response] will - * be [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   InstantiateInlineWorkflowTemplateRequest request =
-   *       InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .setRequestId("requestId693933066")
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient
-   *           .instantiateInlineWorkflowTemplateCallable()
-   *           .futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return stub.instantiateInlineWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) workflow template. The updated template must contain version that matches - * the current server version. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(template);
-   * }
-   * }
- * - * @param template Required. The updated workflow template. - *

The `template.version` field must match the current version. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final WorkflowTemplate updateWorkflowTemplate(WorkflowTemplate template) { - UpdateWorkflowTemplateRequest request = - UpdateWorkflowTemplateRequest.newBuilder().setTemplate(template).build(); - return updateWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) workflow template. The updated template must contain version that matches - * the current server version. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   UpdateWorkflowTemplateRequest request =
-   *       UpdateWorkflowTemplateRequest.newBuilder()
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.updateWorkflowTemplate(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 WorkflowTemplate updateWorkflowTemplate(UpdateWorkflowTemplateRequest request) { - return updateWorkflowTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates (replaces) workflow template. The updated template must contain version that matches - * the current server version. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   UpdateWorkflowTemplateRequest request =
-   *       UpdateWorkflowTemplateRequest.newBuilder()
-   *           .setTemplate(WorkflowTemplate.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.updateWorkflowTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   WorkflowTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateWorkflowTemplateCallable() { - return stub.updateWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (WorkflowTemplate element :
-   *       workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) { - ListWorkflowTemplatesRequest request = - ListWorkflowTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listWorkflowTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (WorkflowTemplate element :
-   *       workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName parent) { - ListWorkflowTemplatesRequest request = - ListWorkflowTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listWorkflowTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String parent = RegionName.of("[PROJECT]", "[REGION]").toString();
-   *   for (WorkflowTemplate element :
-   *       workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates,list`, the resource name of the region has - * the following format: `projects/{project_id}/regions/{region}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.list`, the resource name of the location - * has the following format: `projects/{project_id}/locations/{location}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(String parent) { - ListWorkflowTemplatesRequest request = - ListWorkflowTemplatesRequest.newBuilder().setParent(parent).build(); - return listWorkflowTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   ListWorkflowTemplatesRequest request =
-   *       ListWorkflowTemplatesRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (WorkflowTemplate element :
-   *       workflowTemplateServiceClient.listWorkflowTemplates(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 ListWorkflowTemplatesPagedResponse listWorkflowTemplates( - ListWorkflowTemplatesRequest request) { - return listWorkflowTemplatesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   ListWorkflowTemplatesRequest request =
-   *       ListWorkflowTemplatesRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.listWorkflowTemplatesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (WorkflowTemplate element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listWorkflowTemplatesPagedCallable() { - return stub.listWorkflowTemplatesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists workflows that match the specified filter in the request. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   ListWorkflowTemplatesRequest request =
-   *       ListWorkflowTemplatesRequest.newBuilder()
-   *           .setParent(RegionName.of("[PROJECT]", "[REGION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListWorkflowTemplatesResponse response =
-   *         workflowTemplateServiceClient.listWorkflowTemplatesCallable().call(request);
-   *     for (WorkflowTemplate element : response.getResponsesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listWorkflowTemplatesCallable() { - return stub.listWorkflowTemplatesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *           "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.deleteWorkflowTemplate(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.delete`, the resource name of the template - * has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteWorkflowTemplate(WorkflowTemplateName name) { - DeleteWorkflowTemplateRequest request = - DeleteWorkflowTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   String name =
-   *       WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *               "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *           .toString();
-   *   workflowTemplateServiceClient.deleteWorkflowTemplate(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the workflow template, as described in - * https://cloud.google.com/apis/design/resource_names. - *
    - *
  • For `projects.regions.workflowTemplates.delete`, the resource name of the template - * has the following format: - * `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - *
- *
    - *
  • For `projects.locations.workflowTemplates.instantiate`, the resource name of the - * template has the following format: - * `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteWorkflowTemplate(String name) { - DeleteWorkflowTemplateRequest request = - DeleteWorkflowTemplateRequest.newBuilder().setName(name).build(); - deleteWorkflowTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   DeleteWorkflowTemplateRequest request =
-   *       DeleteWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .build();
-   *   workflowTemplateServiceClient.deleteWorkflowTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteWorkflowTemplate(DeleteWorkflowTemplateRequest request) { - deleteWorkflowTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow template. It does not cancel in-progress workflows. - * - *

Sample code: - * - *

{@code
-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
-   *     WorkflowTemplateServiceClient.create()) {
-   *   DeleteWorkflowTemplateRequest request =
-   *       DeleteWorkflowTemplateRequest.newBuilder()
-   *           .setName(
-   *               WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
-   *                       "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]")
-   *                   .toString())
-   *           .setVersion(351608024)
-   *           .build();
-   *   ApiFuture future =
-   *       workflowTemplateServiceClient.deleteWorkflowTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteWorkflowTemplateCallable() { - return stub.deleteWorkflowTemplateCallable(); - } - - @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 ListWorkflowTemplatesPagedResponse - extends AbstractPagedListResponse< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - WorkflowTemplate, - ListWorkflowTemplatesPage, - ListWorkflowTemplatesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListWorkflowTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListWorkflowTemplatesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListWorkflowTemplatesPagedResponse(ListWorkflowTemplatesPage page) { - super(page, ListWorkflowTemplatesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListWorkflowTemplatesPage - extends AbstractPage< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - WorkflowTemplate, - ListWorkflowTemplatesPage> { - - private ListWorkflowTemplatesPage( - PageContext - context, - ListWorkflowTemplatesResponse response) { - super(context, response); - } - - private static ListWorkflowTemplatesPage createEmptyPage() { - return new ListWorkflowTemplatesPage(null, null); - } - - @Override - protected ListWorkflowTemplatesPage createPage( - PageContext - context, - ListWorkflowTemplatesResponse response) { - return new ListWorkflowTemplatesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListWorkflowTemplatesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - WorkflowTemplate, - ListWorkflowTemplatesPage, - ListWorkflowTemplatesFixedSizeCollection> { - - private ListWorkflowTemplatesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListWorkflowTemplatesFixedSizeCollection createEmptyCollection() { - return new ListWorkflowTemplatesFixedSizeCollection(null, 0); - } - - @Override - protected ListWorkflowTemplatesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListWorkflowTemplatesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java deleted file mode 100644 index 9502edcb..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -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.dataproc.v1.stub.WorkflowTemplateServiceStubSettings; -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 WorkflowTemplateServiceClient}. - * - *

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

    - *
  • The default service address (dataproc.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 createWorkflowTemplate to 30 seconds: - * - *

{@code
- * WorkflowTemplateServiceSettings.Builder workflowTemplateServiceSettingsBuilder =
- *     WorkflowTemplateServiceSettings.newBuilder();
- * workflowTemplateServiceSettingsBuilder
- *     .createWorkflowTemplateSettings()
- *     .setRetrySettings(
- *         workflowTemplateServiceSettingsBuilder
- *             .createWorkflowTemplateSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     workflowTemplateServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class WorkflowTemplateServiceSettings - extends ClientSettings { - - /** Returns the object with the settings used for calls to createWorkflowTemplate. */ - public UnaryCallSettings - createWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .createWorkflowTemplateSettings(); - } - - /** Returns the object with the settings used for calls to getWorkflowTemplate. */ - public UnaryCallSettings - getWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()).getWorkflowTemplateSettings(); - } - - /** Returns the object with the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings - instantiateWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateWorkflowTemplateSettings(); - } - - /** Returns the object with the settings used for calls to instantiateWorkflowTemplate. */ - public OperationCallSettings - instantiateWorkflowTemplateOperationSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateWorkflowTemplateOperationSettings(); - } - - /** Returns the object with the settings used for calls to instantiateInlineWorkflowTemplate. */ - public UnaryCallSettings - instantiateInlineWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateInlineWorkflowTemplateSettings(); - } - - /** Returns the object with the settings used for calls to instantiateInlineWorkflowTemplate. */ - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateWorkflowTemplate. */ - public UnaryCallSettings - updateWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .updateWorkflowTemplateSettings(); - } - - /** Returns the object with the settings used for calls to listWorkflowTemplates. */ - public PagedCallSettings< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .listWorkflowTemplatesSettings(); - } - - /** Returns the object with the settings used for calls to deleteWorkflowTemplate. */ - public UnaryCallSettings deleteWorkflowTemplateSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .deleteWorkflowTemplateSettings(); - } - - public static final WorkflowTemplateServiceSettings create( - WorkflowTemplateServiceStubSettings stub) throws IOException { - return new WorkflowTemplateServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return WorkflowTemplateServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return WorkflowTemplateServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return WorkflowTemplateServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return WorkflowTemplateServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return WorkflowTemplateServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return WorkflowTemplateServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return WorkflowTemplateServiceStubSettings.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 WorkflowTemplateServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for WorkflowTemplateServiceSettings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(WorkflowTemplateServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(WorkflowTemplateServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(WorkflowTemplateServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(WorkflowTemplateServiceStubSettings.newBuilder()); - } - - public WorkflowTemplateServiceStubSettings.Builder getStubSettingsBuilder() { - return ((WorkflowTemplateServiceStubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createWorkflowTemplate. */ - public UnaryCallSettings.Builder - createWorkflowTemplateSettings() { - return getStubSettingsBuilder().createWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to getWorkflowTemplate. */ - public UnaryCallSettings.Builder - getWorkflowTemplateSettings() { - return getStubSettingsBuilder().getWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateWorkflowTemplateSettings() { - return getStubSettingsBuilder().instantiateWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - public OperationCallSettings.Builder< - InstantiateWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateWorkflowTemplateOperationSettings() { - return getStubSettingsBuilder().instantiateWorkflowTemplateOperationSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateInlineWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateInlineWorkflowTemplateSettings() { - return getStubSettingsBuilder().instantiateInlineWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateInlineWorkflowTemplate. */ - public OperationCallSettings.Builder< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings() { - return getStubSettingsBuilder().instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateWorkflowTemplate. */ - public UnaryCallSettings.Builder - updateWorkflowTemplateSettings() { - return getStubSettingsBuilder().updateWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to listWorkflowTemplates. */ - public PagedCallSettings.Builder< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings() { - return getStubSettingsBuilder().listWorkflowTemplatesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteWorkflowTemplate. */ - public UnaryCallSettings.Builder - deleteWorkflowTemplateSettings() { - return getStubSettingsBuilder().deleteWorkflowTemplateSettings(); - } - - @Override - public WorkflowTemplateServiceSettings build() throws IOException { - return new WorkflowTemplateServiceSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json deleted file mode 100644 index 26e0eeb5..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.dataproc.v1", - "libraryPackage": "com.google.cloud.dataproc.v1", - "services": { - "AutoscalingPolicyService": { - "clients": { - "grpc": { - "libraryClient": "AutoscalingPolicyServiceClient", - "rpcs": { - "CreateAutoscalingPolicy": { - "methods": ["createAutoscalingPolicy", "createAutoscalingPolicy", "createAutoscalingPolicy", "createAutoscalingPolicy", "createAutoscalingPolicyCallable"] - }, - "DeleteAutoscalingPolicy": { - "methods": ["deleteAutoscalingPolicy", "deleteAutoscalingPolicy", "deleteAutoscalingPolicy", "deleteAutoscalingPolicyCallable"] - }, - "GetAutoscalingPolicy": { - "methods": ["getAutoscalingPolicy", "getAutoscalingPolicy", "getAutoscalingPolicy", "getAutoscalingPolicyCallable"] - }, - "ListAutoscalingPolicies": { - "methods": ["listAutoscalingPolicies", "listAutoscalingPolicies", "listAutoscalingPolicies", "listAutoscalingPolicies", "listAutoscalingPoliciesPagedCallable", "listAutoscalingPoliciesCallable"] - }, - "UpdateAutoscalingPolicy": { - "methods": ["updateAutoscalingPolicy", "updateAutoscalingPolicy", "updateAutoscalingPolicyCallable"] - } - } - } - } - }, - "BatchController": { - "clients": { - "grpc": { - "libraryClient": "BatchControllerClient", - "rpcs": { - "CreateBatch": { - "methods": ["createBatchAsync", "createBatchAsync", "createBatchAsync", "createBatchOperationCallable", "createBatchCallable"] - }, - "DeleteBatch": { - "methods": ["deleteBatch", "deleteBatch", "deleteBatch", "deleteBatchCallable"] - }, - "GetBatch": { - "methods": ["getBatch", "getBatch", "getBatch", "getBatchCallable"] - }, - "ListBatches": { - "methods": ["listBatches", "listBatches", "listBatches", "listBatchesPagedCallable", "listBatchesCallable"] - } - } - } - } - }, - "ClusterController": { - "clients": { - "grpc": { - "libraryClient": "ClusterControllerClient", - "rpcs": { - "CreateCluster": { - "methods": ["createClusterAsync", "createClusterAsync", "createClusterOperationCallable", "createClusterCallable"] - }, - "DeleteCluster": { - "methods": ["deleteClusterAsync", "deleteClusterAsync", "deleteClusterOperationCallable", "deleteClusterCallable"] - }, - "DiagnoseCluster": { - "methods": ["diagnoseClusterAsync", "diagnoseClusterAsync", "diagnoseClusterOperationCallable", "diagnoseClusterCallable"] - }, - "GetCluster": { - "methods": ["getCluster", "getCluster", "getClusterCallable"] - }, - "ListClusters": { - "methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"] - }, - "StartCluster": { - "methods": ["startClusterAsync", "startClusterOperationCallable", "startClusterCallable"] - }, - "StopCluster": { - "methods": ["stopClusterAsync", "stopClusterOperationCallable", "stopClusterCallable"] - }, - "UpdateCluster": { - "methods": ["updateClusterAsync", "updateClusterAsync", "updateClusterOperationCallable", "updateClusterCallable"] - } - } - } - } - }, - "JobController": { - "clients": { - "grpc": { - "libraryClient": "JobControllerClient", - "rpcs": { - "CancelJob": { - "methods": ["cancelJob", "cancelJob", "cancelJobCallable"] - }, - "DeleteJob": { - "methods": ["deleteJob", "deleteJob", "deleteJobCallable"] - }, - "GetJob": { - "methods": ["getJob", "getJob", "getJobCallable"] - }, - "ListJobs": { - "methods": ["listJobs", "listJobs", "listJobs", "listJobsPagedCallable", "listJobsCallable"] - }, - "SubmitJob": { - "methods": ["submitJob", "submitJob", "submitJobCallable"] - }, - "SubmitJobAsOperation": { - "methods": ["submitJobAsOperationAsync", "submitJobAsOperationAsync", "submitJobAsOperationOperationCallable", "submitJobAsOperationCallable"] - }, - "UpdateJob": { - "methods": ["updateJob", "updateJobCallable"] - } - } - } - } - }, - "WorkflowTemplateService": { - "clients": { - "grpc": { - "libraryClient": "WorkflowTemplateServiceClient", - "rpcs": { - "CreateWorkflowTemplate": { - "methods": ["createWorkflowTemplate", "createWorkflowTemplate", "createWorkflowTemplate", "createWorkflowTemplate", "createWorkflowTemplateCallable"] - }, - "DeleteWorkflowTemplate": { - "methods": ["deleteWorkflowTemplate", "deleteWorkflowTemplate", "deleteWorkflowTemplate", "deleteWorkflowTemplateCallable"] - }, - "GetWorkflowTemplate": { - "methods": ["getWorkflowTemplate", "getWorkflowTemplate", "getWorkflowTemplate", "getWorkflowTemplateCallable"] - }, - "InstantiateInlineWorkflowTemplate": { - "methods": ["instantiateInlineWorkflowTemplateAsync", "instantiateInlineWorkflowTemplateAsync", "instantiateInlineWorkflowTemplateAsync", "instantiateInlineWorkflowTemplateAsync", "instantiateInlineWorkflowTemplateOperationCallable", "instantiateInlineWorkflowTemplateCallable"] - }, - "InstantiateWorkflowTemplate": { - "methods": ["instantiateWorkflowTemplateAsync", "instantiateWorkflowTemplateAsync", "instantiateWorkflowTemplateAsync", "instantiateWorkflowTemplateAsync", "instantiateWorkflowTemplateAsync", "instantiateWorkflowTemplateOperationCallable", "instantiateWorkflowTemplateCallable"] - }, - "ListWorkflowTemplates": { - "methods": ["listWorkflowTemplates", "listWorkflowTemplates", "listWorkflowTemplates", "listWorkflowTemplates", "listWorkflowTemplatesPagedCallable", "listWorkflowTemplatesCallable"] - }, - "UpdateWorkflowTemplate": { - "methods": ["updateWorkflowTemplate", "updateWorkflowTemplate", "updateWorkflowTemplateCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java deleted file mode 100644 index ff77c4df..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - * - *

======================= AutoscalingPolicyServiceClient ======================= - * - *

Service Description: The API interface for managing autoscaling policies in the Dataproc API. - * - *

Sample for AutoscalingPolicyServiceClient: - * - *

{@code
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response =
- *       autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- * }
- * - *

======================= BatchControllerClient ======================= - * - *

Service Description: The BatchController provides methods to manage batch workloads. - * - *

Sample for BatchControllerClient: - * - *

{@code
- * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) {
- *   BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]");
- *   Batch response = batchControllerClient.getBatch(name);
- * }
- * }
- * - *

======================= ClusterControllerClient ======================= - * - *

Service Description: The ClusterControllerService provides methods to manage clusters of - * Compute Engine instances. - * - *

Sample for ClusterControllerClient: - * - *

{@code
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "projectId-894832108";
- *   String region = "region-934795532";
- *   String clusterName = "clusterName-1141738587";
- *   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * }
- * - *

======================= JobControllerClient ======================= - * - *

Service Description: The JobController provides methods to manage jobs. - * - *

Sample for JobControllerClient: - * - *

{@code
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "projectId-894832108";
- *   String region = "region-934795532";
- *   Job job = Job.newBuilder().build();
- *   Job response = jobControllerClient.submitJob(projectId, region, job);
- * }
- * }
- * - *

======================= WorkflowTemplateServiceClient ======================= - * - *

Service Description: The API interface for managing Workflow Templates in the Dataproc API. - * - *

Sample for WorkflowTemplateServiceClient: - * - *

{@code
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- *   WorkflowTemplate response =
- *       workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.dataproc.v1; - -import javax.annotation.Generated; diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java deleted file mode 100644 index a4cb2d3b..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1.AutoscalingPolicy; -import com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse; -import com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AutoscalingPolicyService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class AutoscalingPolicyServiceStub implements BackgroundResource { - - public UnaryCallable - createAutoscalingPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: createAutoscalingPolicyCallable()"); - } - - public UnaryCallable - updateAutoscalingPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: updateAutoscalingPolicyCallable()"); - } - - public UnaryCallable - getAutoscalingPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getAutoscalingPolicyCallable()"); - } - - public UnaryCallable - listAutoscalingPoliciesPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listAutoscalingPoliciesPagedCallable()"); - } - - public UnaryCallable - listAutoscalingPoliciesCallable() { - throw new UnsupportedOperationException("Not implemented: listAutoscalingPoliciesCallable()"); - } - - public UnaryCallable deleteAutoscalingPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: deleteAutoscalingPolicyCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java deleted file mode 100644 index d32c58ce..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java +++ /dev/null @@ -1,499 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -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.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.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.dataproc.v1.AutoscalingPolicy; -import com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse; -import com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest; -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.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 AutoscalingPolicyServiceStub}. - * - *

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

    - *
  • The default service address (dataproc.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 createAutoscalingPolicy to 30 seconds: - * - *

{@code
- * AutoscalingPolicyServiceStubSettings.Builder autoscalingPolicyServiceSettingsBuilder =
- *     AutoscalingPolicyServiceStubSettings.newBuilder();
- * autoscalingPolicyServiceSettingsBuilder
- *     .createAutoscalingPolicySettings()
- *     .setRetrySettings(
- *         autoscalingPolicyServiceSettingsBuilder
- *             .createAutoscalingPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AutoscalingPolicyServiceStubSettings autoscalingPolicyServiceSettings =
- *     autoscalingPolicyServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AutoscalingPolicyServiceStubSettings - 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 UnaryCallSettings - createAutoscalingPolicySettings; - private final UnaryCallSettings - updateAutoscalingPolicySettings; - private final UnaryCallSettings - getAutoscalingPolicySettings; - private final PagedCallSettings< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings; - private final UnaryCallSettings - deleteAutoscalingPolicySettings; - - private static final PagedListDescriptor< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse, AutoscalingPolicy> - LIST_AUTOSCALING_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - AutoscalingPolicy>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAutoscalingPoliciesRequest injectToken( - ListAutoscalingPoliciesRequest payload, String token) { - return ListAutoscalingPoliciesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAutoscalingPoliciesRequest injectPageSize( - ListAutoscalingPoliciesRequest payload, int pageSize) { - return ListAutoscalingPoliciesRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListAutoscalingPoliciesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAutoscalingPoliciesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListAutoscalingPoliciesResponse payload) { - return payload.getPoliciesList() == null - ? ImmutableList.of() - : payload.getPoliciesList(); - } - }; - - private static final PagedListResponseFactory< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - LIST_AUTOSCALING_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListAutoscalingPoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - AutoscalingPolicy> - pageContext = - PageContext.create( - callable, LIST_AUTOSCALING_POLICIES_PAGE_STR_DESC, request, context); - return ListAutoscalingPoliciesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createAutoscalingPolicy. */ - public UnaryCallSettings - createAutoscalingPolicySettings() { - return createAutoscalingPolicySettings; - } - - /** Returns the object with the settings used for calls to updateAutoscalingPolicy. */ - public UnaryCallSettings - updateAutoscalingPolicySettings() { - return updateAutoscalingPolicySettings; - } - - /** Returns the object with the settings used for calls to getAutoscalingPolicy. */ - public UnaryCallSettings - getAutoscalingPolicySettings() { - return getAutoscalingPolicySettings; - } - - /** Returns the object with the settings used for calls to listAutoscalingPolicies. */ - public PagedCallSettings< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings() { - return listAutoscalingPoliciesSettings; - } - - /** Returns the object with the settings used for calls to deleteAutoscalingPolicy. */ - public UnaryCallSettings - deleteAutoscalingPolicySettings() { - return deleteAutoscalingPolicySettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AutoscalingPolicyServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAutoscalingPolicyServiceStub.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 "dataproc.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dataproc.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) - .setUseJwtAccessWithScope(true); - } - - /** 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(AutoscalingPolicyServiceStubSettings.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 AutoscalingPolicyServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createAutoscalingPolicySettings = settingsBuilder.createAutoscalingPolicySettings().build(); - updateAutoscalingPolicySettings = settingsBuilder.updateAutoscalingPolicySettings().build(); - getAutoscalingPolicySettings = settingsBuilder.getAutoscalingPolicySettings().build(); - listAutoscalingPoliciesSettings = settingsBuilder.listAutoscalingPoliciesSettings().build(); - deleteAutoscalingPolicySettings = settingsBuilder.deleteAutoscalingPolicySettings().build(); - } - - /** Builder for AutoscalingPolicyServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createAutoscalingPolicySettings; - private final UnaryCallSettings.Builder - updateAutoscalingPolicySettings; - private final UnaryCallSettings.Builder - getAutoscalingPolicySettings; - private final PagedCallSettings.Builder< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings; - private final UnaryCallSettings.Builder - deleteAutoscalingPolicySettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - 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(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAutoscalingPoliciesSettings = - PagedCallSettings.newBuilder(LIST_AUTOSCALING_POLICIES_PAGE_STR_FACT); - deleteAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createAutoscalingPolicySettings, - updateAutoscalingPolicySettings, - getAutoscalingPolicySettings, - listAutoscalingPoliciesSettings, - deleteAutoscalingPolicySettings); - initDefaults(this); - } - - protected Builder(AutoscalingPolicyServiceStubSettings settings) { - super(settings); - - createAutoscalingPolicySettings = settings.createAutoscalingPolicySettings.toBuilder(); - updateAutoscalingPolicySettings = settings.updateAutoscalingPolicySettings.toBuilder(); - getAutoscalingPolicySettings = settings.getAutoscalingPolicySettings.toBuilder(); - listAutoscalingPoliciesSettings = settings.listAutoscalingPoliciesSettings.toBuilder(); - deleteAutoscalingPolicySettings = settings.deleteAutoscalingPolicySettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createAutoscalingPolicySettings, - updateAutoscalingPolicySettings, - getAutoscalingPolicySettings, - listAutoscalingPoliciesSettings, - deleteAutoscalingPolicySettings); - } - - 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 - .createAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .updateAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .getAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listAutoscalingPoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .deleteAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */ - public UnaryCallSettings.Builder - createAutoscalingPolicySettings() { - return createAutoscalingPolicySettings; - } - - /** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */ - public UnaryCallSettings.Builder - updateAutoscalingPolicySettings() { - return updateAutoscalingPolicySettings; - } - - /** Returns the builder for the settings used for calls to getAutoscalingPolicy. */ - public UnaryCallSettings.Builder - getAutoscalingPolicySettings() { - return getAutoscalingPolicySettings; - } - - /** Returns the builder for the settings used for calls to listAutoscalingPolicies. */ - public PagedCallSettings.Builder< - ListAutoscalingPoliciesRequest, - ListAutoscalingPoliciesResponse, - ListAutoscalingPoliciesPagedResponse> - listAutoscalingPoliciesSettings() { - return listAutoscalingPoliciesSettings; - } - - /** Returns the builder for the settings used for calls to deleteAutoscalingPolicy. */ - public UnaryCallSettings.Builder - deleteAutoscalingPolicySettings() { - return deleteAutoscalingPolicySettings; - } - - @Override - public AutoscalingPolicyServiceStubSettings build() throws IOException { - return new AutoscalingPolicyServiceStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStub.java deleted file mode 100644 index 3c8721b8..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStub.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse; - -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.dataproc.v1.Batch; -import com.google.cloud.dataproc.v1.BatchOperationMetadata; -import com.google.cloud.dataproc.v1.CreateBatchRequest; -import com.google.cloud.dataproc.v1.DeleteBatchRequest; -import com.google.cloud.dataproc.v1.GetBatchRequest; -import com.google.cloud.dataproc.v1.ListBatchesRequest; -import com.google.cloud.dataproc.v1.ListBatchesResponse; -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 BatchController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class BatchControllerStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public OperationCallable - createBatchOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createBatchOperationCallable()"); - } - - public UnaryCallable createBatchCallable() { - throw new UnsupportedOperationException("Not implemented: createBatchCallable()"); - } - - public UnaryCallable getBatchCallable() { - throw new UnsupportedOperationException("Not implemented: getBatchCallable()"); - } - - public UnaryCallable listBatchesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listBatchesPagedCallable()"); - } - - public UnaryCallable listBatchesCallable() { - throw new UnsupportedOperationException("Not implemented: listBatchesCallable()"); - } - - public UnaryCallable deleteBatchCallable() { - throw new UnsupportedOperationException("Not implemented: deleteBatchCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStubSettings.java deleted file mode 100644 index 793163de..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/BatchControllerStubSettings.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse; - -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.dataproc.v1.Batch; -import com.google.cloud.dataproc.v1.BatchOperationMetadata; -import com.google.cloud.dataproc.v1.CreateBatchRequest; -import com.google.cloud.dataproc.v1.DeleteBatchRequest; -import com.google.cloud.dataproc.v1.GetBatchRequest; -import com.google.cloud.dataproc.v1.ListBatchesRequest; -import com.google.cloud.dataproc.v1.ListBatchesResponse; -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 BatchControllerStub}. - * - *

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

    - *
  • The default service address (dataproc.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 getBatch to 30 seconds: - * - *

{@code
- * BatchControllerStubSettings.Builder batchControllerSettingsBuilder =
- *     BatchControllerStubSettings.newBuilder();
- * batchControllerSettingsBuilder
- *     .getBatchSettings()
- *     .setRetrySettings(
- *         batchControllerSettingsBuilder
- *             .getBatchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BatchControllerStubSettings batchControllerSettings = batchControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class BatchControllerStubSettings 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 UnaryCallSettings createBatchSettings; - private final OperationCallSettings - createBatchOperationSettings; - private final UnaryCallSettings getBatchSettings; - private final PagedCallSettings - listBatchesSettings; - private final UnaryCallSettings deleteBatchSettings; - - private static final PagedListDescriptor - LIST_BATCHES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListBatchesRequest injectToken(ListBatchesRequest payload, String token) { - return ListBatchesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListBatchesRequest injectPageSize(ListBatchesRequest payload, int pageSize) { - return ListBatchesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListBatchesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListBatchesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListBatchesResponse payload) { - return payload.getBatchesList() == null - ? ImmutableList.of() - : payload.getBatchesList(); - } - }; - - private static final PagedListResponseFactory< - ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse> - LIST_BATCHES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListBatchesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_BATCHES_PAGE_STR_DESC, request, context); - return ListBatchesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createBatch. */ - public UnaryCallSettings createBatchSettings() { - return createBatchSettings; - } - - /** Returns the object with the settings used for calls to createBatch. */ - public OperationCallSettings - createBatchOperationSettings() { - return createBatchOperationSettings; - } - - /** Returns the object with the settings used for calls to getBatch. */ - public UnaryCallSettings getBatchSettings() { - return getBatchSettings; - } - - /** Returns the object with the settings used for calls to listBatches. */ - public PagedCallSettings - listBatchesSettings() { - return listBatchesSettings; - } - - /** Returns the object with the settings used for calls to deleteBatch. */ - public UnaryCallSettings deleteBatchSettings() { - return deleteBatchSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public BatchControllerStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcBatchControllerStub.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 "dataproc.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dataproc.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) - .setUseJwtAccessWithScope(true); - } - - /** 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(BatchControllerStubSettings.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 BatchControllerStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createBatchSettings = settingsBuilder.createBatchSettings().build(); - createBatchOperationSettings = settingsBuilder.createBatchOperationSettings().build(); - getBatchSettings = settingsBuilder.getBatchSettings().build(); - listBatchesSettings = settingsBuilder.listBatchesSettings().build(); - deleteBatchSettings = settingsBuilder.deleteBatchSettings().build(); - } - - /** Builder for BatchControllerStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createBatchSettings; - private final OperationCallSettings.Builder - createBatchOperationSettings; - private final UnaryCallSettings.Builder getBatchSettings; - private final PagedCallSettings.Builder< - ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse> - listBatchesSettings; - private final UnaryCallSettings.Builder deleteBatchSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_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().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createBatchSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createBatchOperationSettings = OperationCallSettings.newBuilder(); - getBatchSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listBatchesSettings = PagedCallSettings.newBuilder(LIST_BATCHES_PAGE_STR_FACT); - deleteBatchSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createBatchSettings, getBatchSettings, listBatchesSettings, deleteBatchSettings); - initDefaults(this); - } - - protected Builder(BatchControllerStubSettings settings) { - super(settings); - - createBatchSettings = settings.createBatchSettings.toBuilder(); - createBatchOperationSettings = settings.createBatchOperationSettings.toBuilder(); - getBatchSettings = settings.getBatchSettings.toBuilder(); - listBatchesSettings = settings.listBatchesSettings.toBuilder(); - deleteBatchSettings = settings.deleteBatchSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createBatchSettings, getBatchSettings, listBatchesSettings, deleteBatchSettings); - } - - 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 - .createBatchSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getBatchSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .listBatchesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteBatchSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createBatchOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Batch.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(BatchOperationMetadata.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; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createBatch. */ - public UnaryCallSettings.Builder createBatchSettings() { - return createBatchSettings; - } - - /** Returns the builder for the settings used for calls to createBatch. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createBatchOperationSettings() { - return createBatchOperationSettings; - } - - /** Returns the builder for the settings used for calls to getBatch. */ - public UnaryCallSettings.Builder getBatchSettings() { - return getBatchSettings; - } - - /** Returns the builder for the settings used for calls to listBatches. */ - public PagedCallSettings.Builder< - ListBatchesRequest, ListBatchesResponse, ListBatchesPagedResponse> - listBatchesSettings() { - return listBatchesSettings; - } - - /** Returns the builder for the settings used for calls to deleteBatch. */ - public UnaryCallSettings.Builder deleteBatchSettings() { - return deleteBatchSettings; - } - - @Override - public BatchControllerStubSettings build() throws IOException { - return new BatchControllerStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java deleted file mode 100644 index 2cae1ff5..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -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.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.CreateClusterRequest; -import com.google.cloud.dataproc.v1.DeleteClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterResults; -import com.google.cloud.dataproc.v1.GetClusterRequest; -import com.google.cloud.dataproc.v1.ListClustersRequest; -import com.google.cloud.dataproc.v1.ListClustersResponse; -import com.google.cloud.dataproc.v1.StartClusterRequest; -import com.google.cloud.dataproc.v1.StopClusterRequest; -import com.google.cloud.dataproc.v1.UpdateClusterRequest; -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 ClusterController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ClusterControllerStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public OperationCallable - createClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); - } - - public UnaryCallable createClusterCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); - } - - public OperationCallable - updateClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); - } - - public UnaryCallable updateClusterCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); - } - - public OperationCallable - stopClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: stopClusterOperationCallable()"); - } - - public UnaryCallable stopClusterCallable() { - throw new UnsupportedOperationException("Not implemented: stopClusterCallable()"); - } - - public OperationCallable - startClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: startClusterOperationCallable()"); - } - - public UnaryCallable startClusterCallable() { - throw new UnsupportedOperationException("Not implemented: startClusterCallable()"); - } - - public OperationCallable - deleteClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); - } - - public UnaryCallable deleteClusterCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); - } - - public UnaryCallable getClusterCallable() { - throw new UnsupportedOperationException("Not implemented: getClusterCallable()"); - } - - public UnaryCallable listClustersPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listClustersPagedCallable()"); - } - - public UnaryCallable listClustersCallable() { - throw new UnsupportedOperationException("Not implemented: listClustersCallable()"); - } - - public OperationCallable - diagnoseClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterOperationCallable()"); - } - - public UnaryCallable diagnoseClusterCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java deleted file mode 100644 index 48194eb4..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java +++ /dev/null @@ -1,816 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -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.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.CreateClusterRequest; -import com.google.cloud.dataproc.v1.DeleteClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterResults; -import com.google.cloud.dataproc.v1.GetClusterRequest; -import com.google.cloud.dataproc.v1.ListClustersRequest; -import com.google.cloud.dataproc.v1.ListClustersResponse; -import com.google.cloud.dataproc.v1.StartClusterRequest; -import com.google.cloud.dataproc.v1.StopClusterRequest; -import com.google.cloud.dataproc.v1.UpdateClusterRequest; -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 ClusterControllerStub}. - * - *

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

    - *
  • The default service address (dataproc.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 getCluster to 30 seconds: - * - *

{@code
- * ClusterControllerStubSettings.Builder clusterControllerSettingsBuilder =
- *     ClusterControllerStubSettings.newBuilder();
- * clusterControllerSettingsBuilder
- *     .getClusterSettings()
- *     .setRetrySettings(
- *         clusterControllerSettingsBuilder
- *             .getClusterSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ClusterControllerStubSettings clusterControllerSettings =
- *     clusterControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ClusterControllerStubSettings 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 UnaryCallSettings createClusterSettings; - private final OperationCallSettings - createClusterOperationSettings; - private final UnaryCallSettings updateClusterSettings; - private final OperationCallSettings - updateClusterOperationSettings; - private final UnaryCallSettings stopClusterSettings; - private final OperationCallSettings - stopClusterOperationSettings; - private final UnaryCallSettings startClusterSettings; - private final OperationCallSettings - startClusterOperationSettings; - private final UnaryCallSettings deleteClusterSettings; - private final OperationCallSettings - deleteClusterOperationSettings; - private final UnaryCallSettings getClusterSettings; - private final PagedCallSettings< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - private final UnaryCallSettings diagnoseClusterSettings; - private final OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings; - - private static final PagedListDescriptor - LIST_CLUSTERS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListClustersRequest injectToken(ListClustersRequest payload, String token) { - return ListClustersRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListClustersRequest injectPageSize(ListClustersRequest payload, int pageSize) { - return ListClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListClustersRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListClustersResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListClustersResponse payload) { - return payload.getClustersList() == null - ? ImmutableList.of() - : payload.getClustersList(); - } - }; - - private static final PagedListResponseFactory< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - LIST_CLUSTERS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListClustersRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_CLUSTERS_PAGE_STR_DESC, request, context); - return ListClustersPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createCluster. */ - public UnaryCallSettings createClusterSettings() { - return createClusterSettings; - } - - /** Returns the object with the settings used for calls to createCluster. */ - public OperationCallSettings - createClusterOperationSettings() { - return createClusterOperationSettings; - } - - /** Returns the object with the settings used for calls to updateCluster. */ - public UnaryCallSettings updateClusterSettings() { - return updateClusterSettings; - } - - /** Returns the object with the settings used for calls to updateCluster. */ - public OperationCallSettings - updateClusterOperationSettings() { - return updateClusterOperationSettings; - } - - /** Returns the object with the settings used for calls to stopCluster. */ - public UnaryCallSettings stopClusterSettings() { - return stopClusterSettings; - } - - /** Returns the object with the settings used for calls to stopCluster. */ - public OperationCallSettings - stopClusterOperationSettings() { - return stopClusterOperationSettings; - } - - /** Returns the object with the settings used for calls to startCluster. */ - public UnaryCallSettings startClusterSettings() { - return startClusterSettings; - } - - /** Returns the object with the settings used for calls to startCluster. */ - public OperationCallSettings - startClusterOperationSettings() { - return startClusterOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteCluster. */ - public UnaryCallSettings deleteClusterSettings() { - return deleteClusterSettings; - } - - /** Returns the object with the settings used for calls to deleteCluster. */ - public OperationCallSettings - deleteClusterOperationSettings() { - return deleteClusterOperationSettings; - } - - /** Returns the object with the settings used for calls to getCluster. */ - public UnaryCallSettings getClusterSettings() { - return getClusterSettings; - } - - /** Returns the object with the settings used for calls to listClusters. */ - public PagedCallSettings - listClustersSettings() { - return listClustersSettings; - } - - /** Returns the object with the settings used for calls to diagnoseCluster. */ - public UnaryCallSettings diagnoseClusterSettings() { - return diagnoseClusterSettings; - } - - /** Returns the object with the settings used for calls to diagnoseCluster. */ - public OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return diagnoseClusterOperationSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public ClusterControllerStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcClusterControllerStub.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 "dataproc.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dataproc.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) - .setUseJwtAccessWithScope(true); - } - - /** 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(ClusterControllerStubSettings.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 ClusterControllerStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createClusterSettings = settingsBuilder.createClusterSettings().build(); - createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); - updateClusterSettings = settingsBuilder.updateClusterSettings().build(); - updateClusterOperationSettings = settingsBuilder.updateClusterOperationSettings().build(); - stopClusterSettings = settingsBuilder.stopClusterSettings().build(); - stopClusterOperationSettings = settingsBuilder.stopClusterOperationSettings().build(); - startClusterSettings = settingsBuilder.startClusterSettings().build(); - startClusterOperationSettings = settingsBuilder.startClusterOperationSettings().build(); - deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); - deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); - getClusterSettings = settingsBuilder.getClusterSettings().build(); - listClustersSettings = settingsBuilder.listClustersSettings().build(); - diagnoseClusterSettings = settingsBuilder.diagnoseClusterSettings().build(); - diagnoseClusterOperationSettings = settingsBuilder.diagnoseClusterOperationSettings().build(); - } - - /** Builder for ClusterControllerStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createClusterSettings; - private final OperationCallSettings.Builder< - CreateClusterRequest, Cluster, ClusterOperationMetadata> - createClusterOperationSettings; - private final UnaryCallSettings.Builder updateClusterSettings; - private final OperationCallSettings.Builder< - UpdateClusterRequest, Cluster, ClusterOperationMetadata> - updateClusterOperationSettings; - private final UnaryCallSettings.Builder stopClusterSettings; - private final OperationCallSettings.Builder< - StopClusterRequest, Cluster, ClusterOperationMetadata> - stopClusterOperationSettings; - private final UnaryCallSettings.Builder startClusterSettings; - private final OperationCallSettings.Builder< - StartClusterRequest, Cluster, ClusterOperationMetadata> - startClusterOperationSettings; - private final UnaryCallSettings.Builder deleteClusterSettings; - private final OperationCallSettings.Builder< - DeleteClusterRequest, Empty, ClusterOperationMetadata> - deleteClusterOperationSettings; - private final UnaryCallSettings.Builder getClusterSettings; - private final PagedCallSettings.Builder< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - private final UnaryCallSettings.Builder - diagnoseClusterSettings; - private final OperationCallSettings.Builder< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_5_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_6_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createClusterOperationSettings = OperationCallSettings.newBuilder(); - updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateClusterOperationSettings = OperationCallSettings.newBuilder(); - stopClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - stopClusterOperationSettings = OperationCallSettings.newBuilder(); - startClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - startClusterOperationSettings = OperationCallSettings.newBuilder(); - deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteClusterOperationSettings = OperationCallSettings.newBuilder(); - getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); - diagnoseClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - diagnoseClusterOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - stopClusterSettings, - startClusterSettings, - deleteClusterSettings, - getClusterSettings, - listClustersSettings, - diagnoseClusterSettings); - initDefaults(this); - } - - protected Builder(ClusterControllerStubSettings settings) { - super(settings); - - createClusterSettings = settings.createClusterSettings.toBuilder(); - createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); - updateClusterSettings = settings.updateClusterSettings.toBuilder(); - updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); - stopClusterSettings = settings.stopClusterSettings.toBuilder(); - stopClusterOperationSettings = settings.stopClusterOperationSettings.toBuilder(); - startClusterSettings = settings.startClusterSettings.toBuilder(); - startClusterOperationSettings = settings.startClusterOperationSettings.toBuilder(); - deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); - deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); - getClusterSettings = settings.getClusterSettings.toBuilder(); - listClustersSettings = settings.listClustersSettings.toBuilder(); - diagnoseClusterSettings = settings.diagnoseClusterSettings.toBuilder(); - diagnoseClusterOperationSettings = settings.diagnoseClusterOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - stopClusterSettings, - startClusterSettings, - deleteClusterSettings, - getClusterSettings, - listClustersSettings, - diagnoseClusterSettings); - } - - 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 - .createClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .updateClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .stopClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .startClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .getClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .listClustersSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .diagnoseClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .createClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - - builder - .updateClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - - builder - .stopClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.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 - .startClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.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 - .deleteClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - - builder - .diagnoseClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(DiagnoseClusterResults.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ClusterOperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build())); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createCluster. */ - public UnaryCallSettings.Builder createClusterSettings() { - return createClusterSettings; - } - - /** Returns the builder for the settings used for calls to createCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createClusterOperationSettings() { - return createClusterOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateCluster. */ - public UnaryCallSettings.Builder updateClusterSettings() { - return updateClusterSettings; - } - - /** Returns the builder for the settings used for calls to updateCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateClusterOperationSettings() { - return updateClusterOperationSettings; - } - - /** Returns the builder for the settings used for calls to stopCluster. */ - public UnaryCallSettings.Builder stopClusterSettings() { - return stopClusterSettings; - } - - /** Returns the builder for the settings used for calls to stopCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - stopClusterOperationSettings() { - return stopClusterOperationSettings; - } - - /** Returns the builder for the settings used for calls to startCluster. */ - public UnaryCallSettings.Builder startClusterSettings() { - return startClusterSettings; - } - - /** Returns the builder for the settings used for calls to startCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - startClusterOperationSettings() { - return startClusterOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteCluster. */ - public UnaryCallSettings.Builder deleteClusterSettings() { - return deleteClusterSettings; - } - - /** Returns the builder for the settings used for calls to deleteCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteClusterOperationSettings() { - return deleteClusterOperationSettings; - } - - /** Returns the builder for the settings used for calls to getCluster. */ - public UnaryCallSettings.Builder getClusterSettings() { - return getClusterSettings; - } - - /** Returns the builder for the settings used for calls to listClusters. */ - public PagedCallSettings.Builder< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings() { - return listClustersSettings; - } - - /** Returns the builder for the settings used for calls to diagnoseCluster. */ - public UnaryCallSettings.Builder diagnoseClusterSettings() { - return diagnoseClusterSettings; - } - - /** Returns the builder for the settings used for calls to diagnoseCluster. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return diagnoseClusterOperationSettings; - } - - @Override - public ClusterControllerStubSettings build() throws IOException { - return new ClusterControllerStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceCallableFactory.java deleted file mode 100644 index 8bb76da3..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.dataproc.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 AutoscalingPolicyService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcAutoscalingPolicyServiceCallableFactory 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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java deleted file mode 100644 index 89dd2c65..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -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.UnaryCallable; -import com.google.cloud.dataproc.v1.AutoscalingPolicy; -import com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest; -import com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse; -import com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest; -import com.google.common.collect.ImmutableMap; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AutoscalingPolicyService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcAutoscalingPolicyServiceStub extends AutoscalingPolicyServiceStub { - private static final MethodDescriptor - createAutoscalingPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateAutoscalingPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateAutoscalingPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.AutoscalingPolicyService/UpdateAutoscalingPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateAutoscalingPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getAutoscalingPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.AutoscalingPolicyService/GetAutoscalingPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(GetAutoscalingPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse> - listAutoscalingPoliciesMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.AutoscalingPolicyService/ListAutoscalingPolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(ListAutoscalingPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListAutoscalingPoliciesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteAutoscalingPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.AutoscalingPolicyService/DeleteAutoscalingPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteAutoscalingPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable - createAutoscalingPolicyCallable; - private final UnaryCallable - updateAutoscalingPolicyCallable; - private final UnaryCallable - getAutoscalingPolicyCallable; - private final UnaryCallable - listAutoscalingPoliciesCallable; - private final UnaryCallable - listAutoscalingPoliciesPagedCallable; - private final UnaryCallable - deleteAutoscalingPolicyCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAutoscalingPolicyServiceStub create( - AutoscalingPolicyServiceStubSettings settings) throws IOException { - return new GrpcAutoscalingPolicyServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAutoscalingPolicyServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcAutoscalingPolicyServiceStub( - AutoscalingPolicyServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAutoscalingPolicyServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAutoscalingPolicyServiceStub( - AutoscalingPolicyServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAutoscalingPolicyServiceStub, 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 GrpcAutoscalingPolicyServiceStub( - AutoscalingPolicyServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAutoscalingPolicyServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAutoscalingPolicyServiceStub, 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 GrpcAutoscalingPolicyServiceStub( - AutoscalingPolicyServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - createAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("policy.name", String.valueOf(request.getPolicy().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - getAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listAutoscalingPoliciesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listAutoscalingPoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - deleteAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.createAutoscalingPolicyCallable = - callableFactory.createUnaryCallable( - createAutoscalingPolicyTransportSettings, - settings.createAutoscalingPolicySettings(), - clientContext); - this.updateAutoscalingPolicyCallable = - callableFactory.createUnaryCallable( - updateAutoscalingPolicyTransportSettings, - settings.updateAutoscalingPolicySettings(), - clientContext); - this.getAutoscalingPolicyCallable = - callableFactory.createUnaryCallable( - getAutoscalingPolicyTransportSettings, - settings.getAutoscalingPolicySettings(), - clientContext); - this.listAutoscalingPoliciesCallable = - callableFactory.createUnaryCallable( - listAutoscalingPoliciesTransportSettings, - settings.listAutoscalingPoliciesSettings(), - clientContext); - this.listAutoscalingPoliciesPagedCallable = - callableFactory.createPagedCallable( - listAutoscalingPoliciesTransportSettings, - settings.listAutoscalingPoliciesSettings(), - clientContext); - this.deleteAutoscalingPolicyCallable = - callableFactory.createUnaryCallable( - deleteAutoscalingPolicyTransportSettings, - settings.deleteAutoscalingPolicySettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - createAutoscalingPolicyCallable() { - return createAutoscalingPolicyCallable; - } - - @Override - public UnaryCallable - updateAutoscalingPolicyCallable() { - return updateAutoscalingPolicyCallable; - } - - @Override - public UnaryCallable - getAutoscalingPolicyCallable() { - return getAutoscalingPolicyCallable; - } - - @Override - public UnaryCallable - listAutoscalingPoliciesCallable() { - return listAutoscalingPoliciesCallable; - } - - @Override - public UnaryCallable - listAutoscalingPoliciesPagedCallable() { - return listAutoscalingPoliciesPagedCallable; - } - - @Override - public UnaryCallable deleteAutoscalingPolicyCallable() { - return deleteAutoscalingPolicyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerCallableFactory.java deleted file mode 100644 index 0a5ca6af..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.dataproc.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 BatchController service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcBatchControllerCallableFactory 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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerStub.java deleted file mode 100644 index c7b481b6..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcBatchControllerStub.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse; - -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.UnaryCallable; -import com.google.cloud.dataproc.v1.Batch; -import com.google.cloud.dataproc.v1.BatchOperationMetadata; -import com.google.cloud.dataproc.v1.CreateBatchRequest; -import com.google.cloud.dataproc.v1.DeleteBatchRequest; -import com.google.cloud.dataproc.v1.GetBatchRequest; -import com.google.cloud.dataproc.v1.ListBatchesRequest; -import com.google.cloud.dataproc.v1.ListBatchesResponse; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the BatchController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcBatchControllerStub extends BatchControllerStub { - private static final MethodDescriptor createBatchMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.BatchController/CreateBatch") - .setRequestMarshaller(ProtoUtils.marshaller(CreateBatchRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getBatchMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.BatchController/GetBatch") - .setRequestMarshaller(ProtoUtils.marshaller(GetBatchRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Batch.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listBatchesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.BatchController/ListBatches") - .setRequestMarshaller(ProtoUtils.marshaller(ListBatchesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListBatchesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteBatchMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.BatchController/DeleteBatch") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteBatchRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable createBatchCallable; - private final OperationCallable - createBatchOperationCallable; - private final UnaryCallable getBatchCallable; - private final UnaryCallable listBatchesCallable; - private final UnaryCallable - listBatchesPagedCallable; - private final UnaryCallable deleteBatchCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcBatchControllerStub create(BatchControllerStubSettings settings) - throws IOException { - return new GrpcBatchControllerStub(settings, ClientContext.create(settings)); - } - - public static final GrpcBatchControllerStub create(ClientContext clientContext) - throws IOException { - return new GrpcBatchControllerStub( - BatchControllerStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcBatchControllerStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcBatchControllerStub( - BatchControllerStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcBatchControllerStub, 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 GrpcBatchControllerStub( - BatchControllerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcBatchControllerCallableFactory()); - } - - /** - * Constructs an instance of GrpcBatchControllerStub, 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 GrpcBatchControllerStub( - BatchControllerStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createBatchTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createBatchMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getBatchTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getBatchMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listBatchesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listBatchesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteBatchTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteBatchMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.createBatchCallable = - callableFactory.createUnaryCallable( - createBatchTransportSettings, settings.createBatchSettings(), clientContext); - this.createBatchOperationCallable = - callableFactory.createOperationCallable( - createBatchTransportSettings, - settings.createBatchOperationSettings(), - clientContext, - operationsStub); - this.getBatchCallable = - callableFactory.createUnaryCallable( - getBatchTransportSettings, settings.getBatchSettings(), clientContext); - this.listBatchesCallable = - callableFactory.createUnaryCallable( - listBatchesTransportSettings, settings.listBatchesSettings(), clientContext); - this.listBatchesPagedCallable = - callableFactory.createPagedCallable( - listBatchesTransportSettings, settings.listBatchesSettings(), clientContext); - this.deleteBatchCallable = - callableFactory.createUnaryCallable( - deleteBatchTransportSettings, settings.deleteBatchSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createBatchCallable() { - return createBatchCallable; - } - - @Override - public OperationCallable - createBatchOperationCallable() { - return createBatchOperationCallable; - } - - @Override - public UnaryCallable getBatchCallable() { - return getBatchCallable; - } - - @Override - public UnaryCallable listBatchesCallable() { - return listBatchesCallable; - } - - @Override - public UnaryCallable listBatchesPagedCallable() { - return listBatchesPagedCallable; - } - - @Override - public UnaryCallable deleteBatchCallable() { - return deleteBatchCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerCallableFactory.java deleted file mode 100644 index 7e08bdaf..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.dataproc.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 ClusterController service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcClusterControllerCallableFactory 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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java deleted file mode 100644 index 7b9fb4cb..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java +++ /dev/null @@ -1,484 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -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.UnaryCallable; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.CreateClusterRequest; -import com.google.cloud.dataproc.v1.DeleteClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1.DiagnoseClusterResults; -import com.google.cloud.dataproc.v1.GetClusterRequest; -import com.google.cloud.dataproc.v1.ListClustersRequest; -import com.google.cloud.dataproc.v1.ListClustersResponse; -import com.google.cloud.dataproc.v1.StartClusterRequest; -import com.google.cloud.dataproc.v1.StopClusterRequest; -import com.google.cloud.dataproc.v1.UpdateClusterRequest; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ClusterController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcClusterControllerStub extends ClusterControllerStub { - private static final MethodDescriptor - createClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/CreateCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/UpdateCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor stopClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/StopCluster") - .setRequestMarshaller(ProtoUtils.marshaller(StopClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - startClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/StartCluster") - .setRequestMarshaller(ProtoUtils.marshaller(StartClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/DeleteCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/GetCluster") - .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listClustersMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/ListClusters") - .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - diagnoseClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.ClusterController/DiagnoseCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(DiagnoseClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable createClusterCallable; - private final OperationCallable - createClusterOperationCallable; - private final UnaryCallable updateClusterCallable; - private final OperationCallable - updateClusterOperationCallable; - private final UnaryCallable stopClusterCallable; - private final OperationCallable - stopClusterOperationCallable; - private final UnaryCallable startClusterCallable; - private final OperationCallable - startClusterOperationCallable; - private final UnaryCallable deleteClusterCallable; - private final OperationCallable - deleteClusterOperationCallable; - private final UnaryCallable getClusterCallable; - private final UnaryCallable listClustersCallable; - private final UnaryCallable - listClustersPagedCallable; - private final UnaryCallable diagnoseClusterCallable; - private final OperationCallable< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcClusterControllerStub create(ClusterControllerStubSettings settings) - throws IOException { - return new GrpcClusterControllerStub(settings, ClientContext.create(settings)); - } - - public static final GrpcClusterControllerStub create(ClientContext clientContext) - throws IOException { - return new GrpcClusterControllerStub( - ClusterControllerStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcClusterControllerStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcClusterControllerStub( - ClusterControllerStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcClusterControllerStub, 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 GrpcClusterControllerStub( - ClusterControllerStubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcClusterControllerCallableFactory()); - } - - /** - * Constructs an instance of GrpcClusterControllerStub, 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 GrpcClusterControllerStub( - ClusterControllerStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings updateClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings stopClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(stopClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings startClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(startClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings getClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings listClustersTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listClustersMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings diagnoseClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(diagnoseClusterMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("cluster_name", String.valueOf(request.getClusterName())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - - this.createClusterCallable = - callableFactory.createUnaryCallable( - createClusterTransportSettings, settings.createClusterSettings(), clientContext); - this.createClusterOperationCallable = - callableFactory.createOperationCallable( - createClusterTransportSettings, - settings.createClusterOperationSettings(), - clientContext, - operationsStub); - this.updateClusterCallable = - callableFactory.createUnaryCallable( - updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); - this.updateClusterOperationCallable = - callableFactory.createOperationCallable( - updateClusterTransportSettings, - settings.updateClusterOperationSettings(), - clientContext, - operationsStub); - this.stopClusterCallable = - callableFactory.createUnaryCallable( - stopClusterTransportSettings, settings.stopClusterSettings(), clientContext); - this.stopClusterOperationCallable = - callableFactory.createOperationCallable( - stopClusterTransportSettings, - settings.stopClusterOperationSettings(), - clientContext, - operationsStub); - this.startClusterCallable = - callableFactory.createUnaryCallable( - startClusterTransportSettings, settings.startClusterSettings(), clientContext); - this.startClusterOperationCallable = - callableFactory.createOperationCallable( - startClusterTransportSettings, - settings.startClusterOperationSettings(), - clientContext, - operationsStub); - this.deleteClusterCallable = - callableFactory.createUnaryCallable( - deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); - this.deleteClusterOperationCallable = - callableFactory.createOperationCallable( - deleteClusterTransportSettings, - settings.deleteClusterOperationSettings(), - clientContext, - operationsStub); - this.getClusterCallable = - callableFactory.createUnaryCallable( - getClusterTransportSettings, settings.getClusterSettings(), clientContext); - this.listClustersCallable = - callableFactory.createUnaryCallable( - listClustersTransportSettings, settings.listClustersSettings(), clientContext); - this.listClustersPagedCallable = - callableFactory.createPagedCallable( - listClustersTransportSettings, settings.listClustersSettings(), clientContext); - this.diagnoseClusterCallable = - callableFactory.createUnaryCallable( - diagnoseClusterTransportSettings, settings.diagnoseClusterSettings(), clientContext); - this.diagnoseClusterOperationCallable = - callableFactory.createOperationCallable( - diagnoseClusterTransportSettings, - settings.diagnoseClusterOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createClusterCallable() { - return createClusterCallable; - } - - @Override - public OperationCallable - createClusterOperationCallable() { - return createClusterOperationCallable; - } - - @Override - public UnaryCallable updateClusterCallable() { - return updateClusterCallable; - } - - @Override - public OperationCallable - updateClusterOperationCallable() { - return updateClusterOperationCallable; - } - - @Override - public UnaryCallable stopClusterCallable() { - return stopClusterCallable; - } - - @Override - public OperationCallable - stopClusterOperationCallable() { - return stopClusterOperationCallable; - } - - @Override - public UnaryCallable startClusterCallable() { - return startClusterCallable; - } - - @Override - public OperationCallable - startClusterOperationCallable() { - return startClusterOperationCallable; - } - - @Override - public UnaryCallable deleteClusterCallable() { - return deleteClusterCallable; - } - - @Override - public OperationCallable - deleteClusterOperationCallable() { - return deleteClusterOperationCallable; - } - - @Override - public UnaryCallable getClusterCallable() { - return getClusterCallable; - } - - @Override - public UnaryCallable listClustersCallable() { - return listClustersCallable; - } - - @Override - public UnaryCallable listClustersPagedCallable() { - return listClustersPagedCallable; - } - - @Override - public UnaryCallable diagnoseClusterCallable() { - return diagnoseClusterCallable; - } - - @Override - public OperationCallable - diagnoseClusterOperationCallable() { - return diagnoseClusterOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerCallableFactory.java deleted file mode 100644 index 6c20d95a..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.dataproc.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 JobController service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcJobControllerCallableFactory 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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java deleted file mode 100644 index 4eb3b09f..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -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.UnaryCallable; -import com.google.cloud.dataproc.v1.CancelJobRequest; -import com.google.cloud.dataproc.v1.DeleteJobRequest; -import com.google.cloud.dataproc.v1.GetJobRequest; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.ListJobsRequest; -import com.google.cloud.dataproc.v1.ListJobsResponse; -import com.google.cloud.dataproc.v1.SubmitJobRequest; -import com.google.cloud.dataproc.v1.UpdateJobRequest; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the JobController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcJobControllerStub extends JobControllerStub { - private static final MethodDescriptor submitJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/SubmitJob") - .setRequestMarshaller(ProtoUtils.marshaller(SubmitJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - submitJobAsOperationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/SubmitJobAsOperation") - .setRequestMarshaller(ProtoUtils.marshaller(SubmitJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/GetJob") - .setRequestMarshaller(ProtoUtils.marshaller(GetJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listJobsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/ListJobs") - .setRequestMarshaller(ProtoUtils.marshaller(ListJobsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListJobsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/UpdateJob") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) - .build(); - - private static final MethodDescriptor cancelJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/CancelJob") - .setRequestMarshaller(ProtoUtils.marshaller(CancelJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Job.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1.JobController/DeleteJob") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable submitJobCallable; - private final UnaryCallable submitJobAsOperationCallable; - private final OperationCallable - submitJobAsOperationOperationCallable; - private final UnaryCallable getJobCallable; - private final UnaryCallable listJobsCallable; - private final UnaryCallable listJobsPagedCallable; - private final UnaryCallable updateJobCallable; - private final UnaryCallable cancelJobCallable; - private final UnaryCallable deleteJobCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcJobControllerStub create(JobControllerStubSettings settings) - throws IOException { - return new GrpcJobControllerStub(settings, ClientContext.create(settings)); - } - - public static final GrpcJobControllerStub create(ClientContext clientContext) throws IOException { - return new GrpcJobControllerStub(JobControllerStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcJobControllerStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcJobControllerStub( - JobControllerStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcJobControllerStub, 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 GrpcJobControllerStub(JobControllerStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcJobControllerCallableFactory()); - } - - /** - * Constructs an instance of GrpcJobControllerStub, 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 GrpcJobControllerStub( - JobControllerStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings submitJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(submitJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings submitJobAsOperationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(submitJobAsOperationMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings getJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("job_id", String.valueOf(request.getJobId())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings listJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listJobsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings updateJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("job_id", String.valueOf(request.getJobId())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings cancelJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(cancelJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("job_id", String.valueOf(request.getJobId())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("job_id", String.valueOf(request.getJobId())); - params.put("project_id", String.valueOf(request.getProjectId())); - params.put("region", String.valueOf(request.getRegion())); - return params.build(); - }) - .build(); - - this.submitJobCallable = - callableFactory.createUnaryCallable( - submitJobTransportSettings, settings.submitJobSettings(), clientContext); - this.submitJobAsOperationCallable = - callableFactory.createUnaryCallable( - submitJobAsOperationTransportSettings, - settings.submitJobAsOperationSettings(), - clientContext); - this.submitJobAsOperationOperationCallable = - callableFactory.createOperationCallable( - submitJobAsOperationTransportSettings, - settings.submitJobAsOperationOperationSettings(), - clientContext, - operationsStub); - this.getJobCallable = - callableFactory.createUnaryCallable( - getJobTransportSettings, settings.getJobSettings(), clientContext); - this.listJobsCallable = - callableFactory.createUnaryCallable( - listJobsTransportSettings, settings.listJobsSettings(), clientContext); - this.listJobsPagedCallable = - callableFactory.createPagedCallable( - listJobsTransportSettings, settings.listJobsSettings(), clientContext); - this.updateJobCallable = - callableFactory.createUnaryCallable( - updateJobTransportSettings, settings.updateJobSettings(), clientContext); - this.cancelJobCallable = - callableFactory.createUnaryCallable( - cancelJobTransportSettings, settings.cancelJobSettings(), clientContext); - this.deleteJobCallable = - callableFactory.createUnaryCallable( - deleteJobTransportSettings, settings.deleteJobSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable submitJobCallable() { - return submitJobCallable; - } - - @Override - public UnaryCallable submitJobAsOperationCallable() { - return submitJobAsOperationCallable; - } - - @Override - public OperationCallable - submitJobAsOperationOperationCallable() { - return submitJobAsOperationOperationCallable; - } - - @Override - public UnaryCallable getJobCallable() { - return getJobCallable; - } - - @Override - public UnaryCallable listJobsCallable() { - return listJobsCallable; - } - - @Override - public UnaryCallable listJobsPagedCallable() { - return listJobsPagedCallable; - } - - @Override - public UnaryCallable updateJobCallable() { - return updateJobCallable; - } - - @Override - public UnaryCallable cancelJobCallable() { - return cancelJobCallable; - } - - @Override - public UnaryCallable deleteJobCallable() { - return deleteJobCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceCallableFactory.java deleted file mode 100644 index 5899556e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.dataproc.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 WorkflowTemplateService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcWorkflowTemplateServiceCallableFactory 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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java deleted file mode 100644 index 405a7863..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -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.UnaryCallable; -import com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.WorkflowMetadata; -import com.google.cloud.dataproc.v1.WorkflowTemplate; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the WorkflowTemplateService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcWorkflowTemplateServiceStub extends WorkflowTemplateServiceStub { - private static final MethodDescriptor - createWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/CreateWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(WorkflowTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/GetWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(GetWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(WorkflowTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - instantiateWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(InstantiateWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - instantiateInlineWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/InstantiateInlineWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller( - InstantiateInlineWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/UpdateWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(WorkflowTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listWorkflowTemplatesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/ListWorkflowTemplates") - .setRequestMarshaller( - ProtoUtils.marshaller(ListWorkflowTemplatesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListWorkflowTemplatesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1.WorkflowTemplateService/DeleteWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable - createWorkflowTemplateCallable; - private final UnaryCallable - getWorkflowTemplateCallable; - private final UnaryCallable - instantiateWorkflowTemplateCallable; - private final OperationCallable - instantiateWorkflowTemplateOperationCallable; - private final UnaryCallable - instantiateInlineWorkflowTemplateCallable; - private final OperationCallable - instantiateInlineWorkflowTemplateOperationCallable; - private final UnaryCallable - updateWorkflowTemplateCallable; - private final UnaryCallable - listWorkflowTemplatesCallable; - private final UnaryCallable - listWorkflowTemplatesPagedCallable; - private final UnaryCallable deleteWorkflowTemplateCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcWorkflowTemplateServiceStub create( - WorkflowTemplateServiceStubSettings settings) throws IOException { - return new GrpcWorkflowTemplateServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcWorkflowTemplateServiceStub create(ClientContext clientContext) - throws IOException { - return new GrpcWorkflowTemplateServiceStub( - WorkflowTemplateServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcWorkflowTemplateServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcWorkflowTemplateServiceStub( - WorkflowTemplateServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcWorkflowTemplateServiceStub, 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 GrpcWorkflowTemplateServiceStub( - WorkflowTemplateServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcWorkflowTemplateServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcWorkflowTemplateServiceStub, 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 GrpcWorkflowTemplateServiceStub( - WorkflowTemplateServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - createWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - getWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - instantiateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - instantiateInlineWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateInlineWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("template.name", String.valueOf(request.getTemplate().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listWorkflowTemplatesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listWorkflowTemplatesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.createWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - createWorkflowTemplateTransportSettings, - settings.createWorkflowTemplateSettings(), - clientContext); - this.getWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - getWorkflowTemplateTransportSettings, - settings.getWorkflowTemplateSettings(), - clientContext); - this.instantiateWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateSettings(), - clientContext); - this.instantiateWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateOperationSettings(), - clientContext, - operationsStub); - this.instantiateInlineWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateSettings(), - clientContext); - this.instantiateInlineWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateOperationSettings(), - clientContext, - operationsStub); - this.updateWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - updateWorkflowTemplateTransportSettings, - settings.updateWorkflowTemplateSettings(), - clientContext); - this.listWorkflowTemplatesCallable = - callableFactory.createUnaryCallable( - listWorkflowTemplatesTransportSettings, - settings.listWorkflowTemplatesSettings(), - clientContext); - this.listWorkflowTemplatesPagedCallable = - callableFactory.createPagedCallable( - listWorkflowTemplatesTransportSettings, - settings.listWorkflowTemplatesSettings(), - clientContext); - this.deleteWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - deleteWorkflowTemplateTransportSettings, - settings.deleteWorkflowTemplateSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - createWorkflowTemplateCallable() { - return createWorkflowTemplateCallable; - } - - @Override - public UnaryCallable getWorkflowTemplateCallable() { - return getWorkflowTemplateCallable; - } - - @Override - public UnaryCallable - instantiateWorkflowTemplateCallable() { - return instantiateWorkflowTemplateCallable; - } - - @Override - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - return instantiateWorkflowTemplateOperationCallable; - } - - @Override - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return instantiateInlineWorkflowTemplateCallable; - } - - @Override - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - return instantiateInlineWorkflowTemplateOperationCallable; - } - - @Override - public UnaryCallable - updateWorkflowTemplateCallable() { - return updateWorkflowTemplateCallable; - } - - @Override - public UnaryCallable - listWorkflowTemplatesCallable() { - return listWorkflowTemplatesCallable; - } - - @Override - public UnaryCallable - listWorkflowTemplatesPagedCallable() { - return listWorkflowTemplatesPagedCallable; - } - - @Override - public UnaryCallable deleteWorkflowTemplateCallable() { - return deleteWorkflowTemplateCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.java deleted file mode 100644 index d3613add..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -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.dataproc.v1.CancelJobRequest; -import com.google.cloud.dataproc.v1.DeleteJobRequest; -import com.google.cloud.dataproc.v1.GetJobRequest; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.ListJobsRequest; -import com.google.cloud.dataproc.v1.ListJobsResponse; -import com.google.cloud.dataproc.v1.SubmitJobRequest; -import com.google.cloud.dataproc.v1.UpdateJobRequest; -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 JobController service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class JobControllerStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public UnaryCallable submitJobCallable() { - throw new UnsupportedOperationException("Not implemented: submitJobCallable()"); - } - - public OperationCallable - submitJobAsOperationOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: submitJobAsOperationOperationCallable()"); - } - - public UnaryCallable submitJobAsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: submitJobAsOperationCallable()"); - } - - public UnaryCallable getJobCallable() { - throw new UnsupportedOperationException("Not implemented: getJobCallable()"); - } - - public UnaryCallable listJobsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listJobsPagedCallable()"); - } - - public UnaryCallable listJobsCallable() { - throw new UnsupportedOperationException("Not implemented: listJobsCallable()"); - } - - public UnaryCallable updateJobCallable() { - throw new UnsupportedOperationException("Not implemented: updateJobCallable()"); - } - - public UnaryCallable cancelJobCallable() { - throw new UnsupportedOperationException("Not implemented: cancelJobCallable()"); - } - - public UnaryCallable deleteJobCallable() { - throw new UnsupportedOperationException("Not implemented: deleteJobCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java deleted file mode 100644 index cf723d6c..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -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.dataproc.v1.CancelJobRequest; -import com.google.cloud.dataproc.v1.DeleteJobRequest; -import com.google.cloud.dataproc.v1.GetJobRequest; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.ListJobsRequest; -import com.google.cloud.dataproc.v1.ListJobsResponse; -import com.google.cloud.dataproc.v1.SubmitJobRequest; -import com.google.cloud.dataproc.v1.UpdateJobRequest; -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 JobControllerStub}. - * - *

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

    - *
  • The default service address (dataproc.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 submitJob to 30 seconds: - * - *

{@code
- * JobControllerStubSettings.Builder jobControllerSettingsBuilder =
- *     JobControllerStubSettings.newBuilder();
- * jobControllerSettingsBuilder
- *     .submitJobSettings()
- *     .setRetrySettings(
- *         jobControllerSettingsBuilder
- *             .submitJobSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * JobControllerStubSettings jobControllerSettings = jobControllerSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class JobControllerStubSettings 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 UnaryCallSettings submitJobSettings; - private final UnaryCallSettings submitJobAsOperationSettings; - private final OperationCallSettings - submitJobAsOperationOperationSettings; - private final UnaryCallSettings getJobSettings; - private final PagedCallSettings - listJobsSettings; - private final UnaryCallSettings updateJobSettings; - private final UnaryCallSettings cancelJobSettings; - private final UnaryCallSettings deleteJobSettings; - - private static final PagedListDescriptor - LIST_JOBS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListJobsRequest injectToken(ListJobsRequest payload, String token) { - return ListJobsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListJobsRequest injectPageSize(ListJobsRequest payload, int pageSize) { - return ListJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListJobsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListJobsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListJobsResponse payload) { - return payload.getJobsList() == null - ? ImmutableList.of() - : payload.getJobsList(); - } - }; - - private static final PagedListResponseFactory< - ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> - LIST_JOBS_PAGE_STR_FACT = - new PagedListResponseFactory() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListJobsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_JOBS_PAGE_STR_DESC, request, context); - return ListJobsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to submitJob. */ - public UnaryCallSettings submitJobSettings() { - return submitJobSettings; - } - - /** Returns the object with the settings used for calls to submitJobAs. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return submitJobAsOperationSettings; - } - - /** Returns the object with the settings used for calls to submitJobAsOperation. */ - public OperationCallSettings - submitJobAsOperationOperationSettings() { - return submitJobAsOperationOperationSettings; - } - - /** Returns the object with the settings used for calls to getJob. */ - public UnaryCallSettings getJobSettings() { - return getJobSettings; - } - - /** Returns the object with the settings used for calls to listJobs. */ - public PagedCallSettings - listJobsSettings() { - return listJobsSettings; - } - - /** Returns the object with the settings used for calls to updateJob. */ - public UnaryCallSettings updateJobSettings() { - return updateJobSettings; - } - - /** Returns the object with the settings used for calls to cancelJob. */ - public UnaryCallSettings cancelJobSettings() { - return cancelJobSettings; - } - - /** Returns the object with the settings used for calls to deleteJob. */ - public UnaryCallSettings deleteJobSettings() { - return deleteJobSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public JobControllerStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcJobControllerStub.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 "dataproc.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dataproc.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) - .setUseJwtAccessWithScope(true); - } - - /** 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(JobControllerStubSettings.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 JobControllerStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - submitJobSettings = settingsBuilder.submitJobSettings().build(); - submitJobAsOperationSettings = settingsBuilder.submitJobAsOperationSettings().build(); - submitJobAsOperationOperationSettings = - settingsBuilder.submitJobAsOperationOperationSettings().build(); - getJobSettings = settingsBuilder.getJobSettings().build(); - listJobsSettings = settingsBuilder.listJobsSettings().build(); - updateJobSettings = settingsBuilder.updateJobSettings().build(); - cancelJobSettings = settingsBuilder.cancelJobSettings().build(); - deleteJobSettings = settingsBuilder.deleteJobSettings().build(); - } - - /** Builder for JobControllerStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder submitJobSettings; - private final UnaryCallSettings.Builder - submitJobAsOperationSettings; - private final OperationCallSettings.Builder - submitJobAsOperationOperationSettings; - private final UnaryCallSettings.Builder getJobSettings; - private final PagedCallSettings.Builder< - ListJobsRequest, ListJobsResponse, ListJobsPagedResponse> - listJobsSettings; - private final UnaryCallSettings.Builder updateJobSettings; - private final UnaryCallSettings.Builder cancelJobSettings; - private final UnaryCallSettings.Builder deleteJobSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_7_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(900000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(900000L)) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build(); - definitions.put("retry_policy_7_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(900000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(900000L)) - .setTotalTimeout(Duration.ofMillis(900000L)) - .build(); - definitions.put("retry_policy_2_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - submitJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - submitJobAsOperationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - submitJobAsOperationOperationSettings = OperationCallSettings.newBuilder(); - getJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listJobsSettings = PagedCallSettings.newBuilder(LIST_JOBS_PAGE_STR_FACT); - updateJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - cancelJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - submitJobSettings, - submitJobAsOperationSettings, - getJobSettings, - listJobsSettings, - updateJobSettings, - cancelJobSettings, - deleteJobSettings); - initDefaults(this); - } - - protected Builder(JobControllerStubSettings settings) { - super(settings); - - submitJobSettings = settings.submitJobSettings.toBuilder(); - submitJobAsOperationSettings = settings.submitJobAsOperationSettings.toBuilder(); - submitJobAsOperationOperationSettings = - settings.submitJobAsOperationOperationSettings.toBuilder(); - getJobSettings = settings.getJobSettings.toBuilder(); - listJobsSettings = settings.listJobsSettings.toBuilder(); - updateJobSettings = settings.updateJobSettings.toBuilder(); - cancelJobSettings = settings.cancelJobSettings.toBuilder(); - deleteJobSettings = settings.deleteJobSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - submitJobSettings, - submitJobAsOperationSettings, - getJobSettings, - listJobsSettings, - updateJobSettings, - cancelJobSettings, - deleteJobSettings); - } - - 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 - .submitJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .submitJobAsOperationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .getJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .listJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .cancelJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .deleteJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .submitJobAsOperationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")) - .build()) - .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Job.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(JobMetadata.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; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return submitJobSettings; - } - - /** Returns the builder for the settings used for calls to submitJobAs. */ - public UnaryCallSettings.Builder submitJobAsOperationSettings() { - return submitJobAsOperationSettings; - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - submitJobAsOperationOperationSettings() { - return submitJobAsOperationOperationSettings; - } - - /** Returns the builder for the settings used for calls to getJob. */ - public UnaryCallSettings.Builder getJobSettings() { - return getJobSettings; - } - - /** Returns the builder for the settings used for calls to listJobs. */ - public PagedCallSettings.Builder - listJobsSettings() { - return listJobsSettings; - } - - /** Returns the builder for the settings used for calls to updateJob. */ - public UnaryCallSettings.Builder updateJobSettings() { - return updateJobSettings; - } - - /** Returns the builder for the settings used for calls to cancelJob. */ - public UnaryCallSettings.Builder cancelJobSettings() { - return cancelJobSettings; - } - - /** Returns the builder for the settings used for calls to deleteJob. */ - public UnaryCallSettings.Builder deleteJobSettings() { - return deleteJobSettings; - } - - @Override - public JobControllerStubSettings build() throws IOException { - return new JobControllerStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java deleted file mode 100644 index ea75946b..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -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.dataproc.v1.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.WorkflowMetadata; -import com.google.cloud.dataproc.v1.WorkflowTemplate; -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 WorkflowTemplateService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class WorkflowTemplateServiceStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public UnaryCallable - createWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowTemplateCallable()"); - } - - public UnaryCallable getWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: getWorkflowTemplateCallable()"); - } - - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateCallable()"); - } - - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateCallable()"); - } - - public UnaryCallable - updateWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: updateWorkflowTemplateCallable()"); - } - - public UnaryCallable - listWorkflowTemplatesPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listWorkflowTemplatesPagedCallable()"); - } - - public UnaryCallable - listWorkflowTemplatesCallable() { - throw new UnsupportedOperationException("Not implemented: listWorkflowTemplatesCallable()"); - } - - public UnaryCallable deleteWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: deleteWorkflowTemplateCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java deleted file mode 100644 index cc3a5f7e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java +++ /dev/null @@ -1,662 +0,0 @@ -/* - * 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.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -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.dataproc.v1.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1.WorkflowMetadata; -import com.google.cloud.dataproc.v1.WorkflowTemplate; -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 WorkflowTemplateServiceStub}. - * - *

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

    - *
  • The default service address (dataproc.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 createWorkflowTemplate to 30 seconds: - * - *

{@code
- * WorkflowTemplateServiceStubSettings.Builder workflowTemplateServiceSettingsBuilder =
- *     WorkflowTemplateServiceStubSettings.newBuilder();
- * workflowTemplateServiceSettingsBuilder
- *     .createWorkflowTemplateSettings()
- *     .setRetrySettings(
- *         workflowTemplateServiceSettingsBuilder
- *             .createWorkflowTemplateSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowTemplateServiceStubSettings workflowTemplateServiceSettings =
- *     workflowTemplateServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class WorkflowTemplateServiceStubSettings - 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 UnaryCallSettings - createWorkflowTemplateSettings; - private final UnaryCallSettings - getWorkflowTemplateSettings; - private final UnaryCallSettings - instantiateWorkflowTemplateSettings; - private final OperationCallSettings - instantiateWorkflowTemplateOperationSettings; - private final UnaryCallSettings - instantiateInlineWorkflowTemplateSettings; - private final OperationCallSettings< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings; - private final UnaryCallSettings - updateWorkflowTemplateSettings; - private final PagedCallSettings< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings; - private final UnaryCallSettings - deleteWorkflowTemplateSettings; - - private static final PagedListDescriptor< - ListWorkflowTemplatesRequest, ListWorkflowTemplatesResponse, WorkflowTemplate> - LIST_WORKFLOW_TEMPLATES_PAGE_STR_DESC = - new PagedListDescriptor< - ListWorkflowTemplatesRequest, ListWorkflowTemplatesResponse, WorkflowTemplate>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListWorkflowTemplatesRequest injectToken( - ListWorkflowTemplatesRequest payload, String token) { - return ListWorkflowTemplatesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListWorkflowTemplatesRequest injectPageSize( - ListWorkflowTemplatesRequest payload, int pageSize) { - return ListWorkflowTemplatesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListWorkflowTemplatesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListWorkflowTemplatesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListWorkflowTemplatesResponse payload) { - return payload.getTemplatesList() == null - ? ImmutableList.of() - : payload.getTemplatesList(); - } - }; - - private static final PagedListResponseFactory< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - LIST_WORKFLOW_TEMPLATES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListWorkflowTemplatesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListWorkflowTemplatesRequest, ListWorkflowTemplatesResponse, WorkflowTemplate> - pageContext = - PageContext.create( - callable, LIST_WORKFLOW_TEMPLATES_PAGE_STR_DESC, request, context); - return ListWorkflowTemplatesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to createWorkflowTemplate. */ - public UnaryCallSettings - createWorkflowTemplateSettings() { - return createWorkflowTemplateSettings; - } - - /** Returns the object with the settings used for calls to getWorkflowTemplate. */ - public UnaryCallSettings - getWorkflowTemplateSettings() { - return getWorkflowTemplateSettings; - } - - /** Returns the object with the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings - instantiateWorkflowTemplateSettings() { - return instantiateWorkflowTemplateSettings; - } - - /** Returns the object with the settings used for calls to instantiateWorkflowTemplate. */ - public OperationCallSettings - instantiateWorkflowTemplateOperationSettings() { - return instantiateWorkflowTemplateOperationSettings; - } - - /** Returns the object with the settings used for calls to instantiateInlineWorkflowTemplate. */ - public UnaryCallSettings - instantiateInlineWorkflowTemplateSettings() { - return instantiateInlineWorkflowTemplateSettings; - } - - /** Returns the object with the settings used for calls to instantiateInlineWorkflowTemplate. */ - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return instantiateInlineWorkflowTemplateOperationSettings; - } - - /** Returns the object with the settings used for calls to updateWorkflowTemplate. */ - public UnaryCallSettings - updateWorkflowTemplateSettings() { - return updateWorkflowTemplateSettings; - } - - /** Returns the object with the settings used for calls to listWorkflowTemplates. */ - public PagedCallSettings< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings() { - return listWorkflowTemplatesSettings; - } - - /** Returns the object with the settings used for calls to deleteWorkflowTemplate. */ - public UnaryCallSettings deleteWorkflowTemplateSettings() { - return deleteWorkflowTemplateSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public WorkflowTemplateServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcWorkflowTemplateServiceStub.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 "dataproc.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dataproc.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) - .setUseJwtAccessWithScope(true); - } - - /** 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(WorkflowTemplateServiceStubSettings.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 WorkflowTemplateServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createWorkflowTemplateSettings = settingsBuilder.createWorkflowTemplateSettings().build(); - getWorkflowTemplateSettings = settingsBuilder.getWorkflowTemplateSettings().build(); - instantiateWorkflowTemplateSettings = - settingsBuilder.instantiateWorkflowTemplateSettings().build(); - instantiateWorkflowTemplateOperationSettings = - settingsBuilder.instantiateWorkflowTemplateOperationSettings().build(); - instantiateInlineWorkflowTemplateSettings = - settingsBuilder.instantiateInlineWorkflowTemplateSettings().build(); - instantiateInlineWorkflowTemplateOperationSettings = - settingsBuilder.instantiateInlineWorkflowTemplateOperationSettings().build(); - updateWorkflowTemplateSettings = settingsBuilder.updateWorkflowTemplateSettings().build(); - listWorkflowTemplatesSettings = settingsBuilder.listWorkflowTemplatesSettings().build(); - deleteWorkflowTemplateSettings = settingsBuilder.deleteWorkflowTemplateSettings().build(); - } - - /** Builder for WorkflowTemplateServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - createWorkflowTemplateSettings; - private final UnaryCallSettings.Builder - getWorkflowTemplateSettings; - private final UnaryCallSettings.Builder - instantiateWorkflowTemplateSettings; - private final OperationCallSettings.Builder< - InstantiateWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateWorkflowTemplateOperationSettings; - private final UnaryCallSettings.Builder - instantiateInlineWorkflowTemplateSettings; - private final OperationCallSettings.Builder< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings; - private final UnaryCallSettings.Builder - updateWorkflowTemplateSettings; - private final PagedCallSettings.Builder< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings; - private final UnaryCallSettings.Builder - deleteWorkflowTemplateSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_4_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_3_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_4_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - instantiateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - instantiateWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - instantiateInlineWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - instantiateInlineWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - updateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listWorkflowTemplatesSettings = - PagedCallSettings.newBuilder(LIST_WORKFLOW_TEMPLATES_PAGE_STR_FACT); - deleteWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - initDefaults(this); - } - - protected Builder(WorkflowTemplateServiceStubSettings settings) { - super(settings); - - createWorkflowTemplateSettings = settings.createWorkflowTemplateSettings.toBuilder(); - getWorkflowTemplateSettings = settings.getWorkflowTemplateSettings.toBuilder(); - instantiateWorkflowTemplateSettings = - settings.instantiateWorkflowTemplateSettings.toBuilder(); - instantiateWorkflowTemplateOperationSettings = - settings.instantiateWorkflowTemplateOperationSettings.toBuilder(); - instantiateInlineWorkflowTemplateSettings = - settings.instantiateInlineWorkflowTemplateSettings.toBuilder(); - instantiateInlineWorkflowTemplateOperationSettings = - settings.instantiateInlineWorkflowTemplateOperationSettings.toBuilder(); - updateWorkflowTemplateSettings = settings.updateWorkflowTemplateSettings.toBuilder(); - listWorkflowTemplatesSettings = settings.listWorkflowTemplatesSettings.toBuilder(); - deleteWorkflowTemplateSettings = settings.deleteWorkflowTemplateSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - } - - 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 - .createWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .getWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .instantiateWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .instantiateInlineWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .updateWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .listWorkflowTemplatesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .deleteWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .instantiateWorkflowTemplateOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(WorkflowMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(43200000L)) - .build())); - - builder - .instantiateInlineWorkflowTemplateOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(WorkflowMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(10000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(43200000L)) - .build())); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createWorkflowTemplate. */ - public UnaryCallSettings.Builder - createWorkflowTemplateSettings() { - return createWorkflowTemplateSettings; - } - - /** Returns the builder for the settings used for calls to getWorkflowTemplate. */ - public UnaryCallSettings.Builder - getWorkflowTemplateSettings() { - return getWorkflowTemplateSettings; - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateWorkflowTemplateSettings() { - return instantiateWorkflowTemplateSettings; - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - InstantiateWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateWorkflowTemplateOperationSettings() { - return instantiateWorkflowTemplateOperationSettings; - } - - /** Returns the builder for the settings used for calls to instantiateInlineWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateInlineWorkflowTemplateSettings() { - return instantiateInlineWorkflowTemplateSettings; - } - - /** Returns the builder for the settings used for calls to instantiateInlineWorkflowTemplate. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings() { - return instantiateInlineWorkflowTemplateOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateWorkflowTemplate. */ - public UnaryCallSettings.Builder - updateWorkflowTemplateSettings() { - return updateWorkflowTemplateSettings; - } - - /** Returns the builder for the settings used for calls to listWorkflowTemplates. */ - public PagedCallSettings.Builder< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings() { - return listWorkflowTemplatesSettings; - } - - /** Returns the builder for the settings used for calls to deleteWorkflowTemplate. */ - public UnaryCallSettings.Builder - deleteWorkflowTemplateSettings() { - return deleteWorkflowTemplateSettings; - } - - @Override - public WorkflowTemplateServiceStubSettings build() throws IOException { - return new WorkflowTemplateServiceStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java deleted file mode 100644 index 000fcdf6..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -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.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -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 AutoscalingPolicyServiceClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AutoscalingPolicyServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockAutoscalingPolicyService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AutoscalingPolicyServiceSettings settings = - AutoscalingPolicyServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AutoscalingPolicyServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createAutoscalingPolicyTest() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - - AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateAutoscalingPolicyRequest actualRequest = - ((CreateAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - client.createAutoscalingPolicy(parent, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAutoscalingPolicyTest2() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - - AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateAutoscalingPolicyRequest actualRequest = - ((CreateAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAutoscalingPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - client.createAutoscalingPolicy(parent, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAutoscalingPolicyTest3() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - - AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateAutoscalingPolicyRequest actualRequest = - ((CreateAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAutoscalingPolicyExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - String parent = "parent-995424086"; - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - client.createAutoscalingPolicy(parent, policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateAutoscalingPolicyTest() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - - AutoscalingPolicy actualResponse = client.updateAutoscalingPolicy(policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateAutoscalingPolicyRequest actualRequest = - ((UpdateAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); - client.updateAutoscalingPolicy(policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAutoscalingPolicyTest() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - - AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAutoscalingPolicyRequest actualRequest = - ((GetAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - client.getAutoscalingPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAutoscalingPolicyTest2() throws Exception { - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder() - .setId("id3355") - .setName( - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]") - .toString()) - .setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - String name = "name3373707"; - - AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAutoscalingPolicyRequest actualRequest = - ((GetAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAutoscalingPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - String name = "name3373707"; - client.getAutoscalingPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAutoscalingPoliciesTest() throws Exception { - AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build(); - ListAutoscalingPoliciesResponse expectedResponse = - ListAutoscalingPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllPolicies(Arrays.asList(responsesElement)) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAutoscalingPoliciesRequest actualRequest = - ((ListAutoscalingPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAutoscalingPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listAutoscalingPolicies(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAutoscalingPoliciesTest2() throws Exception { - AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build(); - ListAutoscalingPoliciesResponse expectedResponse = - ListAutoscalingPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllPolicies(Arrays.asList(responsesElement)) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - - ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAutoscalingPoliciesRequest actualRequest = - ((ListAutoscalingPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAutoscalingPoliciesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - client.listAutoscalingPolicies(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAutoscalingPoliciesTest3() throws Exception { - AutoscalingPolicy responsesElement = AutoscalingPolicy.newBuilder().build(); - ListAutoscalingPoliciesResponse expectedResponse = - ListAutoscalingPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllPolicies(Arrays.asList(responsesElement)) - .build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAutoscalingPoliciesRequest actualRequest = - ((ListAutoscalingPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAutoscalingPoliciesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listAutoscalingPolicies(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAutoscalingPolicyTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - - client.deleteAutoscalingPolicy(name); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteAutoscalingPolicyRequest actualRequest = - ((DeleteAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - client.deleteAutoscalingPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAutoscalingPolicyTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAutoscalingPolicyService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteAutoscalingPolicy(name); - - List actualRequests = mockAutoscalingPolicyService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteAutoscalingPolicyRequest actualRequest = - ((DeleteAutoscalingPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAutoscalingPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAutoscalingPolicyService.addException(exception); - - try { - String name = "name3373707"; - client.deleteAutoscalingPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/BatchControllerClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/BatchControllerClientTest.java deleted file mode 100644 index e8825b6f..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/BatchControllerClientTest.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.BatchControllerClient.ListBatchesPagedResponse; - -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.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 BatchControllerClientTest { - private static MockBatchController mockBatchController; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private BatchControllerClient client; - - @BeforeClass - public static void startStaticServer() { - mockBatchController = new MockBatchController(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockBatchController)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - BatchControllerSettings settings = - BatchControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = BatchControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createBatchTest() throws Exception { - Batch expectedResponse = - Batch.newBuilder() - .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString()) - .setUuid("uuid3601339") - .setCreateTime(Timestamp.newBuilder().build()) - .setRuntimeInfo(RuntimeInfo.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setStateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .putAllLabels(new HashMap()) - .setRuntimeConfig(RuntimeConfig.newBuilder().build()) - .setEnvironmentConfig(EnvironmentConfig.newBuilder().build()) - .setOperation("operation1662702951") - .addAllStateHistory(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBatchTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockBatchController.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Batch batch = Batch.newBuilder().build(); - String batchId = "batchId-331744779"; - - Batch actualResponse = client.createBatchAsync(parent, batch, batchId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBatchRequest actualRequest = ((CreateBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(batch, actualRequest.getBatch()); - Assert.assertEquals(batchId, actualRequest.getBatchId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBatchExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Batch batch = Batch.newBuilder().build(); - String batchId = "batchId-331744779"; - client.createBatchAsync(parent, batch, batchId).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 createBatchTest2() throws Exception { - Batch expectedResponse = - Batch.newBuilder() - .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString()) - .setUuid("uuid3601339") - .setCreateTime(Timestamp.newBuilder().build()) - .setRuntimeInfo(RuntimeInfo.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setStateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .putAllLabels(new HashMap()) - .setRuntimeConfig(RuntimeConfig.newBuilder().build()) - .setEnvironmentConfig(EnvironmentConfig.newBuilder().build()) - .setOperation("operation1662702951") - .addAllStateHistory(new ArrayList()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createBatchTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockBatchController.addResponse(resultOperation); - - String parent = "parent-995424086"; - Batch batch = Batch.newBuilder().build(); - String batchId = "batchId-331744779"; - - Batch actualResponse = client.createBatchAsync(parent, batch, batchId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateBatchRequest actualRequest = ((CreateBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(batch, actualRequest.getBatch()); - Assert.assertEquals(batchId, actualRequest.getBatchId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createBatchExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - String parent = "parent-995424086"; - Batch batch = Batch.newBuilder().build(); - String batchId = "batchId-331744779"; - client.createBatchAsync(parent, batch, batchId).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 getBatchTest() throws Exception { - Batch expectedResponse = - Batch.newBuilder() - .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString()) - .setUuid("uuid3601339") - .setCreateTime(Timestamp.newBuilder().build()) - .setRuntimeInfo(RuntimeInfo.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setStateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .putAllLabels(new HashMap()) - .setRuntimeConfig(RuntimeConfig.newBuilder().build()) - .setEnvironmentConfig(EnvironmentConfig.newBuilder().build()) - .setOperation("operation1662702951") - .addAllStateHistory(new ArrayList()) - .build(); - mockBatchController.addResponse(expectedResponse); - - BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]"); - - Batch actualResponse = client.getBatch(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBatchRequest actualRequest = ((GetBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBatchExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]"); - client.getBatch(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getBatchTest2() throws Exception { - Batch expectedResponse = - Batch.newBuilder() - .setName(BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]").toString()) - .setUuid("uuid3601339") - .setCreateTime(Timestamp.newBuilder().build()) - .setRuntimeInfo(RuntimeInfo.newBuilder().build()) - .setStateMessage("stateMessage1128185398") - .setStateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .putAllLabels(new HashMap()) - .setRuntimeConfig(RuntimeConfig.newBuilder().build()) - .setEnvironmentConfig(EnvironmentConfig.newBuilder().build()) - .setOperation("operation1662702951") - .addAllStateHistory(new ArrayList()) - .build(); - mockBatchController.addResponse(expectedResponse); - - String name = "name3373707"; - - Batch actualResponse = client.getBatch(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetBatchRequest actualRequest = ((GetBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getBatchExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - String name = "name3373707"; - client.getBatch(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBatchesTest() throws Exception { - Batch responsesElement = Batch.newBuilder().build(); - ListBatchesResponse expectedResponse = - ListBatchesResponse.newBuilder() - .setNextPageToken("") - .addAllBatches(Arrays.asList(responsesElement)) - .build(); - mockBatchController.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListBatchesPagedResponse pagedListResponse = client.listBatches(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBatchesList().get(0), resources.get(0)); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBatchesRequest actualRequest = ((ListBatchesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBatchesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listBatches(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listBatchesTest2() throws Exception { - Batch responsesElement = Batch.newBuilder().build(); - ListBatchesResponse expectedResponse = - ListBatchesResponse.newBuilder() - .setNextPageToken("") - .addAllBatches(Arrays.asList(responsesElement)) - .build(); - mockBatchController.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListBatchesPagedResponse pagedListResponse = client.listBatches(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getBatchesList().get(0), resources.get(0)); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListBatchesRequest actualRequest = ((ListBatchesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listBatchesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - String parent = "parent-995424086"; - client.listBatches(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBatchTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBatchController.addResponse(expectedResponse); - - BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]"); - - client.deleteBatch(name); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBatchRequest actualRequest = ((DeleteBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBatchExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]"); - client.deleteBatch(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteBatchTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBatchController.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteBatch(name); - - List actualRequests = mockBatchController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteBatchRequest actualRequest = ((DeleteBatchRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteBatchExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBatchController.addException(exception); - - try { - String name = "name3373707"; - client.deleteBatch(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java deleted file mode 100644 index b84fc4e3..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java +++ /dev/null @@ -1,607 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -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 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 ClusterControllerClientTest { - private static MockClusterController mockClusterController; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private ClusterControllerClient client; - - @BeforeClass - public static void startStaticServer() { - mockClusterController = new MockClusterController(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockClusterController)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ClusterControllerSettings settings = - ClusterControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ClusterControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createClusterTest() throws Exception { - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId("projectId-894832108") - .setClusterName("clusterName-1141738587") - .setConfig(ClusterConfig.newBuilder().build()) - .setVirtualClusterConfig(VirtualClusterConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .setStatus(ClusterStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .setClusterUuid("clusterUuid-1141510955") - .setMetrics(ClusterMetrics.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Cluster cluster = Cluster.newBuilder().build(); - - Cluster actualResponse = client.createClusterAsync(projectId, region, cluster).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(cluster, actualRequest.getCluster()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Cluster cluster = Cluster.newBuilder().build(); - client.createClusterAsync(projectId, region, cluster).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 updateClusterTest() throws Exception { - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId("projectId-894832108") - .setClusterName("clusterName-1141738587") - .setConfig(ClusterConfig.newBuilder().build()) - .setVirtualClusterConfig(VirtualClusterConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .setStatus(ClusterStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .setClusterUuid("clusterUuid-1141510955") - .setMetrics(ClusterMetrics.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - Cluster cluster = Cluster.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Cluster actualResponse = - client.updateClusterAsync(projectId, region, clusterName, cluster, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateClusterRequest actualRequest = ((UpdateClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(clusterName, actualRequest.getClusterName()); - Assert.assertEquals(cluster, actualRequest.getCluster()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - Cluster cluster = Cluster.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateClusterAsync(projectId, region, clusterName, cluster, 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 stopClusterTest() throws Exception { - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId("projectId-894832108") - .setClusterName("clusterName-1141738587") - .setConfig(ClusterConfig.newBuilder().build()) - .setVirtualClusterConfig(VirtualClusterConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .setStatus(ClusterStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .setClusterUuid("clusterUuid-1141510955") - .setMetrics(ClusterMetrics.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("stopClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - StopClusterRequest request = - StopClusterRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setClusterName("clusterName-1141738587") - .setClusterUuid("clusterUuid-1141510955") - .setRequestId("requestId693933066") - .build(); - - Cluster actualResponse = client.stopClusterAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StopClusterRequest actualRequest = ((StopClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); - Assert.assertEquals(request.getRegion(), actualRequest.getRegion()); - Assert.assertEquals(request.getClusterName(), actualRequest.getClusterName()); - Assert.assertEquals(request.getClusterUuid(), actualRequest.getClusterUuid()); - Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void stopClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - StopClusterRequest request = - StopClusterRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setClusterName("clusterName-1141738587") - .setClusterUuid("clusterUuid-1141510955") - .setRequestId("requestId693933066") - .build(); - client.stopClusterAsync(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 startClusterTest() throws Exception { - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId("projectId-894832108") - .setClusterName("clusterName-1141738587") - .setConfig(ClusterConfig.newBuilder().build()) - .setVirtualClusterConfig(VirtualClusterConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .setStatus(ClusterStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .setClusterUuid("clusterUuid-1141510955") - .setMetrics(ClusterMetrics.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("startClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - StartClusterRequest request = - StartClusterRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setClusterName("clusterName-1141738587") - .setClusterUuid("clusterUuid-1141510955") - .setRequestId("requestId693933066") - .build(); - - Cluster actualResponse = client.startClusterAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - StartClusterRequest actualRequest = ((StartClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); - Assert.assertEquals(request.getRegion(), actualRequest.getRegion()); - Assert.assertEquals(request.getClusterName(), actualRequest.getClusterName()); - Assert.assertEquals(request.getClusterUuid(), actualRequest.getClusterUuid()); - Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void startClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - StartClusterRequest request = - StartClusterRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setClusterName("clusterName-1141738587") - .setClusterUuid("clusterUuid-1141510955") - .setRequestId("requestId693933066") - .build(); - client.startClusterAsync(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 deleteClusterTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - - client.deleteClusterAsync(projectId, region, clusterName).get(); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(clusterName, actualRequest.getClusterName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - client.deleteClusterAsync(projectId, region, clusterName).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 getClusterTest() throws Exception { - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId("projectId-894832108") - .setClusterName("clusterName-1141738587") - .setConfig(ClusterConfig.newBuilder().build()) - .setVirtualClusterConfig(VirtualClusterConfig.newBuilder().build()) - .putAllLabels(new HashMap()) - .setStatus(ClusterStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .setClusterUuid("clusterUuid-1141510955") - .setMetrics(ClusterMetrics.newBuilder().build()) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - - Cluster actualResponse = client.getCluster(projectId, region, clusterName); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(clusterName, actualRequest.getClusterName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - client.getCluster(projectId, region, clusterName); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listClustersTest() throws Exception { - Cluster responsesElement = Cluster.newBuilder().build(); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken("") - .addAllClusters(Arrays.asList(responsesElement)) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - - ListClustersPagedResponse pagedListResponse = client.listClusters(projectId, region); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listClustersExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - client.listClusters(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listClustersTest2() throws Exception { - Cluster responsesElement = Cluster.newBuilder().build(); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken("") - .addAllClusters(Arrays.asList(responsesElement)) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String filter = "filter-1274492040"; - - ListClustersPagedResponse pagedListResponse = client.listClusters(projectId, region, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listClustersExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String filter = "filter-1274492040"; - client.listClusters(projectId, region, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void diagnoseClusterTest() throws Exception { - DiagnoseClusterResults expectedResponse = - DiagnoseClusterResults.newBuilder().setOutputUri("outputUri-2119300949").build(); - Operation resultOperation = - Operation.newBuilder() - .setName("diagnoseClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - - DiagnoseClusterResults actualResponse = - client.diagnoseClusterAsync(projectId, region, clusterName).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockClusterController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DiagnoseClusterRequest actualRequest = ((DiagnoseClusterRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(clusterName, actualRequest.getClusterName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void diagnoseClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String clusterName = "clusterName-1141738587"; - client.diagnoseClusterAsync(projectId, region, clusterName).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-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java deleted file mode 100644 index b2307912..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java +++ /dev/null @@ -1,515 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -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 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 JobControllerClientTest { - private static MockJobController mockJobController; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private JobControllerClient client; - - @BeforeClass - public static void startStaticServer() { - mockJobController = new MockJobController(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockJobController)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - JobControllerSettings settings = - JobControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = JobControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void submitJobTest() throws Exception { - Job expectedResponse = - Job.newBuilder() - .setReference(JobReference.newBuilder().build()) - .setPlacement(JobPlacement.newBuilder().build()) - .setStatus(JobStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .addAllYarnApplications(new ArrayList()) - .setDriverOutputResourceUri("driverOutputResourceUri794556277") - .setDriverControlFilesUri("driverControlFilesUri1491948202") - .putAllLabels(new HashMap()) - .setScheduling(JobScheduling.newBuilder().build()) - .setJobUuid("jobUuid-1437868776") - .setDone(true) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Job job = Job.newBuilder().build(); - - Job actualResponse = client.submitJob(projectId, region, job); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SubmitJobRequest actualRequest = ((SubmitJobRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(job, actualRequest.getJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void submitJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Job job = Job.newBuilder().build(); - client.submitJob(projectId, region, job); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void submitJobAsOperationTest() throws Exception { - Job expectedResponse = - Job.newBuilder() - .setReference(JobReference.newBuilder().build()) - .setPlacement(JobPlacement.newBuilder().build()) - .setStatus(JobStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .addAllYarnApplications(new ArrayList()) - .setDriverOutputResourceUri("driverOutputResourceUri794556277") - .setDriverControlFilesUri("driverControlFilesUri1491948202") - .putAllLabels(new HashMap()) - .setScheduling(JobScheduling.newBuilder().build()) - .setJobUuid("jobUuid-1437868776") - .setDone(true) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("submitJobAsOperationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockJobController.addResponse(resultOperation); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Job job = Job.newBuilder().build(); - - Job actualResponse = client.submitJobAsOperationAsync(projectId, region, job).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SubmitJobRequest actualRequest = ((SubmitJobRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(job, actualRequest.getJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void submitJobAsOperationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - Job job = Job.newBuilder().build(); - client.submitJobAsOperationAsync(projectId, region, job).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 getJobTest() throws Exception { - Job expectedResponse = - Job.newBuilder() - .setReference(JobReference.newBuilder().build()) - .setPlacement(JobPlacement.newBuilder().build()) - .setStatus(JobStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .addAllYarnApplications(new ArrayList()) - .setDriverOutputResourceUri("driverOutputResourceUri794556277") - .setDriverControlFilesUri("driverControlFilesUri1491948202") - .putAllLabels(new HashMap()) - .setScheduling(JobScheduling.newBuilder().build()) - .setJobUuid("jobUuid-1437868776") - .setDone(true) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - - Job actualResponse = client.getJob(projectId, region, jobId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetJobRequest actualRequest = ((GetJobRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(jobId, actualRequest.getJobId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - client.getJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobsTest() throws Exception { - Job responsesElement = Job.newBuilder().build(); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - - ListJobsPagedResponse pagedListResponse = client.listJobs(projectId, region); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListJobsRequest actualRequest = ((ListJobsRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - client.listJobs(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobsTest2() throws Exception { - Job responsesElement = Job.newBuilder().build(); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String filter = "filter-1274492040"; - - ListJobsPagedResponse pagedListResponse = client.listJobs(projectId, region, filter); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListJobsRequest actualRequest = ((ListJobsRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(filter, actualRequest.getFilter()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listJobsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String filter = "filter-1274492040"; - client.listJobs(projectId, region, filter); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateJobTest() throws Exception { - Job expectedResponse = - Job.newBuilder() - .setReference(JobReference.newBuilder().build()) - .setPlacement(JobPlacement.newBuilder().build()) - .setStatus(JobStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .addAllYarnApplications(new ArrayList()) - .setDriverOutputResourceUri("driverOutputResourceUri794556277") - .setDriverControlFilesUri("driverControlFilesUri1491948202") - .putAllLabels(new HashMap()) - .setScheduling(JobScheduling.newBuilder().build()) - .setJobUuid("jobUuid-1437868776") - .setDone(true) - .build(); - mockJobController.addResponse(expectedResponse); - - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setJobId("jobId101296568") - .setJob(Job.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - - Job actualResponse = client.updateJob(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateJobRequest actualRequest = ((UpdateJobRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); - Assert.assertEquals(request.getRegion(), actualRequest.getRegion()); - Assert.assertEquals(request.getJobId(), actualRequest.getJobId()); - Assert.assertEquals(request.getJob(), actualRequest.getJob()); - Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId("projectId-894832108") - .setRegion("region-934795532") - .setJobId("jobId101296568") - .setJob(Job.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - client.updateJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void cancelJobTest() throws Exception { - Job expectedResponse = - Job.newBuilder() - .setReference(JobReference.newBuilder().build()) - .setPlacement(JobPlacement.newBuilder().build()) - .setStatus(JobStatus.newBuilder().build()) - .addAllStatusHistory(new ArrayList()) - .addAllYarnApplications(new ArrayList()) - .setDriverOutputResourceUri("driverOutputResourceUri794556277") - .setDriverControlFilesUri("driverControlFilesUri1491948202") - .putAllLabels(new HashMap()) - .setScheduling(JobScheduling.newBuilder().build()) - .setJobUuid("jobUuid-1437868776") - .setDone(true) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - - Job actualResponse = client.cancelJob(projectId, region, jobId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CancelJobRequest actualRequest = ((CancelJobRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(jobId, actualRequest.getJobId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void cancelJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - client.cancelJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - - client.deleteJob(projectId, region, jobId); - - List actualRequests = mockJobController.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteJobRequest actualRequest = ((DeleteJobRequest) actualRequests.get(0)); - - Assert.assertEquals(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(jobId, actualRequest.getJobId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-894832108"; - String region = "region-934795532"; - String jobId = "jobId101296568"; - client.deleteJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyService.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyService.java deleted file mode 100644 index fbceec8b..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.dataproc.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 MockAutoscalingPolicyService implements MockGrpcService { - private final MockAutoscalingPolicyServiceImpl serviceImpl; - - public MockAutoscalingPolicyService() { - serviceImpl = new MockAutoscalingPolicyServiceImpl(); - } - - @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-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyServiceImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyServiceImpl.java deleted file mode 100644 index 78357cb9..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyServiceImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1.AutoscalingPolicyServiceGrpc.AutoscalingPolicyServiceImplBase; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -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 MockAutoscalingPolicyServiceImpl extends AutoscalingPolicyServiceImplBase { - private List requests; - private Queue responses; - - public MockAutoscalingPolicyServiceImpl() { - 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 createAutoscalingPolicy( - CreateAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AutoscalingPolicy) { - requests.add(request); - responseObserver.onNext(((AutoscalingPolicy) 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 CreateAutoscalingPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AutoscalingPolicy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateAutoscalingPolicy( - UpdateAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AutoscalingPolicy) { - requests.add(request); - responseObserver.onNext(((AutoscalingPolicy) 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 UpdateAutoscalingPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AutoscalingPolicy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getAutoscalingPolicy( - GetAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AutoscalingPolicy) { - requests.add(request); - responseObserver.onNext(((AutoscalingPolicy) 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 GetAutoscalingPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AutoscalingPolicy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listAutoscalingPolicies( - ListAutoscalingPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListAutoscalingPoliciesResponse) { - requests.add(request); - responseObserver.onNext(((ListAutoscalingPoliciesResponse) 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 ListAutoscalingPolicies, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListAutoscalingPoliciesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteAutoscalingPolicy( - DeleteAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteAutoscalingPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchController.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchController.java deleted file mode 100644 index 0d35efbd..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchController.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.dataproc.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 MockBatchController implements MockGrpcService { - private final MockBatchControllerImpl serviceImpl; - - public MockBatchController() { - serviceImpl = new MockBatchControllerImpl(); - } - - @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-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchControllerImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchControllerImpl.java deleted file mode 100644 index ae3b2c9d..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockBatchControllerImpl.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1.BatchControllerGrpc.BatchControllerImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -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 MockBatchControllerImpl extends BatchControllerImplBase { - private List requests; - private Queue responses; - - public MockBatchControllerImpl() { - 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 createBatch(CreateBatchRequest 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 CreateBatch, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getBatch(GetBatchRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Batch) { - requests.add(request); - responseObserver.onNext(((Batch) 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 GetBatch, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Batch.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listBatches( - ListBatchesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListBatchesResponse) { - requests.add(request); - responseObserver.onNext(((ListBatchesResponse) 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 ListBatches, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListBatchesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteBatch(DeleteBatchRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteBatch, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterController.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterController.java deleted file mode 100644 index 757fb4cf..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterController.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.dataproc.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 MockClusterController implements MockGrpcService { - private final MockClusterControllerImpl serviceImpl; - - public MockClusterController() { - serviceImpl = new MockClusterControllerImpl(); - } - - @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-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterControllerImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterControllerImpl.java deleted file mode 100644 index 90f5bdc3..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterControllerImpl.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1.ClusterControllerGrpc.ClusterControllerImplBase; -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 MockClusterControllerImpl extends ClusterControllerImplBase { - private List requests; - private Queue responses; - - public MockClusterControllerImpl() { - 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 createCluster( - CreateClusterRequest 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 CreateCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateCluster( - UpdateClusterRequest 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 UpdateCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void stopCluster(StopClusterRequest 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 StopCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void startCluster( - StartClusterRequest 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 StartCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteCluster( - DeleteClusterRequest 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 DeleteCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Cluster) { - requests.add(request); - responseObserver.onNext(((Cluster) 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 GetCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Cluster.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listClusters( - ListClustersRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListClustersResponse) { - requests.add(request); - responseObserver.onNext(((ListClustersResponse) 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 ListClusters, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListClustersResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void diagnoseCluster( - DiagnoseClusterRequest 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 DiagnoseCluster, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobController.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobController.java deleted file mode 100644 index f585b65e..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobController.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.dataproc.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 MockJobController implements MockGrpcService { - private final MockJobControllerImpl serviceImpl; - - public MockJobController() { - serviceImpl = new MockJobControllerImpl(); - } - - @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-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobControllerImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobControllerImpl.java deleted file mode 100644 index 682ba337..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobControllerImpl.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1.JobControllerGrpc.JobControllerImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -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 MockJobControllerImpl extends JobControllerImplBase { - private List requests; - private Queue responses; - - public MockJobControllerImpl() { - 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 submitJob(SubmitJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Job) { - requests.add(request); - responseObserver.onNext(((Job) 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 SubmitJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Job.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void submitJobAsOperation( - SubmitJobRequest 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 SubmitJobAsOperation, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getJob(GetJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Job) { - requests.add(request); - responseObserver.onNext(((Job) 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 GetJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Job.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listJobs(ListJobsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListJobsResponse) { - requests.add(request); - responseObserver.onNext(((ListJobsResponse) 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 ListJobs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListJobsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateJob(UpdateJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Job) { - requests.add(request); - responseObserver.onNext(((Job) 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 UpdateJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Job.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void cancelJob(CancelJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Job) { - requests.add(request); - responseObserver.onNext(((Job) 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 CancelJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Job.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteJob(DeleteJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateService.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateService.java deleted file mode 100644 index f4881cc5..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.dataproc.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 MockWorkflowTemplateService implements MockGrpcService { - private final MockWorkflowTemplateServiceImpl serviceImpl; - - public MockWorkflowTemplateService() { - serviceImpl = new MockWorkflowTemplateServiceImpl(); - } - - @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-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateServiceImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateServiceImpl.java deleted file mode 100644 index 12761ffe..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateServiceImpl.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1.WorkflowTemplateServiceGrpc.WorkflowTemplateServiceImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -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 MockWorkflowTemplateServiceImpl extends WorkflowTemplateServiceImplBase { - private List requests; - private Queue responses; - - public MockWorkflowTemplateServiceImpl() { - 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 createWorkflowTemplate( - CreateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof WorkflowTemplate) { - requests.add(request); - responseObserver.onNext(((WorkflowTemplate) 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 CreateWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - WorkflowTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getWorkflowTemplate( - GetWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof WorkflowTemplate) { - requests.add(request); - responseObserver.onNext(((WorkflowTemplate) 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 GetWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - WorkflowTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void instantiateWorkflowTemplate( - InstantiateWorkflowTemplateRequest 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 InstantiateWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void instantiateInlineWorkflowTemplate( - InstantiateInlineWorkflowTemplateRequest 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 InstantiateInlineWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateWorkflowTemplate( - UpdateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof WorkflowTemplate) { - requests.add(request); - responseObserver.onNext(((WorkflowTemplate) 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 UpdateWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - WorkflowTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listWorkflowTemplates( - ListWorkflowTemplatesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListWorkflowTemplatesResponse) { - requests.add(request); - responseObserver.onNext(((ListWorkflowTemplatesResponse) 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 ListWorkflowTemplates, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListWorkflowTemplatesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteWorkflowTemplate( - DeleteWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteWorkflowTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java deleted file mode 100644 index 1fd5977b..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java +++ /dev/null @@ -1,941 +0,0 @@ -/* - * 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.dataproc.v1; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -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.Duration; -import com.google.protobuf.Empty; -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.Map; -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 WorkflowTemplateServiceClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private LocalChannelProvider channelProvider; - private WorkflowTemplateServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockWorkflowTemplateService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - WorkflowTemplateServiceSettings settings = - WorkflowTemplateServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowTemplateServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createWorkflowTemplateTest() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - WorkflowTemplate actualResponse = client.createWorkflowTemplate(parent, template); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowTemplateRequest actualRequest = - ((CreateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.createWorkflowTemplate(parent, template); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTemplateTest2() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - WorkflowTemplate actualResponse = client.createWorkflowTemplate(parent, template); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowTemplateRequest actualRequest = - ((CreateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.createWorkflowTemplate(parent, template); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTemplateTest3() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - WorkflowTemplate actualResponse = client.createWorkflowTemplate(parent, template); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowTemplateRequest actualRequest = - ((CreateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowTemplateExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String parent = "parent-995424086"; - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.createWorkflowTemplate(parent, template); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTemplateTest() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - - WorkflowTemplate actualResponse = client.getWorkflowTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowTemplateRequest actualRequest = ((GetWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - client.getWorkflowTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTemplateTest2() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - String name = "name3373707"; - - WorkflowTemplate actualResponse = client.getWorkflowTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowTemplateRequest actualRequest = ((GetWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String name = "name3373707"; - client.getWorkflowTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void instantiateWorkflowTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - - client.instantiateWorkflowTemplateAsync(name).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - ((InstantiateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - client.instantiateWorkflowTemplateAsync(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 instantiateWorkflowTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - String name = "name3373707"; - - client.instantiateWorkflowTemplateAsync(name).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - ((InstantiateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String name = "name3373707"; - client.instantiateWorkflowTemplateAsync(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 instantiateWorkflowTemplateTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - Map parameters = new HashMap<>(); - - client.instantiateWorkflowTemplateAsync(name, parameters).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - ((InstantiateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(parameters, actualRequest.getParametersMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateWorkflowTemplateExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - Map parameters = new HashMap<>(); - client.instantiateWorkflowTemplateAsync(name, parameters).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 instantiateWorkflowTemplateTest4() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - String name = "name3373707"; - Map parameters = new HashMap<>(); - - client.instantiateWorkflowTemplateAsync(name, parameters).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - ((InstantiateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(parameters, actualRequest.getParametersMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateWorkflowTemplateExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String name = "name3373707"; - Map parameters = new HashMap<>(); - client.instantiateWorkflowTemplateAsync(name, parameters).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 instantiateInlineWorkflowTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateInlineWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - client.instantiateInlineWorkflowTemplateAsync(parent, template).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateInlineWorkflowTemplateRequest actualRequest = - ((InstantiateInlineWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateInlineWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.instantiateInlineWorkflowTemplateAsync(parent, template).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 instantiateInlineWorkflowTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateInlineWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - client.instantiateInlineWorkflowTemplateAsync(parent, template).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateInlineWorkflowTemplateRequest actualRequest = - ((InstantiateInlineWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateInlineWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.instantiateInlineWorkflowTemplateAsync(parent, template).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 instantiateInlineWorkflowTemplateTest3() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateInlineWorkflowTemplateTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - String parent = "parent-995424086"; - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - client.instantiateInlineWorkflowTemplateAsync(parent, template).get(); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateInlineWorkflowTemplateRequest actualRequest = - ((InstantiateInlineWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void instantiateInlineWorkflowTemplateExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String parent = "parent-995424086"; - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.instantiateInlineWorkflowTemplateAsync(parent, template).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 updateWorkflowTemplateTest() throws Exception { - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId("id3355") - .setName( - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - .toString()) - .setVersion(351608024) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setPlacement(WorkflowTemplatePlacement.newBuilder().build()) - .addAllJobs(new ArrayList()) - .addAllParameters(new ArrayList()) - .setDagTimeout(Duration.newBuilder().build()) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - WorkflowTemplate actualResponse = client.updateWorkflowTemplate(template); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateWorkflowTemplateRequest actualRequest = - ((UpdateWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - client.updateWorkflowTemplate(template); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowTemplatesTest() throws Exception { - WorkflowTemplate responsesElement = WorkflowTemplate.newBuilder().build(); - ListWorkflowTemplatesResponse expectedResponse = - ListWorkflowTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllTemplates(Arrays.asList(responsesElement)) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListWorkflowTemplatesPagedResponse pagedListResponse = client.listWorkflowTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowTemplatesRequest actualRequest = - ((ListWorkflowTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowTemplatesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listWorkflowTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowTemplatesTest2() throws Exception { - WorkflowTemplate responsesElement = WorkflowTemplate.newBuilder().build(); - ListWorkflowTemplatesResponse expectedResponse = - ListWorkflowTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllTemplates(Arrays.asList(responsesElement)) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - - ListWorkflowTemplatesPagedResponse pagedListResponse = client.listWorkflowTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowTemplatesRequest actualRequest = - ((ListWorkflowTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowTemplatesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - client.listWorkflowTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowTemplatesTest3() throws Exception { - WorkflowTemplate responsesElement = WorkflowTemplate.newBuilder().build(); - ListWorkflowTemplatesResponse expectedResponse = - ListWorkflowTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllTemplates(Arrays.asList(responsesElement)) - .build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListWorkflowTemplatesPagedResponse pagedListResponse = client.listWorkflowTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowTemplatesRequest actualRequest = - ((ListWorkflowTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowTemplatesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listWorkflowTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteWorkflowTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - - client.deleteWorkflowTemplate(name); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowTemplateRequest actualRequest = - ((DeleteWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - client.deleteWorkflowTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteWorkflowTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockWorkflowTemplateService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteWorkflowTemplate(name); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowTemplateRequest actualRequest = - ((DeleteWorkflowTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflowTemplateService.addException(exception); - - try { - String name = "name3373707"; - client.deleteWorkflowTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/it/ITSystemTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/it/ITSystemTest.java deleted file mode 100644 index 013a04d2..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/it/ITSystemTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1.it; - -import static org.junit.Assert.assertEquals; - -import com.google.cloud.ServiceOptions; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterConfig; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.CreateClusterRequest; -import com.google.cloud.dataproc.v1.RegionName; -import com.google.cloud.dataproc.v1.WorkflowTemplate; -import com.google.cloud.dataproc.v1.WorkflowTemplateName; -import com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient; -import com.google.common.collect.Lists; -import java.util.Iterator; -import java.util.List; -import java.util.UUID; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ITSystemTest { - private static ClusterControllerClient clusterClient; - private static WorkflowTemplateServiceClient workflowClient; - - private static final String PROJECT_ID = ServiceOptions.getDefaultProjectId(); - private static final String REGION = "global"; - private static final String ID = UUID.randomUUID().toString(); - private static final int VERSION = 1; - private static final String CLUSTER_NAME = - "test-cluster-" + UUID.randomUUID().toString().substring(0, 8); - private static final String CLUSTER_REGION = "us-central1"; - private static final ClusterControllerSettings.Builder CLUSTER_CONTROLLER_SETTINGS = - ClusterControllerSettings.newBuilder().setEndpoint("us-central1-dataproc.googleapis.com:443"); - private static final ClusterConfig CLUSTER_CONFIG = ClusterConfig.newBuilder().build(); - private static final Cluster CLUSTER = - Cluster.newBuilder() - .setProjectId(PROJECT_ID) - .setClusterName(CLUSTER_NAME) - .setClusterUuid(ID) - .setConfig(CLUSTER_CONFIG) - .build(); - private static final CreateClusterRequest CREATE_CLUSTER_REQUEST = - CreateClusterRequest.newBuilder() - .setProjectId(PROJECT_ID) - .setRegion(CLUSTER_REGION) - .setCluster(CLUSTER) - .build(); - private static final WorkflowTemplateName WORKFLOW_TEMPLATE_NAME = - WorkflowTemplateName.of(PROJECT_ID, REGION, ID); - private static final RegionName PARENT = RegionName.of(PROJECT_ID, REGION); - private static final WorkflowTemplate WORKFLOW_TEMPLATE = - WorkflowTemplate.newBuilder() - .setId(ID) - .setName(WORKFLOW_TEMPLATE_NAME.toString()) - .setVersion(VERSION) - .build(); - - @BeforeClass - public static void beforeClass() throws Exception { - /** create cluster */ - clusterClient = ClusterControllerClient.create(CLUSTER_CONTROLLER_SETTINGS.build()); - clusterClient.createClusterAsync(CREATE_CLUSTER_REQUEST).get(); - - /** create workflow */ - workflowClient = WorkflowTemplateServiceClient.create(); - workflowClient.createWorkflowTemplate(PARENT, WORKFLOW_TEMPLATE); - } - - @AfterClass - public static void afterClass() { - /** delete cluster */ - clusterClient.deleteClusterAsync(PROJECT_ID, CLUSTER_REGION, CLUSTER_NAME); - clusterClient.close(); - - /** delete workflow */ - workflowClient.deleteWorkflowTemplate(WORKFLOW_TEMPLATE_NAME); - workflowClient.close(); - } - - @Test - public void getClusterTest() { - Cluster cluster = clusterClient.getCluster(PROJECT_ID, CLUSTER_REGION, CLUSTER_NAME); - assertEquals(PROJECT_ID, cluster.getProjectId()); - assertEquals(CLUSTER_NAME, cluster.getClusterName()); - } - - @Test - public void listClustersTest() { - ClusterControllerClient.ListClustersPagedResponse pagedListResponse = - clusterClient.listClusters(PROJECT_ID, CLUSTER_REGION); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - int count = 0, cluster = 0; - while (cluster < resources.size()) { - count++; - cluster++; - } - assertEquals(count, resources.size()); - } - - @Test - public void getWorkflowTemplateTest() { - WorkflowTemplate response = workflowClient.getWorkflowTemplate(WORKFLOW_TEMPLATE_NAME); - assertEquals(ID, response.getId()); - assertEquals(WORKFLOW_TEMPLATE_NAME.toString(), response.getName()); - assertEquals(VERSION, response.getVersion()); - } - - @Test - public void listWorkflowTemplateTest() { - WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse response = - workflowClient.listWorkflowTemplates(PARENT); - Iterator templateIterator = response.iterateAll().iterator(); - int count = 0; - while (templateIterator.hasNext()) { - templateIterator.next(); - count++; - } - assertEquals(1, count); - } -} diff --git a/grpc-google-cloud-dataproc-v1/pom.xml b/grpc-google-cloud-dataproc-v1/pom.xml deleted file mode 100644 index e976075f..00000000 --- a/grpc-google-cloud-dataproc-v1/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - grpc-google-cloud-dataproc-v1 - GRPC library for grpc-google-cloud-dataproc-v1 - - com.google.cloud - google-cloud-dataproc-parent - 2.3.3-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-cloud-dataproc-v1 - - - com.google.guava - guava - - - com.google.api.grpc - proto-google-common-protos - - - - - - 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-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceGrpc.java deleted file mode 100644 index cb0b6ad2..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceGrpc.java +++ /dev/null @@ -1,889 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The API interface for managing autoscaling policies in the
- * Dataproc API.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/autoscaling_policies.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AutoscalingPolicyServiceGrpc { - - private AutoscalingPolicyServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1.AutoscalingPolicyService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getCreateAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getCreateAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getCreateAutoscalingPolicyMethod; - if ((getCreateAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod) - == null) { - synchronized (AutoscalingPolicyServiceGrpc.class) { - if ((getCreateAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod) - == null) { - AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod = - getCreateAutoscalingPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateAutoscalingPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "CreateAutoscalingPolicy")) - .build(); - } - } - } - return getCreateAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getUpdateAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getUpdateAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getUpdateAutoscalingPolicyMethod; - if ((getUpdateAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod) - == null) { - synchronized (AutoscalingPolicyServiceGrpc.class) { - if ((getUpdateAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod) - == null) { - AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod = - getUpdateAutoscalingPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateAutoscalingPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "UpdateAutoscalingPolicy")) - .build(); - } - } - } - return getUpdateAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getGetAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getGetAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getGetAutoscalingPolicyMethod; - if ((getGetAutoscalingPolicyMethod = AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod) - == null) { - synchronized (AutoscalingPolicyServiceGrpc.class) { - if ((getGetAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod) - == null) { - AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod = - getGetAutoscalingPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetAutoscalingPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "GetAutoscalingPolicy")) - .build(); - } - } - } - return getGetAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse> - getListAutoscalingPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAutoscalingPolicies", - requestType = com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.class, - responseType = com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse> - getListAutoscalingPoliciesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse> - getListAutoscalingPoliciesMethod; - if ((getListAutoscalingPoliciesMethod = - AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod) - == null) { - synchronized (AutoscalingPolicyServiceGrpc.class) { - if ((getListAutoscalingPoliciesMethod = - AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod) - == null) { - AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod = - getListAutoscalingPoliciesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListAutoscalingPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "ListAutoscalingPolicies")) - .build(); - } - } - } - return getListAutoscalingPoliciesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest, com.google.protobuf.Empty> - getDeleteAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest, com.google.protobuf.Empty> - getDeleteAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest, com.google.protobuf.Empty> - getDeleteAutoscalingPolicyMethod; - if ((getDeleteAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod) - == null) { - synchronized (AutoscalingPolicyServiceGrpc.class) { - if ((getDeleteAutoscalingPolicyMethod = - AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod) - == null) { - AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod = - getDeleteAutoscalingPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteAutoscalingPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "DeleteAutoscalingPolicy")) - .build(); - } - } - } - return getDeleteAutoscalingPolicyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static AutoscalingPolicyServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoscalingPolicyServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceStub(channel, callOptions); - } - }; - return AutoscalingPolicyServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AutoscalingPolicyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoscalingPolicyServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceBlockingStub(channel, callOptions); - } - }; - return AutoscalingPolicyServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static AutoscalingPolicyServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoscalingPolicyServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceFutureStub(channel, callOptions); - } - }; - return AutoscalingPolicyServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Dataproc API.
-   * 
- */ - public abstract static class AutoscalingPolicyServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates new autoscaling policy.
-     * 
- */ - public void createAutoscalingPolicy( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates (replaces) autoscaling policy.
-     * Disabled check for update_mask, because all updates will be full
-     * replacements.
-     * 
- */ - public void updateAutoscalingPolicy( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public void getAutoscalingPolicy( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public void listAutoscalingPolicies( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAutoscalingPoliciesMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes an autoscaling policy. It is an error to delete an autoscaling
-     * policy that is in use by one or more clusters.
-     * 
- */ - public void deleteAutoscalingPolicy( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAutoscalingPolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateAutoscalingPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_CREATE_AUTOSCALING_POLICY))) - .addMethod( - getUpdateAutoscalingPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_UPDATE_AUTOSCALING_POLICY))) - .addMethod( - getGetAutoscalingPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_GET_AUTOSCALING_POLICY))) - .addMethod( - getListAutoscalingPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse>( - this, METHODID_LIST_AUTOSCALING_POLICIES))) - .addMethod( - getDeleteAutoscalingPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_AUTOSCALING_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Dataproc API.
-   * 
- */ - public static final class AutoscalingPolicyServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private AutoscalingPolicyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoscalingPolicyServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new autoscaling policy.
-     * 
- */ - public void createAutoscalingPolicy( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates (replaces) autoscaling policy.
-     * Disabled check for update_mask, because all updates will be full
-     * replacements.
-     * 
- */ - public void updateAutoscalingPolicy( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public void getAutoscalingPolicy( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public void listAutoscalingPolicies( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAutoscalingPoliciesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes an autoscaling policy. It is an error to delete an autoscaling
-     * policy that is in use by one or more clusters.
-     * 
- */ - public void deleteAutoscalingPolicy( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Dataproc API.
-   * 
- */ - public static final class AutoscalingPolicyServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AutoscalingPolicyServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoscalingPolicyServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new autoscaling policy.
-     * 
- */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy createAutoscalingPolicy( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates (replaces) autoscaling policy.
-     * Disabled check for update_mask, because all updates will be full
-     * replacements.
-     * 
- */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy updateAutoscalingPolicy( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy getAutoscalingPolicy( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse listAutoscalingPolicies( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAutoscalingPoliciesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an autoscaling policy. It is an error to delete an autoscaling
-     * policy that is in use by one or more clusters.
-     * 
- */ - public com.google.protobuf.Empty deleteAutoscalingPolicy( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAutoscalingPolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Dataproc API.
-   * 
- */ - public static final class AutoscalingPolicyServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AutoscalingPolicyServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoscalingPolicyServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoscalingPolicyServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new autoscaling policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.AutoscalingPolicy> - createAutoscalingPolicy( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAutoscalingPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates (replaces) autoscaling policy.
-     * Disabled check for update_mask, because all updates will be full
-     * replacements.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.AutoscalingPolicy> - updateAutoscalingPolicy( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.AutoscalingPolicy> - getAutoscalingPolicy(com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse> - listAutoscalingPolicies( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAutoscalingPoliciesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes an autoscaling policy. It is an error to delete an autoscaling
-     * policy that is in use by one or more clusters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteAutoscalingPolicy( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAutoscalingPolicyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_AUTOSCALING_POLICY = 0; - private static final int METHODID_UPDATE_AUTOSCALING_POLICY = 1; - private static final int METHODID_GET_AUTOSCALING_POLICY = 2; - private static final int METHODID_LIST_AUTOSCALING_POLICIES = 3; - private static final int METHODID_DELETE_AUTOSCALING_POLICY = 4; - - 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 AutoscalingPolicyServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AutoscalingPolicyServiceImplBase 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_CREATE_AUTOSCALING_POLICY: - serviceImpl.createAutoscalingPolicy( - (com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_AUTOSCALING_POLICY: - serviceImpl.updateAutoscalingPolicy( - (com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_AUTOSCALING_POLICY: - serviceImpl.getAutoscalingPolicy( - (com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_AUTOSCALING_POLICIES: - serviceImpl.listAutoscalingPolicies( - (com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse>) - responseObserver); - break; - case METHODID_DELETE_AUTOSCALING_POLICY: - serviceImpl.deleteAutoscalingPolicy( - (com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) 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 AutoscalingPolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AutoscalingPolicyServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AutoscalingPolicyService"); - } - } - - private static final class AutoscalingPolicyServiceFileDescriptorSupplier - extends AutoscalingPolicyServiceBaseDescriptorSupplier { - AutoscalingPolicyServiceFileDescriptorSupplier() {} - } - - private static final class AutoscalingPolicyServiceMethodDescriptorSupplier - extends AutoscalingPolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - AutoscalingPolicyServiceMethodDescriptorSupplier(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 (AutoscalingPolicyServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AutoscalingPolicyServiceFileDescriptorSupplier()) - .addMethod(getCreateAutoscalingPolicyMethod()) - .addMethod(getUpdateAutoscalingPolicyMethod()) - .addMethod(getGetAutoscalingPolicyMethod()) - .addMethod(getListAutoscalingPoliciesMethod()) - .addMethod(getDeleteAutoscalingPolicyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchControllerGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchControllerGrpc.java deleted file mode 100644 index a188740c..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchControllerGrpc.java +++ /dev/null @@ -1,694 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The BatchController provides methods to manage batch workloads.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/batches.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BatchControllerGrpc { - - private BatchControllerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1.BatchController"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateBatchRequest, com.google.longrunning.Operation> - getCreateBatchMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateBatch", - requestType = com.google.cloud.dataproc.v1.CreateBatchRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateBatchRequest, com.google.longrunning.Operation> - getCreateBatchMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateBatchRequest, com.google.longrunning.Operation> - getCreateBatchMethod; - if ((getCreateBatchMethod = BatchControllerGrpc.getCreateBatchMethod) == null) { - synchronized (BatchControllerGrpc.class) { - if ((getCreateBatchMethod = BatchControllerGrpc.getCreateBatchMethod) == null) { - BatchControllerGrpc.getCreateBatchMethod = - getCreateBatchMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBatch")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.CreateBatchRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new BatchControllerMethodDescriptorSupplier("CreateBatch")) - .build(); - } - } - } - return getCreateBatchMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetBatchRequest, com.google.cloud.dataproc.v1.Batch> - getGetBatchMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBatch", - requestType = com.google.cloud.dataproc.v1.GetBatchRequest.class, - responseType = com.google.cloud.dataproc.v1.Batch.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetBatchRequest, com.google.cloud.dataproc.v1.Batch> - getGetBatchMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetBatchRequest, com.google.cloud.dataproc.v1.Batch> - getGetBatchMethod; - if ((getGetBatchMethod = BatchControllerGrpc.getGetBatchMethod) == null) { - synchronized (BatchControllerGrpc.class) { - if ((getGetBatchMethod = BatchControllerGrpc.getGetBatchMethod) == null) { - BatchControllerGrpc.getGetBatchMethod = - getGetBatchMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBatch")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.GetBatchRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Batch.getDefaultInstance())) - .setSchemaDescriptor(new BatchControllerMethodDescriptorSupplier("GetBatch")) - .build(); - } - } - } - return getGetBatchMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListBatchesRequest, - com.google.cloud.dataproc.v1.ListBatchesResponse> - getListBatchesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListBatches", - requestType = com.google.cloud.dataproc.v1.ListBatchesRequest.class, - responseType = com.google.cloud.dataproc.v1.ListBatchesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListBatchesRequest, - com.google.cloud.dataproc.v1.ListBatchesResponse> - getListBatchesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListBatchesRequest, - com.google.cloud.dataproc.v1.ListBatchesResponse> - getListBatchesMethod; - if ((getListBatchesMethod = BatchControllerGrpc.getListBatchesMethod) == null) { - synchronized (BatchControllerGrpc.class) { - if ((getListBatchesMethod = BatchControllerGrpc.getListBatchesMethod) == null) { - BatchControllerGrpc.getListBatchesMethod = - getListBatchesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBatches")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListBatchesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListBatchesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new BatchControllerMethodDescriptorSupplier("ListBatches")) - .build(); - } - } - } - return getListBatchesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteBatchRequest, com.google.protobuf.Empty> - getDeleteBatchMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteBatch", - requestType = com.google.cloud.dataproc.v1.DeleteBatchRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteBatchRequest, com.google.protobuf.Empty> - getDeleteBatchMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteBatchRequest, com.google.protobuf.Empty> - getDeleteBatchMethod; - if ((getDeleteBatchMethod = BatchControllerGrpc.getDeleteBatchMethod) == null) { - synchronized (BatchControllerGrpc.class) { - if ((getDeleteBatchMethod = BatchControllerGrpc.getDeleteBatchMethod) == null) { - BatchControllerGrpc.getDeleteBatchMethod = - getDeleteBatchMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBatch")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DeleteBatchRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new BatchControllerMethodDescriptorSupplier("DeleteBatch")) - .build(); - } - } - } - return getDeleteBatchMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static BatchControllerStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BatchControllerStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerStub(channel, callOptions); - } - }; - return BatchControllerStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static BatchControllerBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BatchControllerBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerBlockingStub(channel, callOptions); - } - }; - return BatchControllerBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static BatchControllerFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BatchControllerFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerFutureStub(channel, callOptions); - } - }; - return BatchControllerFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The BatchController provides methods to manage batch workloads.
-   * 
- */ - public abstract static class BatchControllerImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates a batch workload that executes asynchronously.
-     * 
- */ - public void createBatch( - com.google.cloud.dataproc.v1.CreateBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateBatchMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the batch workload resource representation.
-     * 
- */ - public void getBatch( - com.google.cloud.dataproc.v1.GetBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBatchMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists batch workloads.
-     * 
- */ - public void listBatches( - com.google.cloud.dataproc.v1.ListBatchesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListBatchesMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes the batch workload resource. If the batch is not in terminal state,
-     * the delete fails and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public void deleteBatch( - com.google.cloud.dataproc.v1.DeleteBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteBatchMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateBatchMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateBatchRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_BATCH))) - .addMethod( - getGetBatchMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetBatchRequest, - com.google.cloud.dataproc.v1.Batch>(this, METHODID_GET_BATCH))) - .addMethod( - getListBatchesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListBatchesRequest, - com.google.cloud.dataproc.v1.ListBatchesResponse>( - this, METHODID_LIST_BATCHES))) - .addMethod( - getDeleteBatchMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteBatchRequest, com.google.protobuf.Empty>( - this, METHODID_DELETE_BATCH))) - .build(); - } - } - - /** - * - * - *
-   * The BatchController provides methods to manage batch workloads.
-   * 
- */ - public static final class BatchControllerStub - extends io.grpc.stub.AbstractAsyncStub { - private BatchControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BatchControllerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a batch workload that executes asynchronously.
-     * 
- */ - public void createBatch( - com.google.cloud.dataproc.v1.CreateBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBatchMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the batch workload resource representation.
-     * 
- */ - public void getBatch( - com.google.cloud.dataproc.v1.GetBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBatchMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists batch workloads.
-     * 
- */ - public void listBatches( - com.google.cloud.dataproc.v1.ListBatchesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBatchesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes the batch workload resource. If the batch is not in terminal state,
-     * the delete fails and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public void deleteBatch( - com.google.cloud.dataproc.v1.DeleteBatchRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBatchMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The BatchController provides methods to manage batch workloads.
-   * 
- */ - public static final class BatchControllerBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private BatchControllerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BatchControllerBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a batch workload that executes asynchronously.
-     * 
- */ - public com.google.longrunning.Operation createBatch( - com.google.cloud.dataproc.v1.CreateBatchRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateBatchMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the batch workload resource representation.
-     * 
- */ - public com.google.cloud.dataproc.v1.Batch getBatch( - com.google.cloud.dataproc.v1.GetBatchRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBatchMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists batch workloads.
-     * 
- */ - public com.google.cloud.dataproc.v1.ListBatchesResponse listBatches( - com.google.cloud.dataproc.v1.ListBatchesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListBatchesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes the batch workload resource. If the batch is not in terminal state,
-     * the delete fails and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public com.google.protobuf.Empty deleteBatch( - com.google.cloud.dataproc.v1.DeleteBatchRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteBatchMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The BatchController provides methods to manage batch workloads.
-   * 
- */ - public static final class BatchControllerFutureStub - extends io.grpc.stub.AbstractFutureStub { - private BatchControllerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BatchControllerFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BatchControllerFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a batch workload that executes asynchronously.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createBatch(com.google.cloud.dataproc.v1.CreateBatchRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateBatchMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the batch workload resource representation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getBatch(com.google.cloud.dataproc.v1.GetBatchRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBatchMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists batch workloads.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.ListBatchesResponse> - listBatches(com.google.cloud.dataproc.v1.ListBatchesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListBatchesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes the batch workload resource. If the batch is not in terminal state,
-     * the delete fails and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteBatch(com.google.cloud.dataproc.v1.DeleteBatchRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteBatchMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_BATCH = 0; - private static final int METHODID_GET_BATCH = 1; - private static final int METHODID_LIST_BATCHES = 2; - private static final int METHODID_DELETE_BATCH = 3; - - 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 BatchControllerImplBase serviceImpl; - private final int methodId; - - MethodHandlers(BatchControllerImplBase 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_CREATE_BATCH: - serviceImpl.createBatch( - (com.google.cloud.dataproc.v1.CreateBatchRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BATCH: - serviceImpl.getBatch( - (com.google.cloud.dataproc.v1.GetBatchRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_BATCHES: - serviceImpl.listBatches( - (com.google.cloud.dataproc.v1.ListBatchesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_BATCH: - serviceImpl.deleteBatch( - (com.google.cloud.dataproc.v1.DeleteBatchRequest) 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 BatchControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - BatchControllerBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("BatchController"); - } - } - - private static final class BatchControllerFileDescriptorSupplier - extends BatchControllerBaseDescriptorSupplier { - BatchControllerFileDescriptorSupplier() {} - } - - private static final class BatchControllerMethodDescriptorSupplier - extends BatchControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - BatchControllerMethodDescriptorSupplier(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 (BatchControllerGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new BatchControllerFileDescriptorSupplier()) - .addMethod(getCreateBatchMethod()) - .addMethod(getGetBatchMethod()) - .addMethod(getListBatchesMethod()) - .addMethod(getDeleteBatchMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java deleted file mode 100644 index 95cd8ec5..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java +++ /dev/null @@ -1,1205 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The ClusterControllerService provides methods to manage clusters
- * of Compute Engine instances.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/clusters.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ClusterControllerGrpc { - - private ClusterControllerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1.ClusterController"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> - getCreateClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateCluster", - requestType = com.google.cloud.dataproc.v1.CreateClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> - getCreateClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> - getCreateClusterMethod; - if ((getCreateClusterMethod = ClusterControllerGrpc.getCreateClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getCreateClusterMethod = ClusterControllerGrpc.getCreateClusterMethod) == null) { - ClusterControllerGrpc.getCreateClusterMethod = - getCreateClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.CreateClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("CreateCluster")) - .build(); - } - } - } - return getCreateClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> - getUpdateClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", - requestType = com.google.cloud.dataproc.v1.UpdateClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> - getUpdateClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> - getUpdateClusterMethod; - if ((getUpdateClusterMethod = ClusterControllerGrpc.getUpdateClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getUpdateClusterMethod = ClusterControllerGrpc.getUpdateClusterMethod) == null) { - ClusterControllerGrpc.getUpdateClusterMethod = - getUpdateClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.UpdateClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("UpdateCluster")) - .build(); - } - } - } - return getUpdateClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> - getStopClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StopCluster", - requestType = com.google.cloud.dataproc.v1.StopClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> - getStopClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> - getStopClusterMethod; - if ((getStopClusterMethod = ClusterControllerGrpc.getStopClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getStopClusterMethod = ClusterControllerGrpc.getStopClusterMethod) == null) { - ClusterControllerGrpc.getStopClusterMethod = - getStopClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.StopClusterRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("StopCluster")) - .build(); - } - } - } - return getStopClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> - getStartClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "StartCluster", - requestType = com.google.cloud.dataproc.v1.StartClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> - getStartClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> - getStartClusterMethod; - if ((getStartClusterMethod = ClusterControllerGrpc.getStartClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getStartClusterMethod = ClusterControllerGrpc.getStartClusterMethod) == null) { - ClusterControllerGrpc.getStartClusterMethod = - getStartClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.StartClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("StartCluster")) - .build(); - } - } - } - return getStartClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> - getDeleteClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", - requestType = com.google.cloud.dataproc.v1.DeleteClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> - getDeleteClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> - getDeleteClusterMethod; - if ((getDeleteClusterMethod = ClusterControllerGrpc.getDeleteClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getDeleteClusterMethod = ClusterControllerGrpc.getDeleteClusterMethod) == null) { - ClusterControllerGrpc.getDeleteClusterMethod = - getDeleteClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DeleteClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("DeleteCluster")) - .build(); - } - } - } - return getDeleteClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> - getGetClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetCluster", - requestType = com.google.cloud.dataproc.v1.GetClusterRequest.class, - responseType = com.google.cloud.dataproc.v1.Cluster.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> - getGetClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> - getGetClusterMethod; - if ((getGetClusterMethod = ClusterControllerGrpc.getGetClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getGetClusterMethod = ClusterControllerGrpc.getGetClusterMethod) == null) { - ClusterControllerGrpc.getGetClusterMethod = - getGetClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.GetClusterRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Cluster.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("GetCluster")) - .build(); - } - } - } - return getGetClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListClustersRequest, - com.google.cloud.dataproc.v1.ListClustersResponse> - getListClustersMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListClusters", - requestType = com.google.cloud.dataproc.v1.ListClustersRequest.class, - responseType = com.google.cloud.dataproc.v1.ListClustersResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListClustersRequest, - com.google.cloud.dataproc.v1.ListClustersResponse> - getListClustersMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListClustersRequest, - com.google.cloud.dataproc.v1.ListClustersResponse> - getListClustersMethod; - if ((getListClustersMethod = ClusterControllerGrpc.getListClustersMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getListClustersMethod = ClusterControllerGrpc.getListClustersMethod) == null) { - ClusterControllerGrpc.getListClustersMethod = - getListClustersMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListClusters")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListClustersRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListClustersResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("ListClusters")) - .build(); - } - } - } - return getListClustersMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> - getDiagnoseClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DiagnoseCluster", - requestType = com.google.cloud.dataproc.v1.DiagnoseClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> - getDiagnoseClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> - getDiagnoseClusterMethod; - if ((getDiagnoseClusterMethod = ClusterControllerGrpc.getDiagnoseClusterMethod) == null) { - synchronized (ClusterControllerGrpc.class) { - if ((getDiagnoseClusterMethod = ClusterControllerGrpc.getDiagnoseClusterMethod) == null) { - ClusterControllerGrpc.getDiagnoseClusterMethod = - getDiagnoseClusterMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DiagnoseCluster")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("DiagnoseCluster")) - .build(); - } - } - } - return getDiagnoseClusterMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static ClusterControllerStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ClusterControllerStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerStub(channel, callOptions); - } - }; - return ClusterControllerStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ClusterControllerBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ClusterControllerBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerBlockingStub(channel, callOptions); - } - }; - return ClusterControllerBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static ClusterControllerFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ClusterControllerFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerFutureStub(channel, callOptions); - } - }; - return ClusterControllerFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The ClusterControllerService provides methods to manage clusters
-   * of Compute Engine instances.
-   * 
- */ - public abstract static class ClusterControllerImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public void createCluster( - com.google.cloud.dataproc.v1.CreateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
-     * is returned.
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Stops a cluster in a project.
-     * 
- */ - public void stopCluster( - com.google.cloud.dataproc.v1.StopClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getStopClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts a cluster in a project.
-     * 
- */ - public void startCluster( - com.google.cloud.dataproc.v1.StartClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getStartClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public void deleteCluster( - com.google.cloud.dataproc.v1.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public void getCluster( - com.google.cloud.dataproc.v1.GetClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public void listClusters( - com.google.cloud.dataproc.v1.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListClustersMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets cluster diagnostic information. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
-     * 
- */ - public void diagnoseCluster( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDiagnoseClusterMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_CLUSTER))) - .addMethod( - getUpdateClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_CLUSTER))) - .addMethod( - getStopClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.StopClusterRequest, - com.google.longrunning.Operation>(this, METHODID_STOP_CLUSTER))) - .addMethod( - getStartClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.StartClusterRequest, - com.google.longrunning.Operation>(this, METHODID_START_CLUSTER))) - .addMethod( - getDeleteClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteClusterRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_CLUSTER))) - .addMethod( - getGetClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetClusterRequest, - com.google.cloud.dataproc.v1.Cluster>(this, METHODID_GET_CLUSTER))) - .addMethod( - getListClustersMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListClustersRequest, - com.google.cloud.dataproc.v1.ListClustersResponse>( - this, METHODID_LIST_CLUSTERS))) - .addMethod( - getDiagnoseClusterMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DiagnoseClusterRequest, - com.google.longrunning.Operation>(this, METHODID_DIAGNOSE_CLUSTER))) - .build(); - } - } - - /** - * - * - *
-   * The ClusterControllerService provides methods to manage clusters
-   * of Compute Engine instances.
-   * 
- */ - public static final class ClusterControllerStub - extends io.grpc.stub.AbstractAsyncStub { - private ClusterControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ClusterControllerStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public void createCluster( - com.google.cloud.dataproc.v1.CreateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
-     * is returned.
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Stops a cluster in a project.
-     * 
- */ - public void stopCluster( - com.google.cloud.dataproc.v1.StopClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStopClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Starts a cluster in a project.
-     * 
- */ - public void startCluster( - com.google.cloud.dataproc.v1.StartClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStartClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public void deleteCluster( - com.google.cloud.dataproc.v1.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public void getCluster( - com.google.cloud.dataproc.v1.GetClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public void listClusters( - com.google.cloud.dataproc.v1.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListClustersMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets cluster diagnostic information. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
-     * 
- */ - public void diagnoseCluster( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDiagnoseClusterMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The ClusterControllerService provides methods to manage clusters
-   * of Compute Engine instances.
-   * 
- */ - public static final class ClusterControllerBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private ClusterControllerBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ClusterControllerBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public com.google.longrunning.Operation createCluster( - com.google.cloud.dataproc.v1.CreateClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
-     * is returned.
-     * 
- */ - public com.google.longrunning.Operation updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Stops a cluster in a project.
-     * 
- */ - public com.google.longrunning.Operation stopCluster( - com.google.cloud.dataproc.v1.StopClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStopClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts a cluster in a project.
-     * 
- */ - public com.google.longrunning.Operation startCluster( - com.google.cloud.dataproc.v1.StartClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStartClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public com.google.longrunning.Operation deleteCluster( - com.google.cloud.dataproc.v1.DeleteClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1.Cluster getCluster( - com.google.cloud.dataproc.v1.GetClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public com.google.cloud.dataproc.v1.ListClustersResponse listClusters( - com.google.cloud.dataproc.v1.ListClustersRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListClustersMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets cluster diagnostic information. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
-     * 
- */ - public com.google.longrunning.Operation diagnoseCluster( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDiagnoseClusterMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The ClusterControllerService provides methods to manage clusters
-   * of Compute Engine instances.
-   * 
- */ - public static final class ClusterControllerFutureStub - extends io.grpc.stub.AbstractFutureStub { - private ClusterControllerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ClusterControllerFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ClusterControllerFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createCluster(com.google.cloud.dataproc.v1.CreateClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
-     * is returned.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateCluster(com.google.cloud.dataproc.v1.UpdateClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Stops a cluster in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - stopCluster(com.google.cloud.dataproc.v1.StopClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStopClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts a cluster in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - startCluster(com.google.cloud.dataproc.v1.StartClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getStartClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a cluster in a project. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteCluster(com.google.cloud.dataproc.v1.DeleteClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getCluster(com.google.cloud.dataproc.v1.GetClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.ListClustersResponse> - listClusters(com.google.cloud.dataproc.v1.ListClustersRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListClustersMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets cluster diagnostic information. The returned
-     * [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - diagnoseCluster(com.google.cloud.dataproc.v1.DiagnoseClusterRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDiagnoseClusterMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_CLUSTER = 0; - private static final int METHODID_UPDATE_CLUSTER = 1; - private static final int METHODID_STOP_CLUSTER = 2; - private static final int METHODID_START_CLUSTER = 3; - private static final int METHODID_DELETE_CLUSTER = 4; - private static final int METHODID_GET_CLUSTER = 5; - private static final int METHODID_LIST_CLUSTERS = 6; - private static final int METHODID_DIAGNOSE_CLUSTER = 7; - - 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 ClusterControllerImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ClusterControllerImplBase 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_CREATE_CLUSTER: - serviceImpl.createCluster( - (com.google.cloud.dataproc.v1.CreateClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_CLUSTER: - serviceImpl.updateCluster( - (com.google.cloud.dataproc.v1.UpdateClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_STOP_CLUSTER: - serviceImpl.stopCluster( - (com.google.cloud.dataproc.v1.StopClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_START_CLUSTER: - serviceImpl.startCluster( - (com.google.cloud.dataproc.v1.StartClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_CLUSTER: - serviceImpl.deleteCluster( - (com.google.cloud.dataproc.v1.DeleteClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CLUSTER: - serviceImpl.getCluster( - (com.google.cloud.dataproc.v1.GetClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CLUSTERS: - serviceImpl.listClusters( - (com.google.cloud.dataproc.v1.ListClustersRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DIAGNOSE_CLUSTER: - serviceImpl.diagnoseCluster( - (com.google.cloud.dataproc.v1.DiagnoseClusterRequest) 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 ClusterControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ClusterControllerBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ClusterController"); - } - } - - private static final class ClusterControllerFileDescriptorSupplier - extends ClusterControllerBaseDescriptorSupplier { - ClusterControllerFileDescriptorSupplier() {} - } - - private static final class ClusterControllerMethodDescriptorSupplier - extends ClusterControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ClusterControllerMethodDescriptorSupplier(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 (ClusterControllerGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ClusterControllerFileDescriptorSupplier()) - .addMethod(getCreateClusterMethod()) - .addMethod(getUpdateClusterMethod()) - .addMethod(getStopClusterMethod()) - .addMethod(getStartClusterMethod()) - .addMethod(getDeleteClusterMethod()) - .addMethod(getGetClusterMethod()) - .addMethod(getListClustersMethod()) - .addMethod(getDiagnoseClusterMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobControllerGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobControllerGrpc.java deleted file mode 100644 index f9c7c484..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobControllerGrpc.java +++ /dev/null @@ -1,1023 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The JobController provides methods to manage jobs.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/jobs.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class JobControllerGrpc { - - private JobControllerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1.JobController"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.cloud.dataproc.v1.Job> - getSubmitJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SubmitJob", - requestType = com.google.cloud.dataproc.v1.SubmitJobRequest.class, - responseType = com.google.cloud.dataproc.v1.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.cloud.dataproc.v1.Job> - getSubmitJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.cloud.dataproc.v1.Job> - getSubmitJobMethod; - if ((getSubmitJobMethod = JobControllerGrpc.getSubmitJobMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getSubmitJobMethod = JobControllerGrpc.getSubmitJobMethod) == null) { - JobControllerGrpc.getSubmitJobMethod = - getSubmitJobMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SubmitJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.SubmitJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("SubmitJob")) - .build(); - } - } - } - return getSubmitJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.longrunning.Operation> - getSubmitJobAsOperationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SubmitJobAsOperation", - requestType = com.google.cloud.dataproc.v1.SubmitJobRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.longrunning.Operation> - getSubmitJobAsOperationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.SubmitJobRequest, com.google.longrunning.Operation> - getSubmitJobAsOperationMethod; - if ((getSubmitJobAsOperationMethod = JobControllerGrpc.getSubmitJobAsOperationMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getSubmitJobAsOperationMethod = JobControllerGrpc.getSubmitJobAsOperationMethod) - == null) { - JobControllerGrpc.getSubmitJobAsOperationMethod = - getSubmitJobAsOperationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "SubmitJobAsOperation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.SubmitJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new JobControllerMethodDescriptorSupplier("SubmitJobAsOperation")) - .build(); - } - } - } - return getSubmitJobAsOperationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetJobRequest, com.google.cloud.dataproc.v1.Job> - getGetJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetJob", - requestType = com.google.cloud.dataproc.v1.GetJobRequest.class, - responseType = com.google.cloud.dataproc.v1.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetJobRequest, com.google.cloud.dataproc.v1.Job> - getGetJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetJobRequest, com.google.cloud.dataproc.v1.Job> - getGetJobMethod; - if ((getGetJobMethod = JobControllerGrpc.getGetJobMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getGetJobMethod = JobControllerGrpc.getGetJobMethod) == null) { - JobControllerGrpc.getGetJobMethod = - getGetJobMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.GetJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("GetJob")) - .build(); - } - } - } - return getGetJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListJobsRequest, - com.google.cloud.dataproc.v1.ListJobsResponse> - getListJobsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListJobs", - requestType = com.google.cloud.dataproc.v1.ListJobsRequest.class, - responseType = com.google.cloud.dataproc.v1.ListJobsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListJobsRequest, - com.google.cloud.dataproc.v1.ListJobsResponse> - getListJobsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListJobsRequest, - com.google.cloud.dataproc.v1.ListJobsResponse> - getListJobsMethod; - if ((getListJobsMethod = JobControllerGrpc.getListJobsMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getListJobsMethod = JobControllerGrpc.getListJobsMethod) == null) { - JobControllerGrpc.getListJobsMethod = - getListJobsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListJobsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListJobsResponse.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("ListJobs")) - .build(); - } - } - } - return getListJobsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateJobRequest, com.google.cloud.dataproc.v1.Job> - getUpdateJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateJob", - requestType = com.google.cloud.dataproc.v1.UpdateJobRequest.class, - responseType = com.google.cloud.dataproc.v1.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateJobRequest, com.google.cloud.dataproc.v1.Job> - getUpdateJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateJobRequest, com.google.cloud.dataproc.v1.Job> - getUpdateJobMethod; - if ((getUpdateJobMethod = JobControllerGrpc.getUpdateJobMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getUpdateJobMethod = JobControllerGrpc.getUpdateJobMethod) == null) { - JobControllerGrpc.getUpdateJobMethod = - getUpdateJobMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.UpdateJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("UpdateJob")) - .build(); - } - } - } - return getUpdateJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CancelJobRequest, com.google.cloud.dataproc.v1.Job> - getCancelJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CancelJob", - requestType = com.google.cloud.dataproc.v1.CancelJobRequest.class, - responseType = com.google.cloud.dataproc.v1.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CancelJobRequest, com.google.cloud.dataproc.v1.Job> - getCancelJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CancelJobRequest, com.google.cloud.dataproc.v1.Job> - getCancelJobMethod; - if ((getCancelJobMethod = JobControllerGrpc.getCancelJobMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getCancelJobMethod = JobControllerGrpc.getCancelJobMethod) == null) { - JobControllerGrpc.getCancelJobMethod = - getCancelJobMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.CancelJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("CancelJob")) - .build(); - } - } - } - return getCancelJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteJob", - requestType = com.google.cloud.dataproc.v1.DeleteJobRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethod; - if ((getDeleteJobMethod = JobControllerGrpc.getDeleteJobMethod) == null) { - synchronized (JobControllerGrpc.class) { - if ((getDeleteJobMethod = JobControllerGrpc.getDeleteJobMethod) == null) { - JobControllerGrpc.getDeleteJobMethod = - getDeleteJobMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DeleteJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("DeleteJob")) - .build(); - } - } - } - return getDeleteJobMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static JobControllerStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public JobControllerStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerStub(channel, callOptions); - } - }; - return JobControllerStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static JobControllerBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public JobControllerBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerBlockingStub(channel, callOptions); - } - }; - return JobControllerBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static JobControllerFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public JobControllerFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerFutureStub(channel, callOptions); - } - }; - return JobControllerFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The JobController provides methods to manage jobs.
-   * 
- */ - public abstract static class JobControllerImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Submits a job to a cluster.
-     * 
- */ - public void submitJob( - com.google.cloud.dataproc.v1.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSubmitJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public void submitJobAsOperation( - com.google.cloud.dataproc.v1.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSubmitJobAsOperationMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public void getJob( - com.google.cloud.dataproc.v1.GetJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public void listJobs( - com.google.cloud.dataproc.v1.ListJobsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public void updateJob( - com.google.cloud.dataproc.v1.UpdateJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Starts a job cancellation request. To access the job resource
-     * after cancellation, call
-     * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
-     * 
- */ - public void cancelJob( - com.google.cloud.dataproc.v1.CancelJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes the job from the project. If the job is active, the delete fails,
-     * and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public void deleteJob( - com.google.cloud.dataproc.v1.DeleteJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSubmitJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.SubmitJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_SUBMIT_JOB))) - .addMethod( - getSubmitJobAsOperationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.SubmitJobRequest, - com.google.longrunning.Operation>(this, METHODID_SUBMIT_JOB_AS_OPERATION))) - .addMethod( - getGetJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetJobRequest, com.google.cloud.dataproc.v1.Job>( - this, METHODID_GET_JOB))) - .addMethod( - getListJobsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListJobsRequest, - com.google.cloud.dataproc.v1.ListJobsResponse>(this, METHODID_LIST_JOBS))) - .addMethod( - getUpdateJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_UPDATE_JOB))) - .addMethod( - getCancelJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CancelJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_CANCEL_JOB))) - .addMethod( - getDeleteJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteJobRequest, com.google.protobuf.Empty>( - this, METHODID_DELETE_JOB))) - .build(); - } - } - - /** - * - * - *
-   * The JobController provides methods to manage jobs.
-   * 
- */ - public static final class JobControllerStub - extends io.grpc.stub.AbstractAsyncStub { - private JobControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected JobControllerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerStub(channel, callOptions); - } - - /** - * - * - *
-     * Submits a job to a cluster.
-     * 
- */ - public void submitJob( - com.google.cloud.dataproc.v1.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSubmitJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public void submitJobAsOperation( - com.google.cloud.dataproc.v1.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSubmitJobAsOperationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public void getJob( - com.google.cloud.dataproc.v1.GetJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public void listJobs( - com.google.cloud.dataproc.v1.ListJobsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public void updateJob( - com.google.cloud.dataproc.v1.UpdateJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Starts a job cancellation request. To access the job resource
-     * after cancellation, call
-     * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
-     * 
- */ - public void cancelJob( - com.google.cloud.dataproc.v1.CancelJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCancelJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Deletes the job from the project. If the job is active, the delete fails,
-     * and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public void deleteJob( - com.google.cloud.dataproc.v1.DeleteJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - * - * - *
-   * The JobController provides methods to manage jobs.
-   * 
- */ - public static final class JobControllerBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private JobControllerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected JobControllerBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Submits a job to a cluster.
-     * 
- */ - public com.google.cloud.dataproc.v1.Job submitJob( - com.google.cloud.dataproc.v1.SubmitJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSubmitJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public com.google.longrunning.Operation submitJobAsOperation( - com.google.cloud.dataproc.v1.SubmitJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSubmitJobAsOperationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1.Job getJob( - com.google.cloud.dataproc.v1.GetJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1.ListJobsResponse listJobs( - com.google.cloud.dataproc.v1.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListJobsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1.Job updateJob( - com.google.cloud.dataproc.v1.UpdateJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Starts a job cancellation request. To access the job resource
-     * after cancellation, call
-     * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
-     * 
- */ - public com.google.cloud.dataproc.v1.Job cancelJob( - com.google.cloud.dataproc.v1.CancelJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCancelJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes the job from the project. If the job is active, the delete fails,
-     * and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public com.google.protobuf.Empty deleteJob( - com.google.cloud.dataproc.v1.DeleteJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteJobMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The JobController provides methods to manage jobs.
-   * 
- */ - public static final class JobControllerFutureStub - extends io.grpc.stub.AbstractFutureStub { - private JobControllerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected JobControllerFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new JobControllerFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Submits a job to a cluster.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - submitJob(com.google.cloud.dataproc.v1.SubmitJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSubmitJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - submitJobAsOperation(com.google.cloud.dataproc.v1.SubmitJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSubmitJobAsOperationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getJob(com.google.cloud.dataproc.v1.GetJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.ListJobsResponse> - listJobs(com.google.cloud.dataproc.v1.ListJobsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListJobsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateJob(com.google.cloud.dataproc.v1.UpdateJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Starts a job cancellation request. To access the job resource
-     * after cancellation, call
-     * [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - cancelJob(com.google.cloud.dataproc.v1.CancelJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCancelJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes the job from the project. If the job is active, the delete fails,
-     * and the response returns `FAILED_PRECONDITION`.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteJob( - com.google.cloud.dataproc.v1.DeleteJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteJobMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SUBMIT_JOB = 0; - private static final int METHODID_SUBMIT_JOB_AS_OPERATION = 1; - private static final int METHODID_GET_JOB = 2; - private static final int METHODID_LIST_JOBS = 3; - private static final int METHODID_UPDATE_JOB = 4; - private static final int METHODID_CANCEL_JOB = 5; - private static final int METHODID_DELETE_JOB = 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 JobControllerImplBase serviceImpl; - private final int methodId; - - MethodHandlers(JobControllerImplBase 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_SUBMIT_JOB: - serviceImpl.submitJob( - (com.google.cloud.dataproc.v1.SubmitJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SUBMIT_JOB_AS_OPERATION: - serviceImpl.submitJobAsOperation( - (com.google.cloud.dataproc.v1.SubmitJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_JOB: - serviceImpl.getJob( - (com.google.cloud.dataproc.v1.GetJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_JOBS: - serviceImpl.listJobs( - (com.google.cloud.dataproc.v1.ListJobsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_JOB: - serviceImpl.updateJob( - (com.google.cloud.dataproc.v1.UpdateJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CANCEL_JOB: - serviceImpl.cancelJob( - (com.google.cloud.dataproc.v1.CancelJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_JOB: - serviceImpl.deleteJob( - (com.google.cloud.dataproc.v1.DeleteJobRequest) 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 JobControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - JobControllerBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("JobController"); - } - } - - private static final class JobControllerFileDescriptorSupplier - extends JobControllerBaseDescriptorSupplier { - JobControllerFileDescriptorSupplier() {} - } - - private static final class JobControllerMethodDescriptorSupplier - extends JobControllerBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - JobControllerMethodDescriptorSupplier(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 (JobControllerGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new JobControllerFileDescriptorSupplier()) - .addMethod(getSubmitJobMethod()) - .addMethod(getSubmitJobAsOperationMethod()) - .addMethod(getGetJobMethod()) - .addMethod(getListJobsMethod()) - .addMethod(getUpdateJobMethod()) - .addMethod(getCancelJobMethod()) - .addMethod(getDeleteJobMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceGrpc.java deleted file mode 100644 index 3b23792f..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceGrpc.java +++ /dev/null @@ -1,1264 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataproc.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * The API interface for managing Workflow Templates in the
- * Dataproc API.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/workflow_templates.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class WorkflowTemplateServiceGrpc { - - private WorkflowTemplateServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1.WorkflowTemplateService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getCreateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getCreateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getCreateWorkflowTemplateMethod; - if ((getCreateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getCreateWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getCreateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getCreateWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getCreateWorkflowTemplateMethod = - getCreateWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "CreateWorkflowTemplate")) - .build(); - } - } - } - return getCreateWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getGetWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getGetWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getGetWorkflowTemplateMethod; - if ((getGetWorkflowTemplateMethod = WorkflowTemplateServiceGrpc.getGetWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getGetWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getGetWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getGetWorkflowTemplateMethod = - getGetWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "GetWorkflowTemplate")) - .build(); - } - } - } - return getGetWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "InstantiateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateWorkflowTemplateMethod; - if ((getInstantiateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getInstantiateWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getInstantiateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getInstantiateWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getInstantiateWorkflowTemplateMethod = - getInstantiateWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "InstantiateWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "InstantiateWorkflowTemplate")) - .build(); - } - } - } - return getInstantiateWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateInlineWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "InstantiateInlineWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateInlineWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateInlineWorkflowTemplateMethod; - if ((getInstantiateInlineWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getInstantiateInlineWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getInstantiateInlineWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getInstantiateInlineWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getInstantiateInlineWorkflowTemplateMethod = - getInstantiateInlineWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "InstantiateInlineWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "InstantiateInlineWorkflowTemplate")) - .build(); - } - } - } - return getInstantiateInlineWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getUpdateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getUpdateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate> - getUpdateWorkflowTemplateMethod; - if ((getUpdateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getUpdateWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getUpdateWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getUpdateWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getUpdateWorkflowTemplateMethod = - getUpdateWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "UpdateWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "UpdateWorkflowTemplate")) - .build(); - } - } - } - return getUpdateWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse> - getListWorkflowTemplatesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListWorkflowTemplates", - requestType = com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.class, - responseType = com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse> - getListWorkflowTemplatesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse> - getListWorkflowTemplatesMethod; - if ((getListWorkflowTemplatesMethod = - WorkflowTemplateServiceGrpc.getListWorkflowTemplatesMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getListWorkflowTemplatesMethod = - WorkflowTemplateServiceGrpc.getListWorkflowTemplatesMethod) - == null) { - WorkflowTemplateServiceGrpc.getListWorkflowTemplatesMethod = - getListWorkflowTemplatesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListWorkflowTemplates")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "ListWorkflowTemplates")) - .build(); - } - } - } - return getListWorkflowTemplatesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest, com.google.protobuf.Empty> - getDeleteWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest, com.google.protobuf.Empty> - getDeleteWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest, com.google.protobuf.Empty> - getDeleteWorkflowTemplateMethod; - if ((getDeleteWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getDeleteWorkflowTemplateMethod) - == null) { - synchronized (WorkflowTemplateServiceGrpc.class) { - if ((getDeleteWorkflowTemplateMethod = - WorkflowTemplateServiceGrpc.getDeleteWorkflowTemplateMethod) - == null) { - WorkflowTemplateServiceGrpc.getDeleteWorkflowTemplateMethod = - getDeleteWorkflowTemplateMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteWorkflowTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "DeleteWorkflowTemplate")) - .build(); - } - } - } - return getDeleteWorkflowTemplateMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static WorkflowTemplateServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowTemplateServiceStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceStub(channel, callOptions); - } - }; - return WorkflowTemplateServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static WorkflowTemplateServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowTemplateServiceBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceBlockingStub(channel, callOptions); - } - }; - return WorkflowTemplateServiceBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static WorkflowTemplateServiceFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowTemplateServiceFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceFutureStub(channel, callOptions); - } - }; - return WorkflowTemplateServiceFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * The API interface for managing Workflow Templates in the
-   * Dataproc API.
-   * 
- */ - public abstract static class WorkflowTemplateServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates new workflow template.
-     * 
- */ - public void createWorkflowTemplate( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves the latest workflow template.
-     * Can retrieve previously instantiated template by specifying optional
-     * version parameter.
-     * 
- */ - public void getWorkflowTemplate( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void instantiateWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getInstantiateWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void instantiateInlineWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getInstantiateInlineWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates (replaces) workflow template. The updated template
-     * must contain version that matches the current server version.
-     * 
- */ - public void updateWorkflowTemplate( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public void listWorkflowTemplates( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListWorkflowTemplatesMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow template. It does not cancel in-progress workflows.
-     * 
- */ - public void deleteWorkflowTemplate( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteWorkflowTemplateMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_CREATE_WORKFLOW_TEMPLATE))) - .addMethod( - getGetWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_GET_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateInlineWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE))) - .addMethod( - getUpdateWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_UPDATE_WORKFLOW_TEMPLATE))) - .addMethod( - getListWorkflowTemplatesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse>( - this, METHODID_LIST_WORKFLOW_TEMPLATES))) - .addMethod( - getDeleteWorkflowTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_WORKFLOW_TEMPLATE))) - .build(); - } - } - - /** - * - * - *
-   * The API interface for managing Workflow Templates in the
-   * Dataproc API.
-   * 
- */ - public static final class WorkflowTemplateServiceStub - extends io.grpc.stub.AbstractAsyncStub { - private WorkflowTemplateServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowTemplateServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new workflow template.
-     * 
- */ - public void createWorkflowTemplate( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the latest workflow template.
-     * Can retrieve previously instantiated template by specifying optional
-     * version parameter.
-     * 
- */ - public void getWorkflowTemplate( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void instantiateWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getInstantiateWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void instantiateInlineWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getInstantiateInlineWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates (replaces) workflow template. The updated template
-     * must contain version that matches the current server version.
-     * 
- */ - public void updateWorkflowTemplate( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public void listWorkflowTemplates( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListWorkflowTemplatesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow template. It does not cancel in-progress workflows.
-     * 
- */ - public void deleteWorkflowTemplate( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The API interface for managing Workflow Templates in the
-   * Dataproc API.
-   * 
- */ - public static final class WorkflowTemplateServiceBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private WorkflowTemplateServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowTemplateServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new workflow template.
-     * 
- */ - public com.google.cloud.dataproc.v1.WorkflowTemplate createWorkflowTemplate( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves the latest workflow template.
-     * Can retrieve previously instantiated template by specifying optional
-     * version parameter.
-     * 
- */ - public com.google.cloud.dataproc.v1.WorkflowTemplate getWorkflowTemplate( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.longrunning.Operation instantiateWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getInstantiateWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.longrunning.Operation instantiateInlineWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getInstantiateInlineWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates (replaces) workflow template. The updated template
-     * must contain version that matches the current server version.
-     * 
- */ - public com.google.cloud.dataproc.v1.WorkflowTemplate updateWorkflowTemplate( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse listWorkflowTemplates( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListWorkflowTemplatesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a workflow template. It does not cancel in-progress workflows.
-     * 
- */ - public com.google.protobuf.Empty deleteWorkflowTemplate( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteWorkflowTemplateMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The API interface for managing Workflow Templates in the
-   * Dataproc API.
-   * 
- */ - public static final class WorkflowTemplateServiceFutureStub - extends io.grpc.stub.AbstractFutureStub { - private WorkflowTemplateServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowTemplateServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowTemplateServiceFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates new workflow template.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.WorkflowTemplate> - createWorkflowTemplate(com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateWorkflowTemplateMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves the latest workflow template.
-     * Can retrieve previously instantiated template by specifying optional
-     * version parameter.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.WorkflowTemplate> - getWorkflowTemplate(com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetWorkflowTemplateMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - instantiateWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getInstantiateWorkflowTemplateMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
-     * The returned Operation can be used to track execution of
-     * workflow by polling
-     * [operations.get][google.longrunning.Operations.GetOperation].
-     * The Operation will complete when entire workflow is finished.
-     * The running workflow can be aborted via
-     * [operations.cancel][google.longrunning.Operations.CancelOperation].
-     * This will cause any inflight jobs to be cancelled and workflow-owned
-     * clusters to be deleted.
-     * The [Operation.metadata][google.longrunning.Operation.metadata] will be
-     * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
-     * Also see [Using
-     * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
-     * On successful completion,
-     * [Operation.response][google.longrunning.Operation.response] will be
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - instantiateInlineWorkflowTemplate( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getInstantiateInlineWorkflowTemplateMethod(), getCallOptions()), - request); - } - - /** - * - * - *
-     * Updates (replaces) workflow template. The updated template
-     * must contain version that matches the current server version.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.WorkflowTemplate> - updateWorkflowTemplate(com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateWorkflowTemplateMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse> - listWorkflowTemplates(com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListWorkflowTemplatesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a workflow template. It does not cancel in-progress workflows.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteWorkflowTemplate(com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteWorkflowTemplateMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_WORKFLOW_TEMPLATE = 0; - private static final int METHODID_GET_WORKFLOW_TEMPLATE = 1; - private static final int METHODID_INSTANTIATE_WORKFLOW_TEMPLATE = 2; - private static final int METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE = 3; - private static final int METHODID_UPDATE_WORKFLOW_TEMPLATE = 4; - private static final int METHODID_LIST_WORKFLOW_TEMPLATES = 5; - private static final int METHODID_DELETE_WORKFLOW_TEMPLATE = 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 WorkflowTemplateServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(WorkflowTemplateServiceImplBase 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_CREATE_WORKFLOW_TEMPLATE: - serviceImpl.createWorkflowTemplate( - (com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_WORKFLOW_TEMPLATE: - serviceImpl.getWorkflowTemplate( - (com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_INSTANTIATE_WORKFLOW_TEMPLATE: - serviceImpl.instantiateWorkflowTemplate( - (com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE: - serviceImpl.instantiateInlineWorkflowTemplate( - (com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_WORKFLOW_TEMPLATE: - serviceImpl.updateWorkflowTemplate( - (com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_WORKFLOW_TEMPLATES: - serviceImpl.listWorkflowTemplates( - (com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse>) - responseObserver); - break; - case METHODID_DELETE_WORKFLOW_TEMPLATE: - serviceImpl.deleteWorkflowTemplate( - (com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) 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 WorkflowTemplateServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - WorkflowTemplateServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("WorkflowTemplateService"); - } - } - - private static final class WorkflowTemplateServiceFileDescriptorSupplier - extends WorkflowTemplateServiceBaseDescriptorSupplier { - WorkflowTemplateServiceFileDescriptorSupplier() {} - } - - private static final class WorkflowTemplateServiceMethodDescriptorSupplier - extends WorkflowTemplateServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - WorkflowTemplateServiceMethodDescriptorSupplier(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 (WorkflowTemplateServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new WorkflowTemplateServiceFileDescriptorSupplier()) - .addMethod(getCreateWorkflowTemplateMethod()) - .addMethod(getGetWorkflowTemplateMethod()) - .addMethod(getInstantiateWorkflowTemplateMethod()) - .addMethod(getInstantiateInlineWorkflowTemplateMethod()) - .addMethod(getUpdateWorkflowTemplateMethod()) - .addMethod(getListWorkflowTemplatesMethod()) - .addMethod(getDeleteWorkflowTemplateMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java.header b/java.header deleted file mode 100644 index d0970ba7..00000000 --- a/java.header +++ /dev/null @@ -1,15 +0,0 @@ -^/\*$ -^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ -^ \*$ -^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ -^ \* you may not use this file except in compliance with the License\.$ -^ \* You may obtain a copy of the License at$ -^ \*$ -^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ -^ \*$ -^ \* Unless required by applicable law or agreed to in writing, software$ -^ \* distributed under the License is distributed on an "AS IS" BASIS,$ -^ \* WITHOUT 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 deleted file mode 100644 index 6597fced..00000000 --- a/license-checks.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index dca9d867..00000000 --- a/owlbot.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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() diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 6f4e5205..00000000 --- a/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc-parent - pom - 2.3.3-SNAPSHOT - Google Cloud Dataproc Parent - https://github.com/googleapis/java-dataproc - - Java idiomatic client for Google Cloud Platform services. - - - - com.google.cloud - google-cloud-shared-config - 1.2.7 - - - - - chingor - Jeff Ching - chingor@google.com - Google - - Developer - - - - - Google LLC - - - scm:git:git@github.com:googleapis/java-dataproc.git - scm:git:git@github.com:googleapis/java-dataproc.git - https://github.com/googleapis/java-dataproc - HEAD - - - https://github.com/googleapis/java-dataproc/issues - GitHub Issues - - - - - Apache-2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - UTF-8 - UTF-8 - github - google-cloud-dataproc-parent - - - - - - com.google.api.grpc - proto-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - - - com.google.cloud - google-cloud-dataproc - 2.3.3-SNAPSHOT - - - - com.google.cloud - google-cloud-shared-dependencies - 2.7.0 - pom - import - - - - junit - junit - 4.13.2 - test - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - org.objenesis:objenesis - javax.annotation:javax.annotation-api - - - - - - - - - google-cloud-dataproc - grpc-google-cloud-dataproc-v1 - proto-google-cloud-dataproc-v1 - google-cloud-dataproc-bom - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 3.2.2 - - - - 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.3.2 - - - 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/ - - - - - - diff --git a/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml b/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml deleted file mode 100644 index 7e2d1323..00000000 --- a/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - 7012 - com/google/cloud/dataproc/v1/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/dataproc/v1/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/dataproc/v1/*OrBuilder - boolean has*(*) - - - 7002 - com/google/cloud/dataproc/v1/ClusterConfig - * *GkeClusterConfig*(*) - - - 7002 - com/google/cloud/dataproc/v1/ClusterConfig$Builder - * GkeClusterConfig*(*) - - - 7002 - com/google/cloud/dataproc/v1/ClusterConfig$Builder - * *GkeCluster*(*) - - - 7002 - com/google/cloud/dataproc/v1/ClusterConfigOrBuilder - * *GkeCluster*(*) - - - 7002 - com/google/cloud/dataproc/v1/GkeClusterConfig - * *GkeDeploymentTarget*(*) - - - 7002 - com/google/cloud/dataproc/v1/GkeClusterConfig$Builder - * *NamespacedGkeDeploymentTarget*(*) - - - 8001 - com/google/cloud/dataproc/v1/GkeClusterConfig$NamespacedGkeDeploymentTarget* - - - 7002 - com/google/cloud/dataproc/v1/GkeClusterConfigOrBuilder - * *NamespacedGkeDeploymentTarget*(*) - - - 6011 - com/google/cloud/dataproc/v1/ClusterConfig - GKE_CLUSTER_CONFIG_FIELD_NUMBER - - - 6011 - com/google/cloud/dataproc/v1/GkeClusterConfig - NAMESPACED_GKE_DEPLOYMENT_TARGET_FIELD_NUMBER - - diff --git a/proto-google-cloud-dataproc-v1/pom.xml b/proto-google-cloud-dataproc-v1/pom.xml deleted file mode 100644 index 847a022a..00000000 --- a/proto-google-cloud-dataproc-v1/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-dataproc-v1 - 2.3.3-SNAPSHOT - proto-google-cloud-dataproc-v1 - PROTO library for proto-google-cloud-dataproc-v1 - - com.google.cloud - google-cloud-dataproc-parent - 2.3.3-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfig.java deleted file mode 100644 index 46edc5f0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfig.java +++ /dev/null @@ -1,812 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies the type and number of accelerator cards attached to the instances
- * of an instance. See [GPUs on Compute
- * Engine](https://cloud.google.com/compute/docs/gpus/).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AcceleratorConfig} - */ -public final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.AcceleratorConfig) - AcceleratorConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AcceleratorConfig.newBuilder() to construct. - private AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AcceleratorConfig() { - acceleratorTypeUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AcceleratorConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AcceleratorConfig( - 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(); - - acceleratorTypeUri_ = s; - break; - } - case 16: - { - acceleratorCount_ = input.readInt32(); - 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AcceleratorConfig.class, - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder.class); - } - - public static final int ACCELERATOR_TYPE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object acceleratorTypeUri_; - /** - * - * - *
-   * Full URL, partial URI, or short name of the accelerator type resource to
-   * expose to this instance. See
-   * [Compute Engine
-   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-   * Examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `nvidia-tesla-k80`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the accelerator type
-   * resource, for example, `nvidia-tesla-k80`.
-   * 
- * - * string accelerator_type_uri = 1; - * - * @return The acceleratorTypeUri. - */ - @java.lang.Override - public java.lang.String getAcceleratorTypeUri() { - java.lang.Object ref = acceleratorTypeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - acceleratorTypeUri_ = s; - return s; - } - } - /** - * - * - *
-   * Full URL, partial URI, or short name of the accelerator type resource to
-   * expose to this instance. See
-   * [Compute Engine
-   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-   * Examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `nvidia-tesla-k80`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the accelerator type
-   * resource, for example, `nvidia-tesla-k80`.
-   * 
- * - * string accelerator_type_uri = 1; - * - * @return The bytes for acceleratorTypeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAcceleratorTypeUriBytes() { - java.lang.Object ref = acceleratorTypeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - acceleratorTypeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 2; - private int acceleratorCount_; - /** - * - * - *
-   * The number of the accelerator cards of this type exposed to this instance.
-   * 
- * - * int32 accelerator_count = 2; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public int getAcceleratorCount() { - return acceleratorCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorTypeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, acceleratorTypeUri_); - } - if (acceleratorCount_ != 0) { - output.writeInt32(2, acceleratorCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorTypeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, acceleratorTypeUri_); - } - if (acceleratorCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, acceleratorCount_); - } - 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.dataproc.v1.AcceleratorConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.AcceleratorConfig other = - (com.google.cloud.dataproc.v1.AcceleratorConfig) obj; - - if (!getAcceleratorTypeUri().equals(other.getAcceleratorTypeUri())) return false; - if (getAcceleratorCount() != other.getAcceleratorCount()) 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_URI_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorTypeUri().hashCode(); - hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig 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.dataproc.v1.AcceleratorConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig parseFrom( - 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.dataproc.v1.AcceleratorConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig 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.dataproc.v1.AcceleratorConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig 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.dataproc.v1.AcceleratorConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig 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.dataproc.v1.AcceleratorConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies the type and number of accelerator cards attached to the instances
-   * of an instance. See [GPUs on Compute
-   * Engine](https://cloud.google.com/compute/docs/gpus/).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AcceleratorConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.AcceleratorConfig) - com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AcceleratorConfig.class, - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.AcceleratorConfig.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(); - acceleratorTypeUri_ = ""; - - acceleratorCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AcceleratorConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AcceleratorConfig build() { - com.google.cloud.dataproc.v1.AcceleratorConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AcceleratorConfig buildPartial() { - com.google.cloud.dataproc.v1.AcceleratorConfig result = - new com.google.cloud.dataproc.v1.AcceleratorConfig(this); - result.acceleratorTypeUri_ = acceleratorTypeUri_; - result.acceleratorCount_ = acceleratorCount_; - 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.dataproc.v1.AcceleratorConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.AcceleratorConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.AcceleratorConfig other) { - if (other == com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance()) return this; - if (!other.getAcceleratorTypeUri().isEmpty()) { - acceleratorTypeUri_ = other.acceleratorTypeUri_; - onChanged(); - } - if (other.getAcceleratorCount() != 0) { - setAcceleratorCount(other.getAcceleratorCount()); - } - 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.dataproc.v1.AcceleratorConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.AcceleratorConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object acceleratorTypeUri_ = ""; - /** - * - * - *
-     * Full URL, partial URI, or short name of the accelerator type resource to
-     * expose to this instance. See
-     * [Compute Engine
-     * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-     * Examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `nvidia-tesla-k80`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the accelerator type
-     * resource, for example, `nvidia-tesla-k80`.
-     * 
- * - * string accelerator_type_uri = 1; - * - * @return The acceleratorTypeUri. - */ - public java.lang.String getAcceleratorTypeUri() { - java.lang.Object ref = acceleratorTypeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - acceleratorTypeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Full URL, partial URI, or short name of the accelerator type resource to
-     * expose to this instance. See
-     * [Compute Engine
-     * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-     * Examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `nvidia-tesla-k80`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the accelerator type
-     * resource, for example, `nvidia-tesla-k80`.
-     * 
- * - * string accelerator_type_uri = 1; - * - * @return The bytes for acceleratorTypeUri. - */ - public com.google.protobuf.ByteString getAcceleratorTypeUriBytes() { - java.lang.Object ref = acceleratorTypeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - acceleratorTypeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Full URL, partial URI, or short name of the accelerator type resource to
-     * expose to this instance. See
-     * [Compute Engine
-     * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-     * Examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `nvidia-tesla-k80`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the accelerator type
-     * resource, for example, `nvidia-tesla-k80`.
-     * 
- * - * string accelerator_type_uri = 1; - * - * @param value The acceleratorTypeUri to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorTypeUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - acceleratorTypeUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Full URL, partial URI, or short name of the accelerator type resource to
-     * expose to this instance. See
-     * [Compute Engine
-     * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-     * Examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `nvidia-tesla-k80`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the accelerator type
-     * resource, for example, `nvidia-tesla-k80`.
-     * 
- * - * string accelerator_type_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorTypeUri() { - - acceleratorTypeUri_ = getDefaultInstance().getAcceleratorTypeUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Full URL, partial URI, or short name of the accelerator type resource to
-     * expose to this instance. See
-     * [Compute Engine
-     * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-     * Examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-     * * `nvidia-tesla-k80`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the accelerator type
-     * resource, for example, `nvidia-tesla-k80`.
-     * 
- * - * string accelerator_type_uri = 1; - * - * @param value The bytes for acceleratorTypeUri to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorTypeUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - acceleratorTypeUri_ = value; - onChanged(); - return this; - } - - private int acceleratorCount_; - /** - * - * - *
-     * The number of the accelerator cards of this type exposed to this instance.
-     * 
- * - * int32 accelerator_count = 2; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public int getAcceleratorCount() { - return acceleratorCount_; - } - /** - * - * - *
-     * The number of the accelerator cards of this type exposed to this instance.
-     * 
- * - * int32 accelerator_count = 2; - * - * @param value The acceleratorCount to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorCount(int value) { - - acceleratorCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The number of the accelerator cards of this type exposed to this instance.
-     * 
- * - * int32 accelerator_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorCount() { - - acceleratorCount_ = 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.dataproc.v1.AcceleratorConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.AcceleratorConfig) - private static final com.google.cloud.dataproc.v1.AcceleratorConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.AcceleratorConfig(); - } - - public static com.google.cloud.dataproc.v1.AcceleratorConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AcceleratorConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorConfig(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.dataproc.v1.AcceleratorConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfigOrBuilder.java deleted file mode 100644 index 5e557214..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfigOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface AcceleratorConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.AcceleratorConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Full URL, partial URI, or short name of the accelerator type resource to
-   * expose to this instance. See
-   * [Compute Engine
-   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-   * Examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `nvidia-tesla-k80`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the accelerator type
-   * resource, for example, `nvidia-tesla-k80`.
-   * 
- * - * string accelerator_type_uri = 1; - * - * @return The acceleratorTypeUri. - */ - java.lang.String getAcceleratorTypeUri(); - /** - * - * - *
-   * Full URL, partial URI, or short name of the accelerator type resource to
-   * expose to this instance. See
-   * [Compute Engine
-   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
-   * Examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80`
-   * * `nvidia-tesla-k80`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the accelerator type
-   * resource, for example, `nvidia-tesla-k80`.
-   * 
- * - * string accelerator_type_uri = 1; - * - * @return The bytes for acceleratorTypeUri. - */ - com.google.protobuf.ByteString getAcceleratorTypeUriBytes(); - - /** - * - * - *
-   * The number of the accelerator cards of this type exposed to this instance.
-   * 
- * - * int32 accelerator_count = 2; - * - * @return The acceleratorCount. - */ - int getAcceleratorCount(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfig.java deleted file mode 100644 index e8601269..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfig.java +++ /dev/null @@ -1,669 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Autoscaling Policy config associated with the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AutoscalingConfig} - */ -public final class AutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.AutoscalingConfig) - AutoscalingConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AutoscalingConfig.newBuilder() to construct. - private AutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AutoscalingConfig() { - policyUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AutoscalingConfig( - 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(); - - policyUri_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AutoscalingConfig.class, - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder.class); - } - - public static final int POLICY_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object policyUri_; - /** - * - * - *
-   * Optional. The autoscaling policy used by the cluster.
-   * Only resource names including projectid and location (region) are valid.
-   * Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * Note that the policy must be in the same project and Dataproc region.
-   * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The policyUri. - */ - @java.lang.Override - public java.lang.String getPolicyUri() { - java.lang.Object ref = policyUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The autoscaling policy used by the cluster.
-   * Only resource names including projectid and location (region) are valid.
-   * Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * Note that the policy must be in the same project and Dataproc region.
-   * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for policyUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPolicyUriBytes() { - java.lang.Object ref = policyUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, policyUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, policyUri_); - } - 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.dataproc.v1.AutoscalingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.AutoscalingConfig other = - (com.google.cloud.dataproc.v1.AutoscalingConfig) obj; - - if (!getPolicyUri().equals(other.getPolicyUri())) 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) + POLICY_URI_FIELD_NUMBER; - hash = (53 * hash) + getPolicyUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig 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.dataproc.v1.AutoscalingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig parseFrom( - 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.dataproc.v1.AutoscalingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig 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.dataproc.v1.AutoscalingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig 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.dataproc.v1.AutoscalingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig 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.dataproc.v1.AutoscalingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Autoscaling Policy config associated with the cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AutoscalingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.AutoscalingConfig) - com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AutoscalingConfig.class, - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.AutoscalingConfig.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(); - policyUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.AutoscalingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingConfig build() { - com.google.cloud.dataproc.v1.AutoscalingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingConfig buildPartial() { - com.google.cloud.dataproc.v1.AutoscalingConfig result = - new com.google.cloud.dataproc.v1.AutoscalingConfig(this); - result.policyUri_ = policyUri_; - 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.dataproc.v1.AutoscalingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.AutoscalingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.AutoscalingConfig other) { - if (other == com.google.cloud.dataproc.v1.AutoscalingConfig.getDefaultInstance()) return this; - if (!other.getPolicyUri().isEmpty()) { - policyUri_ = other.policyUri_; - 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.dataproc.v1.AutoscalingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.AutoscalingConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object policyUri_ = ""; - /** - * - * - *
-     * Optional. The autoscaling policy used by the cluster.
-     * Only resource names including projectid and location (region) are valid.
-     * Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * Note that the policy must be in the same project and Dataproc region.
-     * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The policyUri. - */ - public java.lang.String getPolicyUri() { - java.lang.Object ref = policyUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The autoscaling policy used by the cluster.
-     * Only resource names including projectid and location (region) are valid.
-     * Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * Note that the policy must be in the same project and Dataproc region.
-     * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for policyUri. - */ - public com.google.protobuf.ByteString getPolicyUriBytes() { - java.lang.Object ref = policyUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - policyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The autoscaling policy used by the cluster.
-     * Only resource names including projectid and location (region) are valid.
-     * Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * Note that the policy must be in the same project and Dataproc region.
-     * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The policyUri to set. - * @return This builder for chaining. - */ - public Builder setPolicyUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - policyUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The autoscaling policy used by the cluster.
-     * Only resource names including projectid and location (region) are valid.
-     * Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * Note that the policy must be in the same project and Dataproc region.
-     * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPolicyUri() { - - policyUri_ = getDefaultInstance().getPolicyUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The autoscaling policy used by the cluster.
-     * Only resource names including projectid and location (region) are valid.
-     * Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-     * Note that the policy must be in the same project and Dataproc region.
-     * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for policyUri to set. - * @return This builder for chaining. - */ - public Builder setPolicyUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - policyUri_ = 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.dataproc.v1.AutoscalingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.AutoscalingConfig) - private static final com.google.cloud.dataproc.v1.AutoscalingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.AutoscalingConfig(); - } - - public static com.google.cloud.dataproc.v1.AutoscalingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AutoscalingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingConfig(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.dataproc.v1.AutoscalingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfigOrBuilder.java deleted file mode 100644 index f9438be4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfigOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface AutoscalingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.AutoscalingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The autoscaling policy used by the cluster.
-   * Only resource names including projectid and location (region) are valid.
-   * Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * Note that the policy must be in the same project and Dataproc region.
-   * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The policyUri. - */ - java.lang.String getPolicyUri(); - /** - * - * - *
-   * Optional. The autoscaling policy used by the cluster.
-   * Only resource names including projectid and location (region) are valid.
-   * Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]`
-   * Note that the policy must be in the same project and Dataproc region.
-   * 
- * - * string policy_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for policyUri. - */ - com.google.protobuf.ByteString getPolicyUriBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java deleted file mode 100644 index 838b0319..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public final class AutoscalingPoliciesProto { - private AutoscalingPoliciesProto() {} - - 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_dataproc_v1_AutoscalingPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n3google/cloud/dataproc/v1/autoscaling_p" - + "olicies.proto\022\030google.cloud.dataproc.v1\032" - + "\034google/api/annotations.proto\032\027google/ap" - + "i/client.proto\032\037google/api/field_behavio" - + "r.proto\032\031google/api/resource.proto\032\036goog" - + "le/protobuf/duration.proto\032\033google/proto" - + "buf/empty.proto\"\245\005\n\021AutoscalingPolicy\022\n\n" - + "\002id\030\001 \001(\t\022\021\n\004name\030\002 \001(\tB\003\340A\003\022S\n\017basic_al" - + "gorithm\030\003 \001(\01323.google.cloud.dataproc.v1" - + ".BasicAutoscalingAlgorithmB\003\340A\002H\000\022Z\n\rwor" - + "ker_config\030\004 \001(\0132>.google.cloud.dataproc" - + ".v1.InstanceGroupAutoscalingPolicyConfig" - + "B\003\340A\002\022d\n\027secondary_worker_config\030\005 \001(\0132>" - + ".google.cloud.dataproc.v1.InstanceGroupA" - + "utoscalingPolicyConfigB\003\340A\001\022L\n\006labels\030\006 " - + "\003(\01327.google.cloud.dataproc.v1.Autoscali" - + "ngPolicy.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\317\001\352A\313\001\n" - + ")dataproc.googleapis.com/AutoscalingPoli" - + "cy\022Pprojects/{project}/locations/{locati" - + "on}/autoscalingPolicies/{autoscaling_pol" - + "icy}\022Lprojects/{project}/regions/{region" - + "}/autoscalingPolicies/{autoscaling_polic" - + "y}B\013\n\talgorithm\"\244\001\n\031BasicAutoscalingAlgo" - + "rithm\022N\n\013yarn_config\030\001 \001(\01324.google.clou" - + "d.dataproc.v1.BasicYarnAutoscalingConfig" - + "B\003\340A\002\0227\n\017cooldown_period\030\002 \001(\0132\031.google." - + "protobuf.DurationB\003\340A\001\"\371\001\n\032BasicYarnAuto" - + "scalingConfig\022E\n\035graceful_decommission_t" - + "imeout\030\005 \001(\0132\031.google.protobuf.DurationB" - + "\003\340A\002\022\034\n\017scale_up_factor\030\001 \001(\001B\003\340A\002\022\036\n\021sc" - + "ale_down_factor\030\002 \001(\001B\003\340A\002\022)\n\034scale_up_m" - + "in_worker_fraction\030\003 \001(\001B\003\340A\001\022+\n\036scale_d" - + "own_min_worker_fraction\030\004 \001(\001B\003\340A\001\"s\n$In" - + "stanceGroupAutoscalingPolicyConfig\022\032\n\rmi" - + "n_instances\030\001 \001(\005B\003\340A\001\022\032\n\rmax_instances\030" - + "\002 \001(\005B\003\340A\002\022\023\n\006weight\030\003 \001(\005B\003\340A\001\"\245\001\n\036Crea" - + "teAutoscalingPolicyRequest\022A\n\006parent\030\001 \001" - + "(\tB1\340A\002\372A+\022)dataproc.googleapis.com/Auto" - + "scalingPolicy\022@\n\006policy\030\002 \001(\0132+.google.c" - + "loud.dataproc.v1.AutoscalingPolicyB\003\340A\002\"" - + "^\n\033GetAutoscalingPolicyRequest\022?\n\004name\030\001" - + " \001(\tB1\340A\002\372A+\n)dataproc.googleapis.com/Au" - + "toscalingPolicy\"b\n\036UpdateAutoscalingPoli" - + "cyRequest\022@\n\006policy\030\001 \001(\0132+.google.cloud" - + ".dataproc.v1.AutoscalingPolicyB\003\340A\002\"a\n\036D" - + "eleteAutoscalingPolicyRequest\022?\n\004name\030\001 " - + "\001(\tB1\340A\002\372A+\n)dataproc.googleapis.com/Aut" - + "oscalingPolicy\"\224\001\n\036ListAutoscalingPolici" - + "esRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)datap" - + "roc.googleapis.com/AutoscalingPolicy\022\026\n\t" - + "page_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\t" - + "B\003\340A\001\"\203\001\n\037ListAutoscalingPoliciesRespons" - + "e\022B\n\010policies\030\001 \003(\0132+.google.cloud.datap" - + "roc.v1.AutoscalingPolicyB\003\340A\003\022\034\n\017next_pa" - + "ge_token\030\002 \001(\tB\003\340A\0032\256\013\n\030AutoscalingPolic" - + "yService\022\234\002\n\027CreateAutoscalingPolicy\0228.g" - + "oogle.cloud.dataproc.v1.CreateAutoscalin" - + "gPolicyRequest\032+.google.cloud.dataproc.v" - + "1.AutoscalingPolicy\"\231\001\202\323\344\223\002\202\001\"7/v1/{pare" - + "nt=projects/*/locations/*}/autoscalingPo" - + "licies:\006policyZ?\"5/v1/{parent=projects/*" - + "/regions/*}/autoscalingPolicies:\006policy\332" - + "A\rparent,policy\022\243\002\n\027UpdateAutoscalingPol" - + "icy\0228.google.cloud.dataproc.v1.UpdateAut" - + "oscalingPolicyRequest\032+.google.cloud.dat" - + "aproc.v1.AutoscalingPolicy\"\240\001\202\323\344\223\002\220\001\032>/v" - + "1/{policy.name=projects/*/locations/*/au" - + "toscalingPolicies/*}:\006policyZF\032 - * Describes an autoscaling policy for Dataproc cluster autoscaler. - * - * - * Protobuf type {@code google.cloud.dataproc.v1.AutoscalingPolicy} - */ -public final class AutoscalingPolicy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.AutoscalingPolicy) - AutoscalingPolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use AutoscalingPolicy.newBuilder() to construct. - private AutoscalingPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AutoscalingPolicy() { - id_ = ""; - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingPolicy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AutoscalingPolicy( - 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(); - - id_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder subBuilder = null; - if (algorithmCase_ == 3) { - subBuilder = - ((com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_) - .toBuilder(); - } - algorithm_ = - input.readMessage( - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_); - algorithm_ = subBuilder.buildPartial(); - } - algorithmCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder subBuilder = - null; - if (workerConfig_ != null) { - subBuilder = workerConfig_.toBuilder(); - } - workerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(workerConfig_); - workerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder subBuilder = - null; - if (secondaryWorkerConfig_ != null) { - subBuilder = secondaryWorkerConfig_.toBuilder(); - } - secondaryWorkerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(secondaryWorkerConfig_); - secondaryWorkerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - 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; - } - 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AutoscalingPolicy.class, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder.class); - } - - private int algorithmCase_ = 0; - private java.lang.Object algorithm_; - - public enum AlgorithmCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BASIC_ALGORITHM(3), - ALGORITHM_NOT_SET(0); - private final int value; - - private AlgorithmCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AlgorithmCase valueOf(int value) { - return forNumber(value); - } - - public static AlgorithmCase forNumber(int value) { - switch (value) { - case 3: - return BASIC_ALGORITHM; - case 0: - return ALGORITHM_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AlgorithmCase getAlgorithmCase() { - return AlgorithmCase.forNumber(algorithmCase_); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - * - * - *
-   * Required. The policy id.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string id = 1; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The policy id.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string id = 1; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * string name = 2 [(.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 "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * string name = 2 [(.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 BASIC_ALGORITHM_FIELD_NUMBER = 3; - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the basicAlgorithm field is set. - */ - @java.lang.Override - public boolean hasBasicAlgorithm() { - return algorithmCase_ == 3; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The basicAlgorithm. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm getBasicAlgorithm() { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder - getBasicAlgorithmOrBuilder() { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - - public static final int WORKER_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig workerConfig_; - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workerConfig field is set. - */ - @java.lang.Override - public boolean hasWorkerConfig() { - return workerConfig_ != null; - } - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig getWorkerConfig() { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : workerConfig_; - } - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder() { - return getWorkerConfig(); - } - - public static final int SECONDARY_WORKER_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondaryWorkerConfig_; - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - @java.lang.Override - public boolean hasSecondaryWorkerConfig() { - return secondaryWorkerConfig_ != null; - } - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - getSecondaryWorkerConfig() { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - return getSecondaryWorkerConfig(); - } - - public static final int LABELS_FIELD_NUMBER = 6; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (algorithmCase_ == 3) { - output.writeMessage(3, (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_); - } - if (workerConfig_ != null) { - output.writeMessage(4, getWorkerConfig()); - } - if (secondaryWorkerConfig_ != null) { - output.writeMessage(5, getSecondaryWorkerConfig()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (algorithmCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_); - } - if (workerConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getWorkerConfig()); - } - if (secondaryWorkerConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSecondaryWorkerConfig()); - } - 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(6, labels__); - } - 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.dataproc.v1.AutoscalingPolicy)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.AutoscalingPolicy other = - (com.google.cloud.dataproc.v1.AutoscalingPolicy) obj; - - if (!getId().equals(other.getId())) return false; - if (!getName().equals(other.getName())) return false; - if (hasWorkerConfig() != other.hasWorkerConfig()) return false; - if (hasWorkerConfig()) { - if (!getWorkerConfig().equals(other.getWorkerConfig())) return false; - } - if (hasSecondaryWorkerConfig() != other.hasSecondaryWorkerConfig()) return false; - if (hasSecondaryWorkerConfig()) { - if (!getSecondaryWorkerConfig().equals(other.getSecondaryWorkerConfig())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getAlgorithmCase().equals(other.getAlgorithmCase())) return false; - switch (algorithmCase_) { - case 3: - if (!getBasicAlgorithm().equals(other.getBasicAlgorithm())) return false; - break; - case 0: - default: - } - 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) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasWorkerConfig()) { - hash = (37 * hash) + WORKER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getWorkerConfig().hashCode(); - } - if (hasSecondaryWorkerConfig()) { - hash = (37 * hash) + SECONDARY_WORKER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSecondaryWorkerConfig().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - switch (algorithmCase_) { - case 3: - hash = (37 * hash) + BASIC_ALGORITHM_FIELD_NUMBER; - hash = (53 * hash) + getBasicAlgorithm().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy 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.dataproc.v1.AutoscalingPolicy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy parseFrom( - 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.dataproc.v1.AutoscalingPolicy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy 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.dataproc.v1.AutoscalingPolicy parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy 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.dataproc.v1.AutoscalingPolicy parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy 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.dataproc.v1.AutoscalingPolicy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Describes an autoscaling policy for Dataproc cluster autoscaler.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AutoscalingPolicy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.AutoscalingPolicy) - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 6: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AutoscalingPolicy.class, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.AutoscalingPolicy.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(); - id_ = ""; - - name_ = ""; - - if (workerConfigBuilder_ == null) { - workerConfig_ = null; - } else { - workerConfig_ = null; - workerConfigBuilder_ = null; - } - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = null; - } else { - secondaryWorkerConfig_ = null; - secondaryWorkerConfigBuilder_ = null; - } - internalGetMutableLabels().clear(); - algorithmCase_ = 0; - algorithm_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_AutoscalingPolicy_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy build() { - com.google.cloud.dataproc.v1.AutoscalingPolicy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy buildPartial() { - com.google.cloud.dataproc.v1.AutoscalingPolicy result = - new com.google.cloud.dataproc.v1.AutoscalingPolicy(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - result.name_ = name_; - if (algorithmCase_ == 3) { - if (basicAlgorithmBuilder_ == null) { - result.algorithm_ = algorithm_; - } else { - result.algorithm_ = basicAlgorithmBuilder_.build(); - } - } - if (workerConfigBuilder_ == null) { - result.workerConfig_ = workerConfig_; - } else { - result.workerConfig_ = workerConfigBuilder_.build(); - } - if (secondaryWorkerConfigBuilder_ == null) { - result.secondaryWorkerConfig_ = secondaryWorkerConfig_; - } else { - result.secondaryWorkerConfig_ = secondaryWorkerConfigBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.algorithmCase_ = algorithmCase_; - 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.dataproc.v1.AutoscalingPolicy) { - return mergeFrom((com.google.cloud.dataproc.v1.AutoscalingPolicy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.AutoscalingPolicy other) { - if (other == com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasWorkerConfig()) { - mergeWorkerConfig(other.getWorkerConfig()); - } - if (other.hasSecondaryWorkerConfig()) { - mergeSecondaryWorkerConfig(other.getSecondaryWorkerConfig()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - switch (other.getAlgorithmCase()) { - case BASIC_ALGORITHM: - { - mergeBasicAlgorithm(other.getBasicAlgorithm()); - break; - } - case ALGORITHM_NOT_SET: - { - break; - } - } - 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.dataproc.v1.AutoscalingPolicy parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.AutoscalingPolicy) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int algorithmCase_ = 0; - private java.lang.Object algorithm_; - - public AlgorithmCase getAlgorithmCase() { - return AlgorithmCase.forNumber(algorithmCase_); - } - - public Builder clearAlgorithm() { - algorithmCase_ = 0; - algorithm_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Required. The policy id.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string id = 1; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The policy id.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string id = 1; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The policy id.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string id = 1; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The policy id.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string id = 1; - * - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The policy id.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string id = 1; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * string name = 2 [(.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 "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * string name = 2 [(.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 "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * string name = 2 [(.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 "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies`, the resource name of the
-     *   policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * string name = 2 [(.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 com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder> - basicAlgorithmBuilder_; - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the basicAlgorithm field is set. - */ - @java.lang.Override - public boolean hasBasicAlgorithm() { - return algorithmCase_ == 3; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The basicAlgorithm. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm getBasicAlgorithm() { - if (basicAlgorithmBuilder_ == null) { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } else { - if (algorithmCase_ == 3) { - return basicAlgorithmBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBasicAlgorithm(com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm value) { - if (basicAlgorithmBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - algorithm_ = value; - onChanged(); - } else { - basicAlgorithmBuilder_.setMessage(value); - } - algorithmCase_ = 3; - return this; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBasicAlgorithm( - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder builderForValue) { - if (basicAlgorithmBuilder_ == null) { - algorithm_ = builderForValue.build(); - onChanged(); - } else { - basicAlgorithmBuilder_.setMessage(builderForValue.build()); - } - algorithmCase_ = 3; - return this; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBasicAlgorithm( - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm value) { - if (basicAlgorithmBuilder_ == null) { - if (algorithmCase_ == 3 - && algorithm_ - != com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance()) { - algorithm_ = - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.newBuilder( - (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_) - .mergeFrom(value) - .buildPartial(); - } else { - algorithm_ = value; - } - onChanged(); - } else { - if (algorithmCase_ == 3) { - basicAlgorithmBuilder_.mergeFrom(value); - } - basicAlgorithmBuilder_.setMessage(value); - } - algorithmCase_ = 3; - return this; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBasicAlgorithm() { - if (basicAlgorithmBuilder_ == null) { - if (algorithmCase_ == 3) { - algorithmCase_ = 0; - algorithm_ = null; - onChanged(); - } - } else { - if (algorithmCase_ == 3) { - algorithmCase_ = 0; - algorithm_ = null; - } - basicAlgorithmBuilder_.clear(); - } - return this; - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder - getBasicAlgorithmBuilder() { - return getBasicAlgorithmFieldBuilder().getBuilder(); - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder - getBasicAlgorithmOrBuilder() { - if ((algorithmCase_ == 3) && (basicAlgorithmBuilder_ != null)) { - return basicAlgorithmBuilder_.getMessageOrBuilder(); - } else { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - } - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder> - getBasicAlgorithmFieldBuilder() { - if (basicAlgorithmBuilder_ == null) { - if (!(algorithmCase_ == 3)) { - algorithm_ = com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - basicAlgorithmBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder>( - (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) algorithm_, - getParentForChildren(), - isClean()); - algorithm_ = null; - } - algorithmCase_ = 3; - onChanged(); - ; - return basicAlgorithmBuilder_; - } - - private com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig workerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder> - workerConfigBuilder_; - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workerConfig field is set. - */ - public boolean hasWorkerConfig() { - return workerConfigBuilder_ != null || workerConfig_ != null; - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig getWorkerConfig() { - if (workerConfigBuilder_ == null) { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : workerConfig_; - } else { - return workerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig value) { - if (workerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workerConfig_ = value; - onChanged(); - } else { - workerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder builderForValue) { - if (workerConfigBuilder_ == null) { - workerConfig_ = builderForValue.build(); - onChanged(); - } else { - workerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig value) { - if (workerConfigBuilder_ == null) { - if (workerConfig_ != null) { - workerConfig_ = - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.newBuilder( - workerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - workerConfig_ = value; - } - onChanged(); - } else { - workerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearWorkerConfig() { - if (workerConfigBuilder_ == null) { - workerConfig_ = null; - onChanged(); - } else { - workerConfig_ = null; - workerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder - getWorkerConfigBuilder() { - - onChanged(); - return getWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder() { - if (workerConfigBuilder_ != null) { - return workerConfigBuilder_.getMessageOrBuilder(); - } else { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : workerConfig_; - } - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder> - getWorkerConfigFieldBuilder() { - if (workerConfigBuilder_ == null) { - workerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder>( - getWorkerConfig(), getParentForChildren(), isClean()); - workerConfig_ = null; - } - return workerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - secondaryWorkerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder> - secondaryWorkerConfigBuilder_; - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - public boolean hasSecondaryWorkerConfig() { - return secondaryWorkerConfigBuilder_ != null || secondaryWorkerConfig_ != null; - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - getSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } else { - return secondaryWorkerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - secondaryWorkerConfig_ = value; - onChanged(); - } else { - secondaryWorkerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder builderForValue) { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = builderForValue.build(); - onChanged(); - } else { - secondaryWorkerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (secondaryWorkerConfig_ != null) { - secondaryWorkerConfig_ = - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.newBuilder( - secondaryWorkerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - secondaryWorkerConfig_ = value; - } - onChanged(); - } else { - secondaryWorkerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = null; - onChanged(); - } else { - secondaryWorkerConfig_ = null; - secondaryWorkerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder - getSecondaryWorkerConfigBuilder() { - - onChanged(); - return getSecondaryWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - if (secondaryWorkerConfigBuilder_ != null) { - return secondaryWorkerConfigBuilder_.getMessageOrBuilder(); - } else { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder> - getSecondaryWorkerConfigFieldBuilder() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder>( - getSecondaryWorkerConfig(), getParentForChildren(), isClean()); - secondaryWorkerConfig_ = null; - } - return secondaryWorkerConfigBuilder_; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this autoscaling policy.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with an autoscaling policy.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().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.dataproc.v1.AutoscalingPolicy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.AutoscalingPolicy) - private static final com.google.cloud.dataproc.v1.AutoscalingPolicy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.AutoscalingPolicy(); - } - - public static com.google.cloud.dataproc.v1.AutoscalingPolicy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AutoscalingPolicy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicy(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.dataproc.v1.AutoscalingPolicy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyName.java deleted file mode 100644 index b0b09719..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyName.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -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 AutoscalingPolicyName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_AUTOSCALING_POLICY = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}"); - private static final PathTemplate PROJECT_REGION_AUTOSCALING_POLICY = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - private final String autoscalingPolicy; - private final String region; - - @Deprecated - protected AutoscalingPolicyName() { - project = null; - location = null; - autoscalingPolicy = null; - region = null; - } - - private AutoscalingPolicyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - region = null; - pathTemplate = PROJECT_LOCATION_AUTOSCALING_POLICY; - } - - private AutoscalingPolicyName(ProjectRegionAutoscalingPolicyBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - location = null; - pathTemplate = PROJECT_REGION_AUTOSCALING_POLICY; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getAutoscalingPolicy() { - return autoscalingPolicy; - } - - public String getRegion() { - return region; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectLocationAutoscalingPolicyBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectRegionAutoscalingPolicyBuilder newProjectRegionAutoscalingPolicyBuilder() { - return new ProjectRegionAutoscalingPolicyBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static AutoscalingPolicyName of( - String project, String location, String autoscalingPolicy) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setAutoscalingPolicy(autoscalingPolicy) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static AutoscalingPolicyName ofProjectLocationAutoscalingPolicyName( - String project, String location, String autoscalingPolicy) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setAutoscalingPolicy(autoscalingPolicy) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static AutoscalingPolicyName ofProjectRegionAutoscalingPolicyName( - String project, String region, String autoscalingPolicy) { - return newProjectRegionAutoscalingPolicyBuilder() - .setProject(project) - .setRegion(region) - .setAutoscalingPolicy(autoscalingPolicy) - .build(); - } - - public static String format(String project, String location, String autoscalingPolicy) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setAutoscalingPolicy(autoscalingPolicy) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationAutoscalingPolicyName( - String project, String location, String autoscalingPolicy) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setAutoscalingPolicy(autoscalingPolicy) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectRegionAutoscalingPolicyName( - String project, String region, String autoscalingPolicy) { - return newProjectRegionAutoscalingPolicyBuilder() - .setProject(project) - .setRegion(region) - .setAutoscalingPolicy(autoscalingPolicy) - .build() - .toString(); - } - - public static AutoscalingPolicyName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_LOCATION_AUTOSCALING_POLICY.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_AUTOSCALING_POLICY.match(formattedString); - return ofProjectLocationAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("autoscaling_policy")); - } else if (PROJECT_REGION_AUTOSCALING_POLICY.matches(formattedString)) { - Map matchMap = PROJECT_REGION_AUTOSCALING_POLICY.match(formattedString); - return ofProjectRegionAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy")); - } - throw new ValidationException( - "AutoscalingPolicyName.parse: formattedString not in valid format"); - } - - 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 (AutoscalingPolicyName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_AUTOSCALING_POLICY.matches(formattedString) - || PROJECT_REGION_AUTOSCALING_POLICY.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 (autoscalingPolicy != null) { - fieldMapBuilder.put("autoscaling_policy", autoscalingPolicy); - } - if (region != null) { - fieldMapBuilder.put("region", region); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - AutoscalingPolicyName that = ((AutoscalingPolicyName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.autoscalingPolicy, that.autoscalingPolicy) - && Objects.equals(this.region, that.region); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - h *= 1000003; - h ^= Objects.hashCode(autoscalingPolicy); - h *= 1000003; - h ^= Objects.hashCode(region); - return h; - } - - /** - * Builder for projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}. - */ - public static class Builder { - private String project; - private String location; - private String autoscalingPolicy; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getAutoscalingPolicy() { - return autoscalingPolicy; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setAutoscalingPolicy(String autoscalingPolicy) { - this.autoscalingPolicy = autoscalingPolicy; - return this; - } - - private Builder(AutoscalingPolicyName autoscalingPolicyName) { - Preconditions.checkArgument( - Objects.equals(autoscalingPolicyName.pathTemplate, PROJECT_LOCATION_AUTOSCALING_POLICY), - "toBuilder is only supported when AutoscalingPolicyName has the pattern of projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}"); - this.project = autoscalingPolicyName.project; - this.location = autoscalingPolicyName.location; - this.autoscalingPolicy = autoscalingPolicyName.autoscalingPolicy; - } - - public AutoscalingPolicyName build() { - return new AutoscalingPolicyName(this); - } - } - - /** Builder for projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectRegionAutoscalingPolicyBuilder { - private String project; - private String region; - private String autoscalingPolicy; - - protected ProjectRegionAutoscalingPolicyBuilder() {} - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public String getAutoscalingPolicy() { - return autoscalingPolicy; - } - - public ProjectRegionAutoscalingPolicyBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectRegionAutoscalingPolicyBuilder setRegion(String region) { - this.region = region; - return this; - } - - public ProjectRegionAutoscalingPolicyBuilder setAutoscalingPolicy(String autoscalingPolicy) { - this.autoscalingPolicy = autoscalingPolicy; - return this; - } - - public AutoscalingPolicyName build() { - return new AutoscalingPolicyName(this); - } - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyOrBuilder.java deleted file mode 100644 index d859d06e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyOrBuilder.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface AutoscalingPolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.AutoscalingPolicy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The policy id.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string id = 1; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Required. The policy id.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string id = 1; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * Output only. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies`, the resource name of the
-   *   policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the basicAlgorithm field is set. - */ - boolean hasBasicAlgorithm(); - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The basicAlgorithm. - */ - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm getBasicAlgorithm(); - /** - * - * .google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder getBasicAlgorithmOrBuilder(); - - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workerConfig field is set. - */ - boolean hasWorkerConfig(); - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig getWorkerConfig(); - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - boolean hasSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig getSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this autoscaling policy.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with an autoscaling policy.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - public com.google.cloud.dataproc.v1.AutoscalingPolicy.AlgorithmCase getAlgorithmCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfig.java deleted file mode 100644 index 89635a5b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfig.java +++ /dev/null @@ -1,1069 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Auxiliary services configuration for a Cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AuxiliaryServicesConfig} - */ -public final class AuxiliaryServicesConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.AuxiliaryServicesConfig) - AuxiliaryServicesConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuxiliaryServicesConfig.newBuilder() to construct. - private AuxiliaryServicesConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AuxiliaryServicesConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuxiliaryServicesConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AuxiliaryServicesConfig( - 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.dataproc.v1.MetastoreConfig.Builder subBuilder = null; - if (metastoreConfig_ != null) { - subBuilder = metastoreConfig_.toBuilder(); - } - metastoreConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.MetastoreConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metastoreConfig_); - metastoreConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder subBuilder = null; - if (sparkHistoryServerConfig_ != null) { - subBuilder = sparkHistoryServerConfig_.toBuilder(); - } - sparkHistoryServerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sparkHistoryServerConfig_); - sparkHistoryServerConfig_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.class, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder.class); - } - - public static final int METASTORE_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.MetastoreConfig metastoreConfig_; - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - @java.lang.Override - public boolean hasMetastoreConfig() { - return metastoreConfig_ != null; - } - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig() { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder() { - return getMetastoreConfig(); - } - - public static final int SPARK_HISTORY_SERVER_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.SparkHistoryServerConfig sparkHistoryServerConfig_; - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - @java.lang.Override - public boolean hasSparkHistoryServerConfig() { - return sparkHistoryServerConfig_ != null; - } - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig() { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder() { - return getSparkHistoryServerConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (metastoreConfig_ != null) { - output.writeMessage(1, getMetastoreConfig()); - } - if (sparkHistoryServerConfig_ != null) { - output.writeMessage(2, getSparkHistoryServerConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (metastoreConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetastoreConfig()); - } - if (sparkHistoryServerConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, getSparkHistoryServerConfig()); - } - 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.dataproc.v1.AuxiliaryServicesConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig other = - (com.google.cloud.dataproc.v1.AuxiliaryServicesConfig) obj; - - if (hasMetastoreConfig() != other.hasMetastoreConfig()) return false; - if (hasMetastoreConfig()) { - if (!getMetastoreConfig().equals(other.getMetastoreConfig())) return false; - } - if (hasSparkHistoryServerConfig() != other.hasSparkHistoryServerConfig()) return false; - if (hasSparkHistoryServerConfig()) { - if (!getSparkHistoryServerConfig().equals(other.getSparkHistoryServerConfig())) 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 (hasMetastoreConfig()) { - hash = (37 * hash) + METASTORE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMetastoreConfig().hashCode(); - } - if (hasSparkHistoryServerConfig()) { - hash = (37 * hash) + SPARK_HISTORY_SERVER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSparkHistoryServerConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig 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.dataproc.v1.AuxiliaryServicesConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig parseFrom( - 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.dataproc.v1.AuxiliaryServicesConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig 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.dataproc.v1.AuxiliaryServicesConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig 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.dataproc.v1.AuxiliaryServicesConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig 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.dataproc.v1.AuxiliaryServicesConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Auxiliary services configuration for a Cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.AuxiliaryServicesConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.AuxiliaryServicesConfig) - com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.class, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.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 (metastoreConfigBuilder_ == null) { - metastoreConfig_ = null; - } else { - metastoreConfig_ = null; - metastoreConfigBuilder_ = null; - } - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = null; - } else { - sparkHistoryServerConfig_ = null; - sparkHistoryServerConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig build() { - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig buildPartial() { - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig result = - new com.google.cloud.dataproc.v1.AuxiliaryServicesConfig(this); - if (metastoreConfigBuilder_ == null) { - result.metastoreConfig_ = metastoreConfig_; - } else { - result.metastoreConfig_ = metastoreConfigBuilder_.build(); - } - if (sparkHistoryServerConfigBuilder_ == null) { - result.sparkHistoryServerConfig_ = sparkHistoryServerConfig_; - } else { - result.sparkHistoryServerConfig_ = sparkHistoryServerConfigBuilder_.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.dataproc.v1.AuxiliaryServicesConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.AuxiliaryServicesConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.AuxiliaryServicesConfig other) { - if (other == com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.getDefaultInstance()) - return this; - if (other.hasMetastoreConfig()) { - mergeMetastoreConfig(other.getMetastoreConfig()); - } - if (other.hasSparkHistoryServerConfig()) { - mergeSparkHistoryServerConfig(other.getSparkHistoryServerConfig()); - } - 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.dataproc.v1.AuxiliaryServicesConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.AuxiliaryServicesConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.MetastoreConfig metastoreConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder> - metastoreConfigBuilder_; - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - public boolean hasMetastoreConfig() { - return metastoreConfigBuilder_ != null || metastoreConfig_ != null; - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - public com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig() { - if (metastoreConfigBuilder_ == null) { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } else { - return metastoreConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetastoreConfig(com.google.cloud.dataproc.v1.MetastoreConfig value) { - if (metastoreConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metastoreConfig_ = value; - onChanged(); - } else { - metastoreConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetastoreConfig( - com.google.cloud.dataproc.v1.MetastoreConfig.Builder builderForValue) { - if (metastoreConfigBuilder_ == null) { - metastoreConfig_ = builderForValue.build(); - onChanged(); - } else { - metastoreConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeMetastoreConfig(com.google.cloud.dataproc.v1.MetastoreConfig value) { - if (metastoreConfigBuilder_ == null) { - if (metastoreConfig_ != null) { - metastoreConfig_ = - com.google.cloud.dataproc.v1.MetastoreConfig.newBuilder(metastoreConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - metastoreConfig_ = value; - } - onChanged(); - } else { - metastoreConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearMetastoreConfig() { - if (metastoreConfigBuilder_ == null) { - metastoreConfig_ = null; - onChanged(); - } else { - metastoreConfig_ = null; - metastoreConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.MetastoreConfig.Builder getMetastoreConfigBuilder() { - - onChanged(); - return getMetastoreConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder() { - if (metastoreConfigBuilder_ != null) { - return metastoreConfigBuilder_.getMessageOrBuilder(); - } else { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } - } - /** - * - * - *
-     * Optional. The Hive Metastore configuration for this workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder> - getMetastoreConfigFieldBuilder() { - if (metastoreConfigBuilder_ == null) { - metastoreConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder>( - getMetastoreConfig(), getParentForChildren(), isClean()); - metastoreConfig_ = null; - } - return metastoreConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.SparkHistoryServerConfig sparkHistoryServerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder> - sparkHistoryServerConfigBuilder_; - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - public boolean hasSparkHistoryServerConfig() { - return sparkHistoryServerConfigBuilder_ != null || sparkHistoryServerConfig_ != null; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig() { - if (sparkHistoryServerConfigBuilder_ == null) { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } else { - return sparkHistoryServerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig value) { - if (sparkHistoryServerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sparkHistoryServerConfig_ = value; - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder builderForValue) { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = builderForValue.build(); - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig value) { - if (sparkHistoryServerConfigBuilder_ == null) { - if (sparkHistoryServerConfig_ != null) { - sparkHistoryServerConfig_ = - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.newBuilder( - sparkHistoryServerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - sparkHistoryServerConfig_ = value; - } - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkHistoryServerConfig() { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = null; - onChanged(); - } else { - sparkHistoryServerConfig_ = null; - sparkHistoryServerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder - getSparkHistoryServerConfigBuilder() { - - onChanged(); - return getSparkHistoryServerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder() { - if (sparkHistoryServerConfigBuilder_ != null) { - return sparkHistoryServerConfigBuilder_.getMessageOrBuilder(); - } else { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder> - getSparkHistoryServerConfigFieldBuilder() { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder>( - getSparkHistoryServerConfig(), getParentForChildren(), isClean()); - sparkHistoryServerConfig_ = null; - } - return sparkHistoryServerConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.AuxiliaryServicesConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.AuxiliaryServicesConfig) - private static final com.google.cloud.dataproc.v1.AuxiliaryServicesConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.AuxiliaryServicesConfig(); - } - - public static com.google.cloud.dataproc.v1.AuxiliaryServicesConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuxiliaryServicesConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuxiliaryServicesConfig(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.dataproc.v1.AuxiliaryServicesConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfigOrBuilder.java deleted file mode 100644 index 27a97b70..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AuxiliaryServicesConfigOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface AuxiliaryServicesConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.AuxiliaryServicesConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - boolean hasMetastoreConfig(); - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig(); - /** - * - * - *
-   * Optional. The Hive Metastore configuration for this workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - boolean hasSparkHistoryServerConfig(); - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig(); - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithm.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithm.java deleted file mode 100644 index 16c497a7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithm.java +++ /dev/null @@ -1,1082 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Basic algorithm for autoscaling.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BasicAutoscalingAlgorithm} - */ -public final class BasicAutoscalingAlgorithm extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) - BasicAutoscalingAlgorithmOrBuilder { - private static final long serialVersionUID = 0L; - // Use BasicAutoscalingAlgorithm.newBuilder() to construct. - private BasicAutoscalingAlgorithm(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BasicAutoscalingAlgorithm() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BasicAutoscalingAlgorithm(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BasicAutoscalingAlgorithm( - 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.dataproc.v1.BasicYarnAutoscalingConfig.Builder subBuilder = null; - if (yarnConfig_ != null) { - subBuilder = yarnConfig_.toBuilder(); - } - yarnConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(yarnConfig_); - yarnConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (cooldownPeriod_ != null) { - subBuilder = cooldownPeriod_.toBuilder(); - } - cooldownPeriod_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cooldownPeriod_); - cooldownPeriod_ = 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.class, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder.class); - } - - public static final int YARN_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarnConfig_; - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the yarnConfig field is set. - */ - @java.lang.Override - public boolean hasYarnConfig() { - return yarnConfig_ != null; - } - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig getYarnConfig() { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder getYarnConfigOrBuilder() { - return getYarnConfig(); - } - - public static final int COOLDOWN_PERIOD_FIELD_NUMBER = 2; - private com.google.protobuf.Duration cooldownPeriod_; - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the cooldownPeriod field is set. - */ - @java.lang.Override - public boolean hasCooldownPeriod() { - return cooldownPeriod_ != null; - } - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The cooldownPeriod. - */ - @java.lang.Override - public com.google.protobuf.Duration getCooldownPeriod() { - return cooldownPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : cooldownPeriod_; - } - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getCooldownPeriodOrBuilder() { - return getCooldownPeriod(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (yarnConfig_ != null) { - output.writeMessage(1, getYarnConfig()); - } - if (cooldownPeriod_ != null) { - output.writeMessage(2, getCooldownPeriod()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (yarnConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getYarnConfig()); - } - if (cooldownPeriod_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCooldownPeriod()); - } - 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.dataproc.v1.BasicAutoscalingAlgorithm)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm other = - (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) obj; - - if (hasYarnConfig() != other.hasYarnConfig()) return false; - if (hasYarnConfig()) { - if (!getYarnConfig().equals(other.getYarnConfig())) return false; - } - if (hasCooldownPeriod() != other.hasCooldownPeriod()) return false; - if (hasCooldownPeriod()) { - if (!getCooldownPeriod().equals(other.getCooldownPeriod())) 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 (hasYarnConfig()) { - hash = (37 * hash) + YARN_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getYarnConfig().hashCode(); - } - if (hasCooldownPeriod()) { - hash = (37 * hash) + COOLDOWN_PERIOD_FIELD_NUMBER; - hash = (53 * hash) + getCooldownPeriod().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm 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.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - 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.dataproc.v1.BasicAutoscalingAlgorithm parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm 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.dataproc.v1.BasicAutoscalingAlgorithm parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm 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.dataproc.v1.BasicAutoscalingAlgorithm parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm 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.dataproc.v1.BasicAutoscalingAlgorithm prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Basic algorithm for autoscaling.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BasicAutoscalingAlgorithm} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithmOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.class, - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.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 (yarnConfigBuilder_ == null) { - yarnConfig_ = null; - } else { - yarnConfig_ = null; - yarnConfigBuilder_ = null; - } - if (cooldownPeriodBuilder_ == null) { - cooldownPeriod_ = null; - } else { - cooldownPeriod_ = null; - cooldownPeriodBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm build() { - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm buildPartial() { - com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm result = - new com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm(this); - if (yarnConfigBuilder_ == null) { - result.yarnConfig_ = yarnConfig_; - } else { - result.yarnConfig_ = yarnConfigBuilder_.build(); - } - if (cooldownPeriodBuilder_ == null) { - result.cooldownPeriod_ = cooldownPeriod_; - } else { - result.cooldownPeriod_ = cooldownPeriodBuilder_.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.dataproc.v1.BasicAutoscalingAlgorithm) { - return mergeFrom((com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm other) { - if (other == com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm.getDefaultInstance()) - return this; - if (other.hasYarnConfig()) { - mergeYarnConfig(other.getYarnConfig()); - } - if (other.hasCooldownPeriod()) { - mergeCooldownPeriod(other.getCooldownPeriod()); - } - 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.dataproc.v1.BasicAutoscalingAlgorithm parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarnConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder> - yarnConfigBuilder_; - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the yarnConfig field is set. - */ - public boolean hasYarnConfig() { - return yarnConfigBuilder_ != null || yarnConfig_ != null; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig getYarnConfig() { - if (yarnConfigBuilder_ == null) { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } else { - return yarnConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setYarnConfig(com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig value) { - if (yarnConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - yarnConfig_ = value; - onChanged(); - } else { - yarnConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setYarnConfig( - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder builderForValue) { - if (yarnConfigBuilder_ == null) { - yarnConfig_ = builderForValue.build(); - onChanged(); - } else { - yarnConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeYarnConfig(com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig value) { - if (yarnConfigBuilder_ == null) { - if (yarnConfig_ != null) { - yarnConfig_ = - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.newBuilder(yarnConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - yarnConfig_ = value; - } - onChanged(); - } else { - yarnConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearYarnConfig() { - if (yarnConfigBuilder_ == null) { - yarnConfig_ = null; - onChanged(); - } else { - yarnConfig_ = null; - yarnConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder getYarnConfigBuilder() { - - onChanged(); - return getYarnConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder - getYarnConfigOrBuilder() { - if (yarnConfigBuilder_ != null) { - return yarnConfigBuilder_.getMessageOrBuilder(); - } else { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder> - getYarnConfigFieldBuilder() { - if (yarnConfigBuilder_ == null) { - yarnConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder>( - getYarnConfig(), getParentForChildren(), isClean()); - yarnConfig_ = null; - } - return yarnConfigBuilder_; - } - - private com.google.protobuf.Duration cooldownPeriod_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - cooldownPeriodBuilder_; - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the cooldownPeriod field is set. - */ - public boolean hasCooldownPeriod() { - return cooldownPeriodBuilder_ != null || cooldownPeriod_ != null; - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The cooldownPeriod. - */ - public com.google.protobuf.Duration getCooldownPeriod() { - if (cooldownPeriodBuilder_ == null) { - return cooldownPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : cooldownPeriod_; - } else { - return cooldownPeriodBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCooldownPeriod(com.google.protobuf.Duration value) { - if (cooldownPeriodBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cooldownPeriod_ = value; - onChanged(); - } else { - cooldownPeriodBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setCooldownPeriod(com.google.protobuf.Duration.Builder builderForValue) { - if (cooldownPeriodBuilder_ == null) { - cooldownPeriod_ = builderForValue.build(); - onChanged(); - } else { - cooldownPeriodBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeCooldownPeriod(com.google.protobuf.Duration value) { - if (cooldownPeriodBuilder_ == null) { - if (cooldownPeriod_ != null) { - cooldownPeriod_ = - com.google.protobuf.Duration.newBuilder(cooldownPeriod_) - .mergeFrom(value) - .buildPartial(); - } else { - cooldownPeriod_ = value; - } - onChanged(); - } else { - cooldownPeriodBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearCooldownPeriod() { - if (cooldownPeriodBuilder_ == null) { - cooldownPeriod_ = null; - onChanged(); - } else { - cooldownPeriod_ = null; - cooldownPeriodBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getCooldownPeriodBuilder() { - - onChanged(); - return getCooldownPeriodFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getCooldownPeriodOrBuilder() { - if (cooldownPeriodBuilder_ != null) { - return cooldownPeriodBuilder_.getMessageOrBuilder(); - } else { - return cooldownPeriod_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : cooldownPeriod_; - } - } - /** - * - * - *
-     * Optional. Duration between scaling events. A scaling period starts after
-     * the update operation from the previous event has completed.
-     * Bounds: [2m, 1d]. Default: 2m.
-     * 
- * - * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getCooldownPeriodFieldBuilder() { - if (cooldownPeriodBuilder_ == null) { - cooldownPeriodBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getCooldownPeriod(), getParentForChildren(), isClean()); - cooldownPeriod_ = null; - } - return cooldownPeriodBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.BasicAutoscalingAlgorithm) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) - private static final com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm(); - } - - public static com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BasicAutoscalingAlgorithm parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BasicAutoscalingAlgorithm(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.dataproc.v1.BasicAutoscalingAlgorithm getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithmOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithmOrBuilder.java deleted file mode 100644 index f33fcf90..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithmOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface BasicAutoscalingAlgorithmOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.BasicAutoscalingAlgorithm) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the yarnConfig field is set. - */ - boolean hasYarnConfig(); - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig getYarnConfig(); - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder getYarnConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the cooldownPeriod field is set. - */ - boolean hasCooldownPeriod(); - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The cooldownPeriod. - */ - com.google.protobuf.Duration getCooldownPeriod(); - /** - * - * - *
-   * Optional. Duration between scaling events. A scaling period starts after
-   * the update operation from the previous event has completed.
-   * Bounds: [2m, 1d]. Default: 2m.
-   * 
- * - * .google.protobuf.Duration cooldown_period = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getCooldownPeriodOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfig.java deleted file mode 100644 index ec79cd0a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfig.java +++ /dev/null @@ -1,1297 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Basic autoscaling configurations for YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BasicYarnAutoscalingConfig} - */ -public final class BasicYarnAutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) - BasicYarnAutoscalingConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use BasicYarnAutoscalingConfig.newBuilder() to construct. - private BasicYarnAutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BasicYarnAutoscalingConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BasicYarnAutoscalingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BasicYarnAutoscalingConfig( - 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 9: - { - scaleUpFactor_ = input.readDouble(); - break; - } - case 17: - { - scaleDownFactor_ = input.readDouble(); - break; - } - case 25: - { - scaleUpMinWorkerFraction_ = input.readDouble(); - break; - } - case 33: - { - scaleDownMinWorkerFraction_ = input.readDouble(); - break; - } - case 42: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (gracefulDecommissionTimeout_ != null) { - subBuilder = gracefulDecommissionTimeout_.toBuilder(); - } - gracefulDecommissionTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gracefulDecommissionTimeout_); - gracefulDecommissionTimeout_ = 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.class, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder.class); - } - - public static final int GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER = 5; - private com.google.protobuf.Duration gracefulDecommissionTimeout_; - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - @java.lang.Override - public boolean hasGracefulDecommissionTimeout() { - return gracefulDecommissionTimeout_ != null; - } - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gracefulDecommissionTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getGracefulDecommissionTimeout() { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { - return getGracefulDecommissionTimeout(); - } - - public static final int SCALE_UP_FACTOR_FIELD_NUMBER = 1; - private double scaleUpFactor_; - /** - * - * - *
-   * Required. Fraction of average YARN pending memory in the last cooldown period
-   * for which to add workers. A scale-up factor of 1.0 will result in scaling
-   * up so that there is no pending memory remaining after the update (more
-   * aggressive scaling). A scale-up factor closer to 0 will result in a smaller
-   * magnitude of scaling up (less aggressive scaling).
-   * See [How autoscaling
-   * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-   * for more information.
-   * Bounds: [0.0, 1.0].
-   * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleUpFactor. - */ - @java.lang.Override - public double getScaleUpFactor() { - return scaleUpFactor_; - } - - public static final int SCALE_DOWN_FACTOR_FIELD_NUMBER = 2; - private double scaleDownFactor_; - /** - * - * - *
-   * Required. Fraction of average YARN pending memory in the last cooldown period
-   * for which to remove workers. A scale-down factor of 1 will result in
-   * scaling down so that there is no available memory remaining after the
-   * update (more aggressive scaling). A scale-down factor of 0 disables
-   * removing workers, which can be beneficial for autoscaling a single job.
-   * See [How autoscaling
-   * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-   * for more information.
-   * Bounds: [0.0, 1.0].
-   * 
- * - * double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleDownFactor. - */ - @java.lang.Override - public double getScaleDownFactor() { - return scaleDownFactor_; - } - - public static final int SCALE_UP_MIN_WORKER_FRACTION_FIELD_NUMBER = 3; - private double scaleUpMinWorkerFraction_; - /** - * - * - *
-   * Optional. Minimum scale-up threshold as a fraction of total cluster size
-   * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-   * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for
-   * the cluster to scale. A threshold of 0 means the autoscaler will scale up
-   * on any recommended change.
-   * Bounds: [0.0, 1.0]. Default: 0.0.
-   * 
- * - * double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The scaleUpMinWorkerFraction. - */ - @java.lang.Override - public double getScaleUpMinWorkerFraction() { - return scaleUpMinWorkerFraction_; - } - - public static final int SCALE_DOWN_MIN_WORKER_FRACTION_FIELD_NUMBER = 4; - private double scaleDownMinWorkerFraction_; - /** - * - * - *
-   * Optional. Minimum scale-down threshold as a fraction of total cluster size
-   * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-   * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for
-   * the cluster to scale. A threshold of 0 means the autoscaler will scale down
-   * on any recommended change.
-   * Bounds: [0.0, 1.0]. Default: 0.0.
-   * 
- * - * double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scaleDownMinWorkerFraction. - */ - @java.lang.Override - public double getScaleDownMinWorkerFraction() { - return scaleDownMinWorkerFraction_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (scaleUpFactor_ != 0D) { - output.writeDouble(1, scaleUpFactor_); - } - if (scaleDownFactor_ != 0D) { - output.writeDouble(2, scaleDownFactor_); - } - if (scaleUpMinWorkerFraction_ != 0D) { - output.writeDouble(3, scaleUpMinWorkerFraction_); - } - if (scaleDownMinWorkerFraction_ != 0D) { - output.writeDouble(4, scaleDownMinWorkerFraction_); - } - if (gracefulDecommissionTimeout_ != null) { - output.writeMessage(5, getGracefulDecommissionTimeout()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (scaleUpFactor_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, scaleUpFactor_); - } - if (scaleDownFactor_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, scaleDownFactor_); - } - if (scaleUpMinWorkerFraction_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, scaleUpMinWorkerFraction_); - } - if (scaleDownMinWorkerFraction_ != 0D) { - size += - com.google.protobuf.CodedOutputStream.computeDoubleSize(4, scaleDownMinWorkerFraction_); - } - if (gracefulDecommissionTimeout_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, getGracefulDecommissionTimeout()); - } - 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.dataproc.v1.BasicYarnAutoscalingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig other = - (com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) obj; - - if (hasGracefulDecommissionTimeout() != other.hasGracefulDecommissionTimeout()) return false; - if (hasGracefulDecommissionTimeout()) { - if (!getGracefulDecommissionTimeout().equals(other.getGracefulDecommissionTimeout())) - return false; - } - if (java.lang.Double.doubleToLongBits(getScaleUpFactor()) - != java.lang.Double.doubleToLongBits(other.getScaleUpFactor())) return false; - if (java.lang.Double.doubleToLongBits(getScaleDownFactor()) - != java.lang.Double.doubleToLongBits(other.getScaleDownFactor())) return false; - if (java.lang.Double.doubleToLongBits(getScaleUpMinWorkerFraction()) - != java.lang.Double.doubleToLongBits(other.getScaleUpMinWorkerFraction())) return false; - if (java.lang.Double.doubleToLongBits(getScaleDownMinWorkerFraction()) - != java.lang.Double.doubleToLongBits(other.getScaleDownMinWorkerFraction())) 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 (hasGracefulDecommissionTimeout()) { - hash = (37 * hash) + GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getGracefulDecommissionTimeout().hashCode(); - } - hash = (37 * hash) + SCALE_UP_FACTOR_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getScaleUpFactor())); - hash = (37 * hash) + SCALE_DOWN_FACTOR_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getScaleDownFactor())); - hash = (37 * hash) + SCALE_UP_MIN_WORKER_FRACTION_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getScaleUpMinWorkerFraction())); - hash = (37 * hash) + SCALE_DOWN_MIN_WORKER_FRACTION_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getScaleDownMinWorkerFraction())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig 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.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - 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.dataproc.v1.BasicYarnAutoscalingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig 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.dataproc.v1.BasicYarnAutoscalingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig 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.dataproc.v1.BasicYarnAutoscalingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig 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.dataproc.v1.BasicYarnAutoscalingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Basic autoscaling configurations for YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BasicYarnAutoscalingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.class, - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.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 (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = null; - } else { - gracefulDecommissionTimeout_ = null; - gracefulDecommissionTimeoutBuilder_ = null; - } - scaleUpFactor_ = 0D; - - scaleDownFactor_ = 0D; - - scaleUpMinWorkerFraction_ = 0D; - - scaleDownMinWorkerFraction_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig build() { - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig buildPartial() { - com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig result = - new com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig(this); - if (gracefulDecommissionTimeoutBuilder_ == null) { - result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeout_; - } else { - result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeoutBuilder_.build(); - } - result.scaleUpFactor_ = scaleUpFactor_; - result.scaleDownFactor_ = scaleDownFactor_; - result.scaleUpMinWorkerFraction_ = scaleUpMinWorkerFraction_; - result.scaleDownMinWorkerFraction_ = scaleDownMinWorkerFraction_; - 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.dataproc.v1.BasicYarnAutoscalingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig other) { - if (other == com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig.getDefaultInstance()) - return this; - if (other.hasGracefulDecommissionTimeout()) { - mergeGracefulDecommissionTimeout(other.getGracefulDecommissionTimeout()); - } - if (other.getScaleUpFactor() != 0D) { - setScaleUpFactor(other.getScaleUpFactor()); - } - if (other.getScaleDownFactor() != 0D) { - setScaleDownFactor(other.getScaleDownFactor()); - } - if (other.getScaleUpMinWorkerFraction() != 0D) { - setScaleUpMinWorkerFraction(other.getScaleUpMinWorkerFraction()); - } - if (other.getScaleDownMinWorkerFraction() != 0D) { - setScaleDownMinWorkerFraction(other.getScaleDownMinWorkerFraction()); - } - 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.dataproc.v1.BasicYarnAutoscalingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Duration gracefulDecommissionTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - gracefulDecommissionTimeoutBuilder_; - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - public boolean hasGracefulDecommissionTimeout() { - return gracefulDecommissionTimeoutBuilder_ != null || gracefulDecommissionTimeout_ != null; - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gracefulDecommissionTimeout. - */ - public com.google.protobuf.Duration getGracefulDecommissionTimeout() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } else { - return gracefulDecommissionTimeoutBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGracefulDecommissionTimeout(com.google.protobuf.Duration value) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gracefulDecommissionTimeout_ = value; - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGracefulDecommissionTimeout( - com.google.protobuf.Duration.Builder builderForValue) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = builderForValue.build(); - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGracefulDecommissionTimeout(com.google.protobuf.Duration value) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - if (gracefulDecommissionTimeout_ != null) { - gracefulDecommissionTimeout_ = - com.google.protobuf.Duration.newBuilder(gracefulDecommissionTimeout_) - .mergeFrom(value) - .buildPartial(); - } else { - gracefulDecommissionTimeout_ = value; - } - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGracefulDecommissionTimeout() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = null; - onChanged(); - } else { - gracefulDecommissionTimeout_ = null; - gracefulDecommissionTimeoutBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.Duration.Builder getGracefulDecommissionTimeoutBuilder() { - - onChanged(); - return getGracefulDecommissionTimeoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { - if (gracefulDecommissionTimeoutBuilder_ != null) { - return gracefulDecommissionTimeoutBuilder_.getMessageOrBuilder(); - } else { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } - } - /** - * - * - *
-     * Required. Timeout for YARN graceful decommissioning of Node Managers.
-     * Specifies the duration to wait for jobs to complete before forcefully
-     * removing workers (and potentially interrupting jobs). Only applicable to
-     * downscaling operations.
-     * Bounds: [0s, 1d].
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getGracefulDecommissionTimeoutFieldBuilder() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getGracefulDecommissionTimeout(), getParentForChildren(), isClean()); - gracefulDecommissionTimeout_ = null; - } - return gracefulDecommissionTimeoutBuilder_; - } - - private double scaleUpFactor_; - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to add workers. A scale-up factor of 1.0 will result in scaling
-     * up so that there is no pending memory remaining after the update (more
-     * aggressive scaling). A scale-up factor closer to 0 will result in a smaller
-     * magnitude of scaling up (less aggressive scaling).
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleUpFactor. - */ - @java.lang.Override - public double getScaleUpFactor() { - return scaleUpFactor_; - } - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to add workers. A scale-up factor of 1.0 will result in scaling
-     * up so that there is no pending memory remaining after the update (more
-     * aggressive scaling). A scale-up factor closer to 0 will result in a smaller
-     * magnitude of scaling up (less aggressive scaling).
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The scaleUpFactor to set. - * @return This builder for chaining. - */ - public Builder setScaleUpFactor(double value) { - - scaleUpFactor_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to add workers. A scale-up factor of 1.0 will result in scaling
-     * up so that there is no pending memory remaining after the update (more
-     * aggressive scaling). A scale-up factor closer to 0 will result in a smaller
-     * magnitude of scaling up (less aggressive scaling).
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearScaleUpFactor() { - - scaleUpFactor_ = 0D; - onChanged(); - return this; - } - - private double scaleDownFactor_; - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to remove workers. A scale-down factor of 1 will result in
-     * scaling down so that there is no available memory remaining after the
-     * update (more aggressive scaling). A scale-down factor of 0 disables
-     * removing workers, which can be beneficial for autoscaling a single job.
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleDownFactor. - */ - @java.lang.Override - public double getScaleDownFactor() { - return scaleDownFactor_; - } - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to remove workers. A scale-down factor of 1 will result in
-     * scaling down so that there is no available memory remaining after the
-     * update (more aggressive scaling). A scale-down factor of 0 disables
-     * removing workers, which can be beneficial for autoscaling a single job.
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The scaleDownFactor to set. - * @return This builder for chaining. - */ - public Builder setScaleDownFactor(double value) { - - scaleDownFactor_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Fraction of average YARN pending memory in the last cooldown period
-     * for which to remove workers. A scale-down factor of 1 will result in
-     * scaling down so that there is no available memory remaining after the
-     * update (more aggressive scaling). A scale-down factor of 0 disables
-     * removing workers, which can be beneficial for autoscaling a single job.
-     * See [How autoscaling
-     * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-     * for more information.
-     * Bounds: [0.0, 1.0].
-     * 
- * - * double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearScaleDownFactor() { - - scaleDownFactor_ = 0D; - onChanged(); - return this; - } - - private double scaleUpMinWorkerFraction_; - /** - * - * - *
-     * Optional. Minimum scale-up threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale up
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scaleUpMinWorkerFraction. - */ - @java.lang.Override - public double getScaleUpMinWorkerFraction() { - return scaleUpMinWorkerFraction_; - } - /** - * - * - *
-     * Optional. Minimum scale-up threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale up
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The scaleUpMinWorkerFraction to set. - * @return This builder for chaining. - */ - public Builder setScaleUpMinWorkerFraction(double value) { - - scaleUpMinWorkerFraction_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Minimum scale-up threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale up
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearScaleUpMinWorkerFraction() { - - scaleUpMinWorkerFraction_ = 0D; - onChanged(); - return this; - } - - private double scaleDownMinWorkerFraction_; - /** - * - * - *
-     * Optional. Minimum scale-down threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale down
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scaleDownMinWorkerFraction. - */ - @java.lang.Override - public double getScaleDownMinWorkerFraction() { - return scaleDownMinWorkerFraction_; - } - /** - * - * - *
-     * Optional. Minimum scale-down threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale down
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The scaleDownMinWorkerFraction to set. - * @return This builder for chaining. - */ - public Builder setScaleDownMinWorkerFraction(double value) { - - scaleDownMinWorkerFraction_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Minimum scale-down threshold as a fraction of total cluster size
-     * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-     * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for
-     * the cluster to scale. A threshold of 0 means the autoscaler will scale down
-     * on any recommended change.
-     * Bounds: [0.0, 1.0]. Default: 0.0.
-     * 
- * - * double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearScaleDownMinWorkerFraction() { - - scaleDownMinWorkerFraction_ = 0D; - 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.dataproc.v1.BasicYarnAutoscalingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) - private static final com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig(); - } - - public static com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BasicYarnAutoscalingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BasicYarnAutoscalingConfig(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.dataproc.v1.BasicYarnAutoscalingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfigOrBuilder.java deleted file mode 100644 index 142f7b30..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfigOrBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface BasicYarnAutoscalingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.BasicYarnAutoscalingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - boolean hasGracefulDecommissionTimeout(); - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gracefulDecommissionTimeout. - */ - com.google.protobuf.Duration getGracefulDecommissionTimeout(); - /** - * - * - *
-   * Required. Timeout for YARN graceful decommissioning of Node Managers.
-   * Specifies the duration to wait for jobs to complete before forcefully
-   * removing workers (and potentially interrupting jobs). Only applicable to
-   * downscaling operations.
-   * Bounds: [0s, 1d].
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder(); - - /** - * - * - *
-   * Required. Fraction of average YARN pending memory in the last cooldown period
-   * for which to add workers. A scale-up factor of 1.0 will result in scaling
-   * up so that there is no pending memory remaining after the update (more
-   * aggressive scaling). A scale-up factor closer to 0 will result in a smaller
-   * magnitude of scaling up (less aggressive scaling).
-   * See [How autoscaling
-   * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-   * for more information.
-   * Bounds: [0.0, 1.0].
-   * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleUpFactor. - */ - double getScaleUpFactor(); - - /** - * - * - *
-   * Required. Fraction of average YARN pending memory in the last cooldown period
-   * for which to remove workers. A scale-down factor of 1 will result in
-   * scaling down so that there is no available memory remaining after the
-   * update (more aggressive scaling). A scale-down factor of 0 disables
-   * removing workers, which can be beneficial for autoscaling a single job.
-   * See [How autoscaling
-   * works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works)
-   * for more information.
-   * Bounds: [0.0, 1.0].
-   * 
- * - * double scale_down_factor = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleDownFactor. - */ - double getScaleDownFactor(); - - /** - * - * - *
-   * Optional. Minimum scale-up threshold as a fraction of total cluster size
-   * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-   * 0.1 means the autoscaler must recommend at least a 2-worker scale-up for
-   * the cluster to scale. A threshold of 0 means the autoscaler will scale up
-   * on any recommended change.
-   * Bounds: [0.0, 1.0]. Default: 0.0.
-   * 
- * - * double scale_up_min_worker_fraction = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The scaleUpMinWorkerFraction. - */ - double getScaleUpMinWorkerFraction(); - - /** - * - * - *
-   * Optional. Minimum scale-down threshold as a fraction of total cluster size
-   * before scaling occurs. For example, in a 20-worker cluster, a threshold of
-   * 0.1 means the autoscaler must recommend at least a 2 worker scale-down for
-   * the cluster to scale. A threshold of 0 means the autoscaler will scale down
-   * on any recommended change.
-   * Bounds: [0.0, 1.0]. Default: 0.0.
-   * 
- * - * double scale_down_min_worker_fraction = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scaleDownMinWorkerFraction. - */ - double getScaleDownMinWorkerFraction(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Batch.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Batch.java deleted file mode 100644 index 56914113..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Batch.java +++ /dev/null @@ -1,6770 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A representation of a batch workload in the service.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Batch} - */ -public final class Batch extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Batch) - BatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use Batch.newBuilder() to construct. - private Batch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Batch() { - name_ = ""; - uuid_ = ""; - state_ = 0; - stateMessage_ = ""; - creator_ = ""; - operation_ = ""; - stateHistory_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Batch(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Batch( - 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(); - - uuid_ = s; - break; - } - case 26: - { - 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 34: - { - com.google.cloud.dataproc.v1.PySparkBatch.Builder subBuilder = null; - if (batchConfigCase_ == 4) { - subBuilder = ((com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_).toBuilder(); - } - batchConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.PySparkBatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_); - batchConfig_ = subBuilder.buildPartial(); - } - batchConfigCase_ = 4; - break; - } - case 42: - { - com.google.cloud.dataproc.v1.SparkBatch.Builder subBuilder = null; - if (batchConfigCase_ == 5) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkBatch) batchConfig_).toBuilder(); - } - batchConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkBatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkBatch) batchConfig_); - batchConfig_ = subBuilder.buildPartial(); - } - batchConfigCase_ = 5; - break; - } - case 50: - { - com.google.cloud.dataproc.v1.SparkRBatch.Builder subBuilder = null; - if (batchConfigCase_ == 6) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_).toBuilder(); - } - batchConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkRBatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_); - batchConfig_ = subBuilder.buildPartial(); - } - batchConfigCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder subBuilder = null; - if (batchConfigCase_ == 7) { - subBuilder = - ((com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_).toBuilder(); - } - batchConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkSqlBatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_); - batchConfig_ = subBuilder.buildPartial(); - } - batchConfigCase_ = 7; - break; - } - case 66: - { - com.google.cloud.dataproc.v1.RuntimeInfo.Builder subBuilder = null; - if (runtimeInfo_ != null) { - subBuilder = runtimeInfo_.toBuilder(); - } - runtimeInfo_ = - input.readMessage( - com.google.cloud.dataproc.v1.RuntimeInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(runtimeInfo_); - runtimeInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 72: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - stateMessage_ = s; - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (stateTime_ != null) { - subBuilder = stateTime_.toBuilder(); - } - stateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateTime_); - stateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - creator_ = s; - break; - } - case 106: - { - 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 114: - { - com.google.cloud.dataproc.v1.RuntimeConfig.Builder subBuilder = null; - if (runtimeConfig_ != null) { - subBuilder = runtimeConfig_.toBuilder(); - } - runtimeConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.RuntimeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(runtimeConfig_); - runtimeConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder subBuilder = null; - if (environmentConfig_ != null) { - subBuilder = environmentConfig_.toBuilder(); - } - environmentConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.EnvironmentConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(environmentConfig_); - environmentConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 138: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - stateHistory_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - stateHistory_.add( - input.readMessage( - com.google.cloud.dataproc.v1.Batch.StateHistory.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - stateHistory_ = java.util.Collections.unmodifiableList(stateHistory_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 13: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Batch.class, - com.google.cloud.dataproc.v1.Batch.Builder.class); - } - - /** - * - * - *
-   * The batch state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.Batch.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The batch state is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The batch is created before running.
-     * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - * - * - *
-     * The batch is running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The batch is cancelling.
-     * 
- * - * CANCELLING = 3; - */ - CANCELLING(3), - /** - * - * - *
-     * The batch cancellation was successful.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - /** - * - * - *
-     * The batch completed successfully.
-     * 
- * - * SUCCEEDED = 5; - */ - SUCCEEDED(5), - /** - * - * - *
-     * The batch is no longer running due to an error.
-     * 
- * - * FAILED = 6; - */ - FAILED(6), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The batch state is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The batch is created before running.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - * - * - *
-     * The batch is running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The batch is cancelling.
-     * 
- * - * CANCELLING = 3; - */ - public static final int CANCELLING_VALUE = 3; - /** - * - * - *
-     * The batch cancellation was successful.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - /** - * - * - *
-     * The batch completed successfully.
-     * 
- * - * SUCCEEDED = 5; - */ - public static final int SUCCEEDED_VALUE = 5; - /** - * - * - *
-     * The batch is no longer running due to an error.
-     * 
- * - * FAILED = 6; - */ - public static final int FAILED_VALUE = 6; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return PENDING; - case 2: - return RUNNING; - case 3: - return CANCELLING; - case 4: - return CANCELLED; - case 5: - return SUCCEEDED; - case 6: - return FAILED; - 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.dataproc.v1.Batch.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.Batch.State) - } - - public interface StateHistoryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.Batch.StateHistory) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The state of the batch at this point in history.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-     * Output only. The state of the batch at this point in history.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.Batch.State getState(); - - /** - * - * - *
-     * Output only. Details about the state at this point in history.
-     * 
- * - * string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-     * Output only. Details about the state at this point in history.
-     * 
- * - * string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - boolean hasStateStartTime(); - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - com.google.protobuf.Timestamp getStateStartTime(); - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder(); - } - /** - * - * - *
-   * Historical state information.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Batch.StateHistory} - */ - public static final class StateHistory extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Batch.StateHistory) - StateHistoryOrBuilder { - private static final long serialVersionUID = 0L; - // Use StateHistory.newBuilder() to construct. - private StateHistory(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StateHistory() { - state_ = 0; - stateMessage_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StateHistory(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StateHistory( - 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - stateMessage_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (stateStartTime_ != null) { - subBuilder = stateStartTime_.toBuilder(); - } - stateStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateStartTime_); - stateStartTime_ = 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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_StateHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Batch.StateHistory.class, - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder.class); - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-     * Output only. The state of the batch at this point in history.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The state of the batch at this point in history.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.Batch.State result = - com.google.cloud.dataproc.v1.Batch.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.Batch.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object stateMessage_; - /** - * - * - *
-     * Output only. Details about the state at this point in history.
-     * 
- * - * string state_message = 2 [(.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. Details about the state at this point in history.
-     * 
- * - * string state_message = 2 [(.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 STATE_START_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp stateStartTime_; - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - @java.lang.Override - public boolean hasStateStartTime() { - return stateStartTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStateStartTime() { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - /** - * - * - *
-     * Output only. The time when the batch entered the historical state.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - return getStateStartTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (state_ != com.google.cloud.dataproc.v1.Batch.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stateMessage_); - } - if (stateStartTime_ != null) { - output.writeMessage(3, getStateStartTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.dataproc.v1.Batch.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, stateMessage_); - } - if (stateStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStateStartTime()); - } - 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.dataproc.v1.Batch.StateHistory)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.Batch.StateHistory other = - (com.google.cloud.dataproc.v1.Batch.StateHistory) obj; - - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (hasStateStartTime() != other.hasStateStartTime()) return false; - if (hasStateStartTime()) { - if (!getStateStartTime().equals(other.getStateStartTime())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - if (hasStateStartTime()) { - hash = (37 * hash) + STATE_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStateStartTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory 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.dataproc.v1.Batch.StateHistory parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory parseFrom( - 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.dataproc.v1.Batch.StateHistory parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory 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.dataproc.v1.Batch.StateHistory parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory 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.dataproc.v1.Batch.StateHistory parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory 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.dataproc.v1.Batch.StateHistory prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-     * Historical state information.
-     * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Batch.StateHistory} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Batch.StateHistory) - com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_StateHistory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Batch.StateHistory.class, - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.Batch.StateHistory.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(); - state_ = 0; - - stateMessage_ = ""; - - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.StateHistory getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.Batch.StateHistory.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.StateHistory build() { - com.google.cloud.dataproc.v1.Batch.StateHistory result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.StateHistory buildPartial() { - com.google.cloud.dataproc.v1.Batch.StateHistory result = - new com.google.cloud.dataproc.v1.Batch.StateHistory(this); - result.state_ = state_; - result.stateMessage_ = stateMessage_; - if (stateStartTimeBuilder_ == null) { - result.stateStartTime_ = stateStartTime_; - } else { - result.stateStartTime_ = stateStartTimeBuilder_.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.dataproc.v1.Batch.StateHistory) { - return mergeFrom((com.google.cloud.dataproc.v1.Batch.StateHistory) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.Batch.StateHistory other) { - if (other == com.google.cloud.dataproc.v1.Batch.StateHistory.getDefaultInstance()) - return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - onChanged(); - } - if (other.hasStateStartTime()) { - mergeStateStartTime(other.getStateStartTime()); - } - 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.dataproc.v1.Batch.StateHistory parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.Batch.StateHistory) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - * - * - *
-       * Output only. The state of the batch at this point in history.
-       * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-       * Output only. The state of the batch at this point in history.
-       * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The state of the batch at this point in history.
-       * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.Batch.State result = - com.google.cloud.dataproc.v1.Batch.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.Batch.State.UNRECOGNIZED : result; - } - /** - * - * - *
-       * Output only. The state of the batch at this point in history.
-       * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.Batch.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The state of the batch at this point in history.
-       * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 1 [(.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. Details about the state at this point in history.
-       * 
- * - * string state_message = 2 [(.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. Details about the state at this point in history.
-       * 
- * - * string state_message = 2 [(.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. Details about the state at this point in history.
-       * 
- * - * string state_message = 2 [(.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. Details about the state at this point in history.
-       * 
- * - * string state_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - - stateMessage_ = getDefaultInstance().getStateMessage(); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Details about the state at this point in history.
-       * 
- * - * string state_message = 2 [(.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 com.google.protobuf.Timestamp stateStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - stateStartTimeBuilder_; - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - public boolean hasStateStartTime() { - return stateStartTimeBuilder_ != null || stateStartTime_ != null; - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - public com.google.protobuf.Timestamp getStateStartTime() { - if (stateStartTimeBuilder_ == null) { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } else { - return stateStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateStartTime_ = value; - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = builderForValue.build(); - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (stateStartTime_ != null) { - stateStartTime_ = - com.google.protobuf.Timestamp.newBuilder(stateStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - stateStartTime_ = value; - } - onChanged(); - } else { - stateStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateStartTime() { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - onChanged(); - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStateStartTimeBuilder() { - - onChanged(); - return getStateStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - if (stateStartTimeBuilder_ != null) { - return stateStartTimeBuilder_.getMessageOrBuilder(); - } else { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - } - /** - * - * - *
-       * Output only. The time when the batch entered the historical state.
-       * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStateStartTimeFieldBuilder() { - if (stateStartTimeBuilder_ == null) { - stateStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStateStartTime(), getParentForChildren(), isClean()); - stateStartTime_ = null; - } - return stateStartTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.Batch.StateHistory) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.Batch.StateHistory) - private static final com.google.cloud.dataproc.v1.Batch.StateHistory DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.Batch.StateHistory(); - } - - public static com.google.cloud.dataproc.v1.Batch.StateHistory getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StateHistory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StateHistory(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.dataproc.v1.Batch.StateHistory getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int batchConfigCase_ = 0; - private java.lang.Object batchConfig_; - - public enum BatchConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PYSPARK_BATCH(4), - SPARK_BATCH(5), - SPARK_R_BATCH(6), - SPARK_SQL_BATCH(7), - BATCHCONFIG_NOT_SET(0); - private final int value; - - private BatchConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BatchConfigCase valueOf(int value) { - return forNumber(value); - } - - public static BatchConfigCase forNumber(int value) { - switch (value) { - case 4: - return PYSPARK_BATCH; - case 5: - return SPARK_BATCH; - case 6: - return SPARK_R_BATCH; - case 7: - return SPARK_SQL_BATCH; - case 0: - return BATCHCONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public BatchConfigCase getBatchConfigCase() { - return BatchConfigCase.forNumber(batchConfigCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the batch.
-   * 
- * - * 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 resource name of the batch.
-   * 
- * - * 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 UUID_FIELD_NUMBER = 2; - private volatile java.lang.Object uuid_; - /** - * - * - *
-   * Output only. A batch UUID (Unique Universal Identifier). The service
-   * generates this value when it creates the batch.
-   * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uuid. - */ - @java.lang.Override - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A batch UUID (Unique Universal Identifier). The service
-   * generates this value when it creates the batch.
-   * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int PYSPARK_BATCH_FIELD_NUMBER = 4; - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkBatch field is set. - */ - @java.lang.Override - public boolean hasPysparkBatch() { - return batchConfigCase_ == 4; - } - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatch getPysparkBatch() { - if (batchConfigCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatchOrBuilder getPysparkBatchOrBuilder() { - if (batchConfigCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - - public static final int SPARK_BATCH_FIELD_NUMBER = 5; - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkBatch field is set. - */ - @java.lang.Override - public boolean hasSparkBatch() { - return batchConfigCase_ == 5; - } - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatch getSparkBatch() { - if (batchConfigCase_ == 5) { - return (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatchOrBuilder getSparkBatchOrBuilder() { - if (batchConfigCase_ == 5) { - return (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - - public static final int SPARK_R_BATCH_FIELD_NUMBER = 6; - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRBatch field is set. - */ - @java.lang.Override - public boolean hasSparkRBatch() { - return batchConfigCase_ == 6; - } - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatch getSparkRBatch() { - if (batchConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatchOrBuilder getSparkRBatchOrBuilder() { - if (batchConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - - public static final int SPARK_SQL_BATCH_FIELD_NUMBER = 7; - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlBatch field is set. - */ - @java.lang.Override - public boolean hasSparkSqlBatch() { - return batchConfigCase_ == 7; - } - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatch getSparkSqlBatch() { - if (batchConfigCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder getSparkSqlBatchOrBuilder() { - if (batchConfigCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - - public static final int RUNTIME_INFO_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.RuntimeInfo runtimeInfo_; - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the runtimeInfo field is set. - */ - @java.lang.Override - public boolean hasRuntimeInfo() { - return runtimeInfo_ != null; - } - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The runtimeInfo. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeInfo getRuntimeInfo() { - return runtimeInfo_ == null - ? com.google.cloud.dataproc.v1.RuntimeInfo.getDefaultInstance() - : runtimeInfo_; - } - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder getRuntimeInfoOrBuilder() { - return getRuntimeInfo(); - } - - public static final int STATE_FIELD_NUMBER = 9; - private int state_; - /** - * - * - *
-   * Output only. The state of the batch.
-   * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.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 state of the batch.
-   * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.Batch.State result = - com.google.cloud.dataproc.v1.Batch.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.Batch.State.UNRECOGNIZED : result; - } - - public static final int STATE_MESSAGE_FIELD_NUMBER = 10; - private volatile java.lang.Object stateMessage_; - /** - * - * - *
-   * Output only. Batch state details, such as a failure
-   * description if the state is `FAILED`.
-   * 
- * - * string state_message = 10 [(.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. Batch state details, such as a failure
-   * description if the state is `FAILED`.
-   * 
- * - * string state_message = 10 [(.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 STATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp stateTime_; - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateTime field is set. - */ - @java.lang.Override - public boolean hasStateTime() { - return stateTime_ != null; - } - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStateTime() { - return stateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_; - } - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStateTimeOrBuilder() { - return getStateTime(); - } - - public static final int CREATOR_FIELD_NUMBER = 12; - private volatile java.lang.Object creator_; - /** - * - * - *
-   * Output only. The email address of the user who created the batch.
-   * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The creator. - */ - @java.lang.Override - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The email address of the user who created the batch.
-   * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for creator. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 13; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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 RUNTIME_CONFIG_FIELD_NUMBER = 14; - private com.google.cloud.dataproc.v1.RuntimeConfig runtimeConfig_; - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the runtimeConfig field is set. - */ - @java.lang.Override - public boolean hasRuntimeConfig() { - return runtimeConfig_ != null; - } - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The runtimeConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeConfig getRuntimeConfig() { - return runtimeConfig_ == null - ? com.google.cloud.dataproc.v1.RuntimeConfig.getDefaultInstance() - : runtimeConfig_; - } - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder getRuntimeConfigOrBuilder() { - return getRuntimeConfig(); - } - - public static final int ENVIRONMENT_CONFIG_FIELD_NUMBER = 15; - private com.google.cloud.dataproc.v1.EnvironmentConfig environmentConfig_; - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the environmentConfig field is set. - */ - @java.lang.Override - public boolean hasEnvironmentConfig() { - return environmentConfig_ != null; - } - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The environmentConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EnvironmentConfig getEnvironmentConfig() { - return environmentConfig_ == null - ? com.google.cloud.dataproc.v1.EnvironmentConfig.getDefaultInstance() - : environmentConfig_; - } - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder getEnvironmentConfigOrBuilder() { - return getEnvironmentConfig(); - } - - public static final int OPERATION_FIELD_NUMBER = 16; - private volatile java.lang.Object operation_; - /** - * - * - *
-   * Output only. The resource name of the operation associated with this batch.
-   * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operation. - */ - @java.lang.Override - public java.lang.String getOperation() { - java.lang.Object ref = operation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operation_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name of the operation associated with this batch.
-   * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operation. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOperationBytes() { - java.lang.Object ref = operation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_HISTORY_FIELD_NUMBER = 17; - private java.util.List stateHistory_; - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getStateHistoryList() { - return stateHistory_; - } - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getStateHistoryOrBuilderList() { - return stateHistory_; - } - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getStateHistoryCount() { - return stateHistory_.size(); - } - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.StateHistory getStateHistory(int index) { - return stateHistory_.get(index); - } - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder getStateHistoryOrBuilder( - int index) { - return stateHistory_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uuid_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (batchConfigCase_ == 4) { - output.writeMessage(4, (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_); - } - if (batchConfigCase_ == 5) { - output.writeMessage(5, (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_); - } - if (batchConfigCase_ == 6) { - output.writeMessage(6, (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_); - } - if (batchConfigCase_ == 7) { - output.writeMessage(7, (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_); - } - if (runtimeInfo_ != null) { - output.writeMessage(8, getRuntimeInfo()); - } - if (state_ != com.google.cloud.dataproc.v1.Batch.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(9, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, stateMessage_); - } - if (stateTime_ != null) { - output.writeMessage(11, getStateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, creator_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 13); - if (runtimeConfig_ != null) { - output.writeMessage(14, getRuntimeConfig()); - } - if (environmentConfig_ != null) { - output.writeMessage(15, getEnvironmentConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, operation_); - } - for (int i = 0; i < stateHistory_.size(); i++) { - output.writeMessage(17, stateHistory_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uuid_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (batchConfigCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_); - } - if (batchConfigCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_); - } - if (batchConfigCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_); - } - if (batchConfigCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_); - } - if (runtimeInfo_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getRuntimeInfo()); - } - if (state_ != com.google.cloud.dataproc.v1.Batch.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, stateMessage_); - } - if (stateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getStateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, creator_); - } - 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(13, labels__); - } - if (runtimeConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getRuntimeConfig()); - } - if (environmentConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getEnvironmentConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, operation_); - } - for (int i = 0; i < stateHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, stateHistory_.get(i)); - } - 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.dataproc.v1.Batch)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.Batch other = (com.google.cloud.dataproc.v1.Batch) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUuid().equals(other.getUuid())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasRuntimeInfo() != other.hasRuntimeInfo()) return false; - if (hasRuntimeInfo()) { - if (!getRuntimeInfo().equals(other.getRuntimeInfo())) return false; - } - if (state_ != other.state_) return false; - if (!getStateMessage().equals(other.getStateMessage())) return false; - if (hasStateTime() != other.hasStateTime()) return false; - if (hasStateTime()) { - if (!getStateTime().equals(other.getStateTime())) return false; - } - if (!getCreator().equals(other.getCreator())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasRuntimeConfig() != other.hasRuntimeConfig()) return false; - if (hasRuntimeConfig()) { - if (!getRuntimeConfig().equals(other.getRuntimeConfig())) return false; - } - if (hasEnvironmentConfig() != other.hasEnvironmentConfig()) return false; - if (hasEnvironmentConfig()) { - if (!getEnvironmentConfig().equals(other.getEnvironmentConfig())) return false; - } - if (!getOperation().equals(other.getOperation())) return false; - if (!getStateHistoryList().equals(other.getStateHistoryList())) return false; - if (!getBatchConfigCase().equals(other.getBatchConfigCase())) return false; - switch (batchConfigCase_) { - case 4: - if (!getPysparkBatch().equals(other.getPysparkBatch())) return false; - break; - case 5: - if (!getSparkBatch().equals(other.getSparkBatch())) return false; - break; - case 6: - if (!getSparkRBatch().equals(other.getSparkRBatch())) return false; - break; - case 7: - if (!getSparkSqlBatch().equals(other.getSparkSqlBatch())) return false; - break; - case 0: - default: - } - 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) + UUID_FIELD_NUMBER; - hash = (53 * hash) + getUuid().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasRuntimeInfo()) { - hash = (37 * hash) + RUNTIME_INFO_FIELD_NUMBER; - hash = (53 * hash) + getRuntimeInfo().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getStateMessage().hashCode(); - if (hasStateTime()) { - hash = (37 * hash) + STATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStateTime().hashCode(); - } - hash = (37 * hash) + CREATOR_FIELD_NUMBER; - hash = (53 * hash) + getCreator().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasRuntimeConfig()) { - hash = (37 * hash) + RUNTIME_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRuntimeConfig().hashCode(); - } - if (hasEnvironmentConfig()) { - hash = (37 * hash) + ENVIRONMENT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEnvironmentConfig().hashCode(); - } - hash = (37 * hash) + OPERATION_FIELD_NUMBER; - hash = (53 * hash) + getOperation().hashCode(); - if (getStateHistoryCount() > 0) { - hash = (37 * hash) + STATE_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getStateHistoryList().hashCode(); - } - switch (batchConfigCase_) { - case 4: - hash = (37 * hash) + PYSPARK_BATCH_FIELD_NUMBER; - hash = (53 * hash) + getPysparkBatch().hashCode(); - break; - case 5: - hash = (37 * hash) + SPARK_BATCH_FIELD_NUMBER; - hash = (53 * hash) + getSparkBatch().hashCode(); - break; - case 6: - hash = (37 * hash) + SPARK_R_BATCH_FIELD_NUMBER; - hash = (53 * hash) + getSparkRBatch().hashCode(); - break; - case 7: - hash = (37 * hash) + SPARK_SQL_BATCH_FIELD_NUMBER; - hash = (53 * hash) + getSparkSqlBatch().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.Batch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch 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.dataproc.v1.Batch parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch parseFrom( - 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.dataproc.v1.Batch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Batch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.Batch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch 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.dataproc.v1.Batch parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch 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.dataproc.v1.Batch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Batch 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.dataproc.v1.Batch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of a batch workload in the service.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Batch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Batch) - com.google.cloud.dataproc.v1.BatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 13: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 13: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Batch.class, - com.google.cloud.dataproc.v1.Batch.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.Batch.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStateHistoryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - uuid_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (runtimeInfoBuilder_ == null) { - runtimeInfo_ = null; - } else { - runtimeInfo_ = null; - runtimeInfoBuilder_ = null; - } - state_ = 0; - - stateMessage_ = ""; - - if (stateTimeBuilder_ == null) { - stateTime_ = null; - } else { - stateTime_ = null; - stateTimeBuilder_ = null; - } - creator_ = ""; - - internalGetMutableLabels().clear(); - if (runtimeConfigBuilder_ == null) { - runtimeConfig_ = null; - } else { - runtimeConfig_ = null; - runtimeConfigBuilder_ = null; - } - if (environmentConfigBuilder_ == null) { - environmentConfig_ = null; - } else { - environmentConfig_ = null; - environmentConfigBuilder_ = null; - } - operation_ = ""; - - if (stateHistoryBuilder_ == null) { - stateHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - stateHistoryBuilder_.clear(); - } - batchConfigCase_ = 0; - batchConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_Batch_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.Batch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch build() { - com.google.cloud.dataproc.v1.Batch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch buildPartial() { - com.google.cloud.dataproc.v1.Batch result = new com.google.cloud.dataproc.v1.Batch(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.uuid_ = uuid_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (batchConfigCase_ == 4) { - if (pysparkBatchBuilder_ == null) { - result.batchConfig_ = batchConfig_; - } else { - result.batchConfig_ = pysparkBatchBuilder_.build(); - } - } - if (batchConfigCase_ == 5) { - if (sparkBatchBuilder_ == null) { - result.batchConfig_ = batchConfig_; - } else { - result.batchConfig_ = sparkBatchBuilder_.build(); - } - } - if (batchConfigCase_ == 6) { - if (sparkRBatchBuilder_ == null) { - result.batchConfig_ = batchConfig_; - } else { - result.batchConfig_ = sparkRBatchBuilder_.build(); - } - } - if (batchConfigCase_ == 7) { - if (sparkSqlBatchBuilder_ == null) { - result.batchConfig_ = batchConfig_; - } else { - result.batchConfig_ = sparkSqlBatchBuilder_.build(); - } - } - if (runtimeInfoBuilder_ == null) { - result.runtimeInfo_ = runtimeInfo_; - } else { - result.runtimeInfo_ = runtimeInfoBuilder_.build(); - } - result.state_ = state_; - result.stateMessage_ = stateMessage_; - if (stateTimeBuilder_ == null) { - result.stateTime_ = stateTime_; - } else { - result.stateTime_ = stateTimeBuilder_.build(); - } - result.creator_ = creator_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (runtimeConfigBuilder_ == null) { - result.runtimeConfig_ = runtimeConfig_; - } else { - result.runtimeConfig_ = runtimeConfigBuilder_.build(); - } - if (environmentConfigBuilder_ == null) { - result.environmentConfig_ = environmentConfig_; - } else { - result.environmentConfig_ = environmentConfigBuilder_.build(); - } - result.operation_ = operation_; - if (stateHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - stateHistory_ = java.util.Collections.unmodifiableList(stateHistory_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.stateHistory_ = stateHistory_; - } else { - result.stateHistory_ = stateHistoryBuilder_.build(); - } - result.batchConfigCase_ = batchConfigCase_; - 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.dataproc.v1.Batch) { - return mergeFrom((com.google.cloud.dataproc.v1.Batch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.Batch other) { - if (other == com.google.cloud.dataproc.v1.Batch.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getUuid().isEmpty()) { - uuid_ = other.uuid_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasRuntimeInfo()) { - mergeRuntimeInfo(other.getRuntimeInfo()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getStateMessage().isEmpty()) { - stateMessage_ = other.stateMessage_; - onChanged(); - } - if (other.hasStateTime()) { - mergeStateTime(other.getStateTime()); - } - if (!other.getCreator().isEmpty()) { - creator_ = other.creator_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasRuntimeConfig()) { - mergeRuntimeConfig(other.getRuntimeConfig()); - } - if (other.hasEnvironmentConfig()) { - mergeEnvironmentConfig(other.getEnvironmentConfig()); - } - if (!other.getOperation().isEmpty()) { - operation_ = other.operation_; - onChanged(); - } - if (stateHistoryBuilder_ == null) { - if (!other.stateHistory_.isEmpty()) { - if (stateHistory_.isEmpty()) { - stateHistory_ = other.stateHistory_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureStateHistoryIsMutable(); - stateHistory_.addAll(other.stateHistory_); - } - onChanged(); - } - } else { - if (!other.stateHistory_.isEmpty()) { - if (stateHistoryBuilder_.isEmpty()) { - stateHistoryBuilder_.dispose(); - stateHistoryBuilder_ = null; - stateHistory_ = other.stateHistory_; - bitField0_ = (bitField0_ & ~0x00000002); - stateHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStateHistoryFieldBuilder() - : null; - } else { - stateHistoryBuilder_.addAllMessages(other.stateHistory_); - } - } - } - switch (other.getBatchConfigCase()) { - case PYSPARK_BATCH: - { - mergePysparkBatch(other.getPysparkBatch()); - break; - } - case SPARK_BATCH: - { - mergeSparkBatch(other.getSparkBatch()); - break; - } - case SPARK_R_BATCH: - { - mergeSparkRBatch(other.getSparkRBatch()); - break; - } - case SPARK_SQL_BATCH: - { - mergeSparkSqlBatch(other.getSparkSqlBatch()); - break; - } - case BATCHCONFIG_NOT_SET: - { - break; - } - } - 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.dataproc.v1.Batch parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.Batch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int batchConfigCase_ = 0; - private java.lang.Object batchConfig_; - - public BatchConfigCase getBatchConfigCase() { - return BatchConfigCase.forNumber(batchConfigCase_); - } - - public Builder clearBatchConfig() { - batchConfigCase_ = 0; - batchConfig_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name of the batch.
-     * 
- * - * 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 resource name of the batch.
-     * 
- * - * 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 resource name of the batch.
-     * 
- * - * 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 resource name of the batch.
-     * 
- * - * 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 resource name of the batch.
-     * 
- * - * 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 uuid_ = ""; - /** - * - * - *
-     * Output only. A batch UUID (Unique Universal Identifier). The service
-     * generates this value when it creates the batch.
-     * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uuid. - */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A batch UUID (Unique Universal Identifier). The service
-     * generates this value when it creates the batch.
-     * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uuid. - */ - public com.google.protobuf.ByteString getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A batch UUID (Unique Universal Identifier). The service
-     * generates this value when it creates the batch.
-     * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The uuid to set. - * @return This builder for chaining. - */ - public Builder setUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A batch UUID (Unique Universal Identifier). The service
-     * generates this value when it creates the batch.
-     * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearUuid() { - - uuid_ = getDefaultInstance().getUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A batch UUID (Unique Universal Identifier). The service
-     * generates this value when it creates the batch.
-     * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for uuid to set. - * @return This builder for chaining. - */ - public Builder setUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uuid_ = value; - onChanged(); - 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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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 when the batch was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 3 [(.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.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkBatch, - com.google.cloud.dataproc.v1.PySparkBatch.Builder, - com.google.cloud.dataproc.v1.PySparkBatchOrBuilder> - pysparkBatchBuilder_; - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkBatch field is set. - */ - @java.lang.Override - public boolean hasPysparkBatch() { - return batchConfigCase_ == 4; - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatch getPysparkBatch() { - if (pysparkBatchBuilder_ == null) { - if (batchConfigCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } else { - if (batchConfigCase_ == 4) { - return pysparkBatchBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkBatch(com.google.cloud.dataproc.v1.PySparkBatch value) { - if (pysparkBatchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - batchConfig_ = value; - onChanged(); - } else { - pysparkBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkBatch( - com.google.cloud.dataproc.v1.PySparkBatch.Builder builderForValue) { - if (pysparkBatchBuilder_ == null) { - batchConfig_ = builderForValue.build(); - onChanged(); - } else { - pysparkBatchBuilder_.setMessage(builderForValue.build()); - } - batchConfigCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePysparkBatch(com.google.cloud.dataproc.v1.PySparkBatch value) { - if (pysparkBatchBuilder_ == null) { - if (batchConfigCase_ == 4 - && batchConfig_ != com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance()) { - batchConfig_ = - com.google.cloud.dataproc.v1.PySparkBatch.newBuilder( - (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - batchConfig_ = value; - } - onChanged(); - } else { - if (batchConfigCase_ == 4) { - pysparkBatchBuilder_.mergeFrom(value); - } - pysparkBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPysparkBatch() { - if (pysparkBatchBuilder_ == null) { - if (batchConfigCase_ == 4) { - batchConfigCase_ = 0; - batchConfig_ = null; - onChanged(); - } - } else { - if (batchConfigCase_ == 4) { - batchConfigCase_ = 0; - batchConfig_ = null; - } - pysparkBatchBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PySparkBatch.Builder getPysparkBatchBuilder() { - return getPysparkBatchFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatchOrBuilder getPysparkBatchOrBuilder() { - if ((batchConfigCase_ == 4) && (pysparkBatchBuilder_ != null)) { - return pysparkBatchBuilder_.getMessageOrBuilder(); - } else { - if (batchConfigCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. PySpark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkBatch, - com.google.cloud.dataproc.v1.PySparkBatch.Builder, - com.google.cloud.dataproc.v1.PySparkBatchOrBuilder> - getPysparkBatchFieldBuilder() { - if (pysparkBatchBuilder_ == null) { - if (!(batchConfigCase_ == 4)) { - batchConfig_ = com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - pysparkBatchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkBatch, - com.google.cloud.dataproc.v1.PySparkBatch.Builder, - com.google.cloud.dataproc.v1.PySparkBatchOrBuilder>( - (com.google.cloud.dataproc.v1.PySparkBatch) batchConfig_, - getParentForChildren(), - isClean()); - batchConfig_ = null; - } - batchConfigCase_ = 4; - onChanged(); - ; - return pysparkBatchBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkBatch, - com.google.cloud.dataproc.v1.SparkBatch.Builder, - com.google.cloud.dataproc.v1.SparkBatchOrBuilder> - sparkBatchBuilder_; - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkBatch field is set. - */ - @java.lang.Override - public boolean hasSparkBatch() { - return batchConfigCase_ == 5; - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatch getSparkBatch() { - if (sparkBatchBuilder_ == null) { - if (batchConfigCase_ == 5) { - return (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } else { - if (batchConfigCase_ == 5) { - return sparkBatchBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkBatch(com.google.cloud.dataproc.v1.SparkBatch value) { - if (sparkBatchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - batchConfig_ = value; - onChanged(); - } else { - sparkBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkBatch(com.google.cloud.dataproc.v1.SparkBatch.Builder builderForValue) { - if (sparkBatchBuilder_ == null) { - batchConfig_ = builderForValue.build(); - onChanged(); - } else { - sparkBatchBuilder_.setMessage(builderForValue.build()); - } - batchConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkBatch(com.google.cloud.dataproc.v1.SparkBatch value) { - if (sparkBatchBuilder_ == null) { - if (batchConfigCase_ == 5 - && batchConfig_ != com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance()) { - batchConfig_ = - com.google.cloud.dataproc.v1.SparkBatch.newBuilder( - (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - batchConfig_ = value; - } - onChanged(); - } else { - if (batchConfigCase_ == 5) { - sparkBatchBuilder_.mergeFrom(value); - } - sparkBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkBatch() { - if (sparkBatchBuilder_ == null) { - if (batchConfigCase_ == 5) { - batchConfigCase_ = 0; - batchConfig_ = null; - onChanged(); - } - } else { - if (batchConfigCase_ == 5) { - batchConfigCase_ = 0; - batchConfig_ = null; - } - sparkBatchBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkBatch.Builder getSparkBatchBuilder() { - return getSparkBatchFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatchOrBuilder getSparkBatchOrBuilder() { - if ((batchConfigCase_ == 5) && (sparkBatchBuilder_ != null)) { - return sparkBatchBuilder_.getMessageOrBuilder(); - } else { - if (batchConfigCase_ == 5) { - return (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Spark batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkBatch, - com.google.cloud.dataproc.v1.SparkBatch.Builder, - com.google.cloud.dataproc.v1.SparkBatchOrBuilder> - getSparkBatchFieldBuilder() { - if (sparkBatchBuilder_ == null) { - if (!(batchConfigCase_ == 5)) { - batchConfig_ = com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - sparkBatchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkBatch, - com.google.cloud.dataproc.v1.SparkBatch.Builder, - com.google.cloud.dataproc.v1.SparkBatchOrBuilder>( - (com.google.cloud.dataproc.v1.SparkBatch) batchConfig_, - getParentForChildren(), - isClean()); - batchConfig_ = null; - } - batchConfigCase_ = 5; - onChanged(); - ; - return sparkBatchBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRBatch, - com.google.cloud.dataproc.v1.SparkRBatch.Builder, - com.google.cloud.dataproc.v1.SparkRBatchOrBuilder> - sparkRBatchBuilder_; - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRBatch field is set. - */ - @java.lang.Override - public boolean hasSparkRBatch() { - return batchConfigCase_ == 6; - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatch getSparkRBatch() { - if (sparkRBatchBuilder_ == null) { - if (batchConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } else { - if (batchConfigCase_ == 6) { - return sparkRBatchBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRBatch(com.google.cloud.dataproc.v1.SparkRBatch value) { - if (sparkRBatchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - batchConfig_ = value; - onChanged(); - } else { - sparkRBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRBatch( - com.google.cloud.dataproc.v1.SparkRBatch.Builder builderForValue) { - if (sparkRBatchBuilder_ == null) { - batchConfig_ = builderForValue.build(); - onChanged(); - } else { - sparkRBatchBuilder_.setMessage(builderForValue.build()); - } - batchConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkRBatch(com.google.cloud.dataproc.v1.SparkRBatch value) { - if (sparkRBatchBuilder_ == null) { - if (batchConfigCase_ == 6 - && batchConfig_ != com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance()) { - batchConfig_ = - com.google.cloud.dataproc.v1.SparkRBatch.newBuilder( - (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - batchConfig_ = value; - } - onChanged(); - } else { - if (batchConfigCase_ == 6) { - sparkRBatchBuilder_.mergeFrom(value); - } - sparkRBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkRBatch() { - if (sparkRBatchBuilder_ == null) { - if (batchConfigCase_ == 6) { - batchConfigCase_ = 0; - batchConfig_ = null; - onChanged(); - } - } else { - if (batchConfigCase_ == 6) { - batchConfigCase_ = 0; - batchConfig_ = null; - } - sparkRBatchBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkRBatch.Builder getSparkRBatchBuilder() { - return getSparkRBatchFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatchOrBuilder getSparkRBatchOrBuilder() { - if ((batchConfigCase_ == 6) && (sparkRBatchBuilder_ != null)) { - return sparkRBatchBuilder_.getMessageOrBuilder(); - } else { - if (batchConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. SparkR batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRBatch, - com.google.cloud.dataproc.v1.SparkRBatch.Builder, - com.google.cloud.dataproc.v1.SparkRBatchOrBuilder> - getSparkRBatchFieldBuilder() { - if (sparkRBatchBuilder_ == null) { - if (!(batchConfigCase_ == 6)) { - batchConfig_ = com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - sparkRBatchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRBatch, - com.google.cloud.dataproc.v1.SparkRBatch.Builder, - com.google.cloud.dataproc.v1.SparkRBatchOrBuilder>( - (com.google.cloud.dataproc.v1.SparkRBatch) batchConfig_, - getParentForChildren(), - isClean()); - batchConfig_ = null; - } - batchConfigCase_ = 6; - onChanged(); - ; - return sparkRBatchBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlBatch, - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder, - com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder> - sparkSqlBatchBuilder_; - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlBatch field is set. - */ - @java.lang.Override - public boolean hasSparkSqlBatch() { - return batchConfigCase_ == 7; - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlBatch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatch getSparkSqlBatch() { - if (sparkSqlBatchBuilder_ == null) { - if (batchConfigCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } else { - if (batchConfigCase_ == 7) { - return sparkSqlBatchBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlBatch(com.google.cloud.dataproc.v1.SparkSqlBatch value) { - if (sparkSqlBatchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - batchConfig_ = value; - onChanged(); - } else { - sparkSqlBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlBatch( - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder builderForValue) { - if (sparkSqlBatchBuilder_ == null) { - batchConfig_ = builderForValue.build(); - onChanged(); - } else { - sparkSqlBatchBuilder_.setMessage(builderForValue.build()); - } - batchConfigCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkSqlBatch(com.google.cloud.dataproc.v1.SparkSqlBatch value) { - if (sparkSqlBatchBuilder_ == null) { - if (batchConfigCase_ == 7 - && batchConfig_ != com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance()) { - batchConfig_ = - com.google.cloud.dataproc.v1.SparkSqlBatch.newBuilder( - (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - batchConfig_ = value; - } - onChanged(); - } else { - if (batchConfigCase_ == 7) { - sparkSqlBatchBuilder_.mergeFrom(value); - } - sparkSqlBatchBuilder_.setMessage(value); - } - batchConfigCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkSqlBatch() { - if (sparkSqlBatchBuilder_ == null) { - if (batchConfigCase_ == 7) { - batchConfigCase_ = 0; - batchConfig_ = null; - onChanged(); - } - } else { - if (batchConfigCase_ == 7) { - batchConfigCase_ = 0; - batchConfig_ = null; - } - sparkSqlBatchBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkSqlBatch.Builder getSparkSqlBatchBuilder() { - return getSparkSqlBatchFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder getSparkSqlBatchOrBuilder() { - if ((batchConfigCase_ == 7) && (sparkSqlBatchBuilder_ != null)) { - return sparkSqlBatchBuilder_.getMessageOrBuilder(); - } else { - if (batchConfigCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_; - } - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. SparkSql batch config.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlBatch, - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder, - com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder> - getSparkSqlBatchFieldBuilder() { - if (sparkSqlBatchBuilder_ == null) { - if (!(batchConfigCase_ == 7)) { - batchConfig_ = com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - sparkSqlBatchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlBatch, - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder, - com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder>( - (com.google.cloud.dataproc.v1.SparkSqlBatch) batchConfig_, - getParentForChildren(), - isClean()); - batchConfig_ = null; - } - batchConfigCase_ = 7; - onChanged(); - ; - return sparkSqlBatchBuilder_; - } - - private com.google.cloud.dataproc.v1.RuntimeInfo runtimeInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeInfo, - com.google.cloud.dataproc.v1.RuntimeInfo.Builder, - com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder> - runtimeInfoBuilder_; - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the runtimeInfo field is set. - */ - public boolean hasRuntimeInfo() { - return runtimeInfoBuilder_ != null || runtimeInfo_ != null; - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The runtimeInfo. - */ - public com.google.cloud.dataproc.v1.RuntimeInfo getRuntimeInfo() { - if (runtimeInfoBuilder_ == null) { - return runtimeInfo_ == null - ? com.google.cloud.dataproc.v1.RuntimeInfo.getDefaultInstance() - : runtimeInfo_; - } else { - return runtimeInfoBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRuntimeInfo(com.google.cloud.dataproc.v1.RuntimeInfo value) { - if (runtimeInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - runtimeInfo_ = value; - onChanged(); - } else { - runtimeInfoBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRuntimeInfo( - com.google.cloud.dataproc.v1.RuntimeInfo.Builder builderForValue) { - if (runtimeInfoBuilder_ == null) { - runtimeInfo_ = builderForValue.build(); - onChanged(); - } else { - runtimeInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeRuntimeInfo(com.google.cloud.dataproc.v1.RuntimeInfo value) { - if (runtimeInfoBuilder_ == null) { - if (runtimeInfo_ != null) { - runtimeInfo_ = - com.google.cloud.dataproc.v1.RuntimeInfo.newBuilder(runtimeInfo_) - .mergeFrom(value) - .buildPartial(); - } else { - runtimeInfo_ = value; - } - onChanged(); - } else { - runtimeInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRuntimeInfo() { - if (runtimeInfoBuilder_ == null) { - runtimeInfo_ = null; - onChanged(); - } else { - runtimeInfo_ = null; - runtimeInfoBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.RuntimeInfo.Builder getRuntimeInfoBuilder() { - - onChanged(); - return getRuntimeInfoFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder getRuntimeInfoOrBuilder() { - if (runtimeInfoBuilder_ != null) { - return runtimeInfoBuilder_.getMessageOrBuilder(); - } else { - return runtimeInfo_ == null - ? com.google.cloud.dataproc.v1.RuntimeInfo.getDefaultInstance() - : runtimeInfo_; - } - } - /** - * - * - *
-     * Output only. Runtime information about batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeInfo, - com.google.cloud.dataproc.v1.RuntimeInfo.Builder, - com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder> - getRuntimeInfoFieldBuilder() { - if (runtimeInfoBuilder_ == null) { - runtimeInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeInfo, - com.google.cloud.dataproc.v1.RuntimeInfo.Builder, - com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder>( - getRuntimeInfo(), getParentForChildren(), isClean()); - runtimeInfo_ = null; - } - return runtimeInfoBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The state of the batch.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.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 state of the batch.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.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 state of the batch.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.Batch.State result = - com.google.cloud.dataproc.v1.Batch.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.Batch.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. The state of the batch.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.Batch.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The state of the batch.
-     * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.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. Batch state details, such as a failure
-     * description if the state is `FAILED`.
-     * 
- * - * string state_message = 10 [(.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. Batch state details, such as a failure
-     * description if the state is `FAILED`.
-     * 
- * - * string state_message = 10 [(.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. Batch state details, such as a failure
-     * description if the state is `FAILED`.
-     * 
- * - * string state_message = 10 [(.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. Batch state details, such as a failure
-     * description if the state is `FAILED`.
-     * 
- * - * string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStateMessage() { - - stateMessage_ = getDefaultInstance().getStateMessage(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Batch state details, such as a failure
-     * description if the state is `FAILED`.
-     * 
- * - * string state_message = 10 [(.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 com.google.protobuf.Timestamp stateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - stateTimeBuilder_; - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateTime field is set. - */ - public boolean hasStateTime() { - return stateTimeBuilder_ != null || stateTime_ != null; - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateTime. - */ - public com.google.protobuf.Timestamp getStateTime() { - if (stateTimeBuilder_ == null) { - return stateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_; - } else { - return stateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateTime(com.google.protobuf.Timestamp value) { - if (stateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateTime_ = value; - onChanged(); - } else { - stateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (stateTimeBuilder_ == null) { - stateTime_ = builderForValue.build(); - onChanged(); - } else { - stateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateTime(com.google.protobuf.Timestamp value) { - if (stateTimeBuilder_ == null) { - if (stateTime_ != null) { - stateTime_ = - com.google.protobuf.Timestamp.newBuilder(stateTime_).mergeFrom(value).buildPartial(); - } else { - stateTime_ = value; - } - onChanged(); - } else { - stateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateTime() { - if (stateTimeBuilder_ == null) { - stateTime_ = null; - onChanged(); - } else { - stateTime_ = null; - stateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStateTimeBuilder() { - - onChanged(); - return getStateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStateTimeOrBuilder() { - if (stateTimeBuilder_ != null) { - return stateTimeBuilder_.getMessageOrBuilder(); - } else { - return stateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : stateTime_; - } - } - /** - * - * - *
-     * Output only. The time when the batch entered a current state.
-     * 
- * - * - * .google.protobuf.Timestamp state_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> - getStateTimeFieldBuilder() { - if (stateTimeBuilder_ == null) { - stateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStateTime(), getParentForChildren(), isClean()); - stateTime_ = null; - } - return stateTimeBuilder_; - } - - private java.lang.Object creator_ = ""; - /** - * - * - *
-     * Output only. The email address of the user who created the batch.
-     * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The creator. - */ - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The email address of the user who created the batch.
-     * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for creator. - */ - public com.google.protobuf.ByteString getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The email address of the user who created the batch.
-     * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The creator to set. - * @return This builder for chaining. - */ - public Builder setCreator(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - creator_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The email address of the user who created the batch.
-     * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearCreator() { - - creator_ = getDefaultInstance().getCreator(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The email address of the user who created the batch.
-     * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for creator to set. - * @return This builder for chaining. - */ - public Builder setCreatorBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - creator_ = value; - onChanged(); - return this; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this batch.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a batch.
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.RuntimeConfig runtimeConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeConfig, - com.google.cloud.dataproc.v1.RuntimeConfig.Builder, - com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder> - runtimeConfigBuilder_; - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the runtimeConfig field is set. - */ - public boolean hasRuntimeConfig() { - return runtimeConfigBuilder_ != null || runtimeConfig_ != null; - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The runtimeConfig. - */ - public com.google.cloud.dataproc.v1.RuntimeConfig getRuntimeConfig() { - if (runtimeConfigBuilder_ == null) { - return runtimeConfig_ == null - ? com.google.cloud.dataproc.v1.RuntimeConfig.getDefaultInstance() - : runtimeConfig_; - } else { - return runtimeConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRuntimeConfig(com.google.cloud.dataproc.v1.RuntimeConfig value) { - if (runtimeConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - runtimeConfig_ = value; - onChanged(); - } else { - runtimeConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setRuntimeConfig( - com.google.cloud.dataproc.v1.RuntimeConfig.Builder builderForValue) { - if (runtimeConfigBuilder_ == null) { - runtimeConfig_ = builderForValue.build(); - onChanged(); - } else { - runtimeConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeRuntimeConfig(com.google.cloud.dataproc.v1.RuntimeConfig value) { - if (runtimeConfigBuilder_ == null) { - if (runtimeConfig_ != null) { - runtimeConfig_ = - com.google.cloud.dataproc.v1.RuntimeConfig.newBuilder(runtimeConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - runtimeConfig_ = value; - } - onChanged(); - } else { - runtimeConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearRuntimeConfig() { - if (runtimeConfigBuilder_ == null) { - runtimeConfig_ = null; - onChanged(); - } else { - runtimeConfig_ = null; - runtimeConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.RuntimeConfig.Builder getRuntimeConfigBuilder() { - - onChanged(); - return getRuntimeConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder getRuntimeConfigOrBuilder() { - if (runtimeConfigBuilder_ != null) { - return runtimeConfigBuilder_.getMessageOrBuilder(); - } else { - return runtimeConfig_ == null - ? com.google.cloud.dataproc.v1.RuntimeConfig.getDefaultInstance() - : runtimeConfig_; - } - } - /** - * - * - *
-     * Optional. Runtime configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeConfig, - com.google.cloud.dataproc.v1.RuntimeConfig.Builder, - com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder> - getRuntimeConfigFieldBuilder() { - if (runtimeConfigBuilder_ == null) { - runtimeConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RuntimeConfig, - com.google.cloud.dataproc.v1.RuntimeConfig.Builder, - com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder>( - getRuntimeConfig(), getParentForChildren(), isClean()); - runtimeConfig_ = null; - } - return runtimeConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.EnvironmentConfig environmentConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EnvironmentConfig, - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder, - com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder> - environmentConfigBuilder_; - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the environmentConfig field is set. - */ - public boolean hasEnvironmentConfig() { - return environmentConfigBuilder_ != null || environmentConfig_ != null; - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The environmentConfig. - */ - public com.google.cloud.dataproc.v1.EnvironmentConfig getEnvironmentConfig() { - if (environmentConfigBuilder_ == null) { - return environmentConfig_ == null - ? com.google.cloud.dataproc.v1.EnvironmentConfig.getDefaultInstance() - : environmentConfig_; - } else { - return environmentConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEnvironmentConfig(com.google.cloud.dataproc.v1.EnvironmentConfig value) { - if (environmentConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - environmentConfig_ = value; - onChanged(); - } else { - environmentConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEnvironmentConfig( - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder builderForValue) { - if (environmentConfigBuilder_ == null) { - environmentConfig_ = builderForValue.build(); - onChanged(); - } else { - environmentConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEnvironmentConfig(com.google.cloud.dataproc.v1.EnvironmentConfig value) { - if (environmentConfigBuilder_ == null) { - if (environmentConfig_ != null) { - environmentConfig_ = - com.google.cloud.dataproc.v1.EnvironmentConfig.newBuilder(environmentConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - environmentConfig_ = value; - } - onChanged(); - } else { - environmentConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEnvironmentConfig() { - if (environmentConfigBuilder_ == null) { - environmentConfig_ = null; - onChanged(); - } else { - environmentConfig_ = null; - environmentConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EnvironmentConfig.Builder getEnvironmentConfigBuilder() { - - onChanged(); - return getEnvironmentConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder getEnvironmentConfigOrBuilder() { - if (environmentConfigBuilder_ != null) { - return environmentConfigBuilder_.getMessageOrBuilder(); - } else { - return environmentConfig_ == null - ? com.google.cloud.dataproc.v1.EnvironmentConfig.getDefaultInstance() - : environmentConfig_; - } - } - /** - * - * - *
-     * Optional. Environment configuration for the batch execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EnvironmentConfig, - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder, - com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder> - getEnvironmentConfigFieldBuilder() { - if (environmentConfigBuilder_ == null) { - environmentConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EnvironmentConfig, - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder, - com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder>( - getEnvironmentConfig(), getParentForChildren(), isClean()); - environmentConfig_ = null; - } - return environmentConfigBuilder_; - } - - private java.lang.Object operation_ = ""; - /** - * - * - *
-     * Output only. The resource name of the operation associated with this batch.
-     * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operation. - */ - public java.lang.String getOperation() { - java.lang.Object ref = operation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the operation associated with this batch.
-     * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operation. - */ - public com.google.protobuf.ByteString getOperationBytes() { - java.lang.Object ref = operation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the operation associated with this batch.
-     * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The operation to set. - * @return This builder for chaining. - */ - public Builder setOperation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - operation_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the operation associated with this batch.
-     * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOperation() { - - operation_ = getDefaultInstance().getOperation(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the operation associated with this batch.
-     * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for operation to set. - * @return This builder for chaining. - */ - public Builder setOperationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - operation_ = value; - onChanged(); - return this; - } - - private java.util.List stateHistory_ = - java.util.Collections.emptyList(); - - private void ensureStateHistoryIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - stateHistory_ = - new java.util.ArrayList(stateHistory_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch.StateHistory, - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder, - com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder> - stateHistoryBuilder_; - - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getStateHistoryList() { - if (stateHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(stateHistory_); - } else { - return stateHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getStateHistoryCount() { - if (stateHistoryBuilder_ == null) { - return stateHistory_.size(); - } else { - return stateHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Batch.StateHistory getStateHistory(int index) { - if (stateHistoryBuilder_ == null) { - return stateHistory_.get(index); - } else { - return stateHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateHistory( - int index, com.google.cloud.dataproc.v1.Batch.StateHistory value) { - if (stateHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStateHistoryIsMutable(); - stateHistory_.set(index, value); - onChanged(); - } else { - stateHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateHistory( - int index, com.google.cloud.dataproc.v1.Batch.StateHistory.Builder builderForValue) { - if (stateHistoryBuilder_ == null) { - ensureStateHistoryIsMutable(); - stateHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - stateHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStateHistory(com.google.cloud.dataproc.v1.Batch.StateHistory value) { - if (stateHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStateHistoryIsMutable(); - stateHistory_.add(value); - onChanged(); - } else { - stateHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStateHistory( - int index, com.google.cloud.dataproc.v1.Batch.StateHistory value) { - if (stateHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStateHistoryIsMutable(); - stateHistory_.add(index, value); - onChanged(); - } else { - stateHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStateHistory( - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder builderForValue) { - if (stateHistoryBuilder_ == null) { - ensureStateHistoryIsMutable(); - stateHistory_.add(builderForValue.build()); - onChanged(); - } else { - stateHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStateHistory( - int index, com.google.cloud.dataproc.v1.Batch.StateHistory.Builder builderForValue) { - if (stateHistoryBuilder_ == null) { - ensureStateHistoryIsMutable(); - stateHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - stateHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllStateHistory( - java.lang.Iterable values) { - if (stateHistoryBuilder_ == null) { - ensureStateHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stateHistory_); - onChanged(); - } else { - stateHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateHistory() { - if (stateHistoryBuilder_ == null) { - stateHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - stateHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeStateHistory(int index) { - if (stateHistoryBuilder_ == null) { - ensureStateHistoryIsMutable(); - stateHistory_.remove(index); - onChanged(); - } else { - stateHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Batch.StateHistory.Builder getStateHistoryBuilder( - int index) { - return getStateHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder getStateHistoryOrBuilder( - int index) { - if (stateHistoryBuilder_ == null) { - return stateHistory_.get(index); - } else { - return stateHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStateHistoryOrBuilderList() { - if (stateHistoryBuilder_ != null) { - return stateHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(stateHistory_); - } - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Batch.StateHistory.Builder addStateHistoryBuilder() { - return getStateHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.Batch.StateHistory.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Batch.StateHistory.Builder addStateHistoryBuilder( - int index) { - return getStateHistoryFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.Batch.StateHistory.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Historical state information for the batch.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStateHistoryBuilderList() { - return getStateHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch.StateHistory, - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder, - com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder> - getStateHistoryFieldBuilder() { - if (stateHistoryBuilder_ == null) { - stateHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch.StateHistory, - com.google.cloud.dataproc.v1.Batch.StateHistory.Builder, - com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder>( - stateHistory_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - stateHistory_ = null; - } - return stateHistoryBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.Batch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.Batch) - private static final com.google.cloud.dataproc.v1.Batch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.Batch(); - } - - public static com.google.cloud.dataproc.v1.Batch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Batch parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Batch(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.dataproc.v1.Batch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchName.java deleted file mode 100644 index cc26cad6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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.dataproc.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 BatchName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_BATCH = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/batches/{batch}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String batch; - - @Deprecated - protected BatchName() { - project = null; - location = null; - batch = null; - } - - private BatchName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - batch = Preconditions.checkNotNull(builder.getBatch()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBatch() { - return batch; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static BatchName of(String project, String location, String batch) { - return newBuilder().setProject(project).setLocation(location).setBatch(batch).build(); - } - - public static String format(String project, String location, String batch) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setBatch(batch) - .build() - .toString(); - } - - public static BatchName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_BATCH.validatedMatch( - formattedString, "BatchName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("batch")); - } - - 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 (BatchName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_BATCH.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 (batch != null) { - fieldMapBuilder.put("batch", batch); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_BATCH.instantiate( - "project", project, "location", location, "batch", batch); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - BatchName that = ((BatchName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.batch, that.batch); - } - 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(batch); - return h; - } - - /** Builder for projects/{project}/locations/{location}/batches/{batch}. */ - public static class Builder { - private String project; - private String location; - private String batch; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getBatch() { - return batch; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setBatch(String batch) { - this.batch = batch; - return this; - } - - private Builder(BatchName batchName) { - this.project = batchName.project; - this.location = batchName.location; - this.batch = batchName.batch; - } - - public BatchName build() { - return new BatchName(this); - } - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadata.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadata.java deleted file mode 100644 index 9308ef78..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadata.java +++ /dev/null @@ -1,2445 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Metadata describing the Batch operation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BatchOperationMetadata} - */ -public final class BatchOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.BatchOperationMetadata) - BatchOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchOperationMetadata.newBuilder() to construct. - private BatchOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchOperationMetadata() { - batch_ = ""; - batchUuid_ = ""; - operationType_ = 0; - description_ = ""; - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchOperationMetadata( - 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(); - - batch_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - batchUuid_ = s; - break; - } - case 26: - { - 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 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (doneTime_ != null) { - subBuilder = doneTime_.toBuilder(); - } - doneTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(doneTime_); - doneTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - operationType_ = rawValue; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - warnings_.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_ & 0x00000002) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BatchOperationMetadata.class, - com.google.cloud.dataproc.v1.BatchOperationMetadata.Builder.class); - } - - /** - * - * - *
-   * Operation type for Batch resources
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType} - */ - public enum BatchOperationType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Batch operation type is unknown.
-     * 
- * - * BATCH_OPERATION_TYPE_UNSPECIFIED = 0; - */ - BATCH_OPERATION_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Batch operation type.
-     * 
- * - * BATCH = 1; - */ - BATCH(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Batch operation type is unknown.
-     * 
- * - * BATCH_OPERATION_TYPE_UNSPECIFIED = 0; - */ - public static final int BATCH_OPERATION_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Batch operation type.
-     * 
- * - * BATCH = 1; - */ - public static final int BATCH_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BatchOperationType 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 BatchOperationType forNumber(int value) { - switch (value) { - case 0: - return BATCH_OPERATION_TYPE_UNSPECIFIED; - case 1: - return BATCH; - 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 BatchOperationType findValueByNumber(int number) { - return BatchOperationType.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.dataproc.v1.BatchOperationMetadata.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final BatchOperationType[] VALUES = values(); - - public static BatchOperationType 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 BatchOperationType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType) - } - - public static final int BATCH_FIELD_NUMBER = 1; - private volatile java.lang.Object batch_; - /** - * - * - *
-   * Name of the batch for the operation.
-   * 
- * - * string batch = 1; - * - * @return The batch. - */ - @java.lang.Override - public java.lang.String getBatch() { - java.lang.Object ref = batch_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batch_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the batch for the operation.
-   * 
- * - * string batch = 1; - * - * @return The bytes for batch. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBatchBytes() { - java.lang.Object ref = batch_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batch_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BATCH_UUID_FIELD_NUMBER = 2; - private volatile java.lang.Object batchUuid_; - /** - * - * - *
-   * Batch UUID for the operation.
-   * 
- * - * string batch_uuid = 2; - * - * @return The batchUuid. - */ - @java.lang.Override - public java.lang.String getBatchUuid() { - java.lang.Object ref = batchUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batchUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Batch UUID for the operation.
-   * 
- * - * string batch_uuid = 2; - * - * @return The bytes for batchUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBatchUuidBytes() { - java.lang.Object ref = batchUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batchUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int DONE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp doneTime_; - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return Whether the doneTime field is set. - */ - @java.lang.Override - public boolean hasDoneTime() { - return doneTime_ != null; - } - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return The doneTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDoneTime() { - return doneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : doneTime_; - } - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDoneTimeOrBuilder() { - return getDoneTime(); - } - - public static final int OPERATION_TYPE_FIELD_NUMBER = 6; - private int operationType_; - /** - * - * - *
-   * The operation type.
-   * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The enum numeric value on the wire for operationType. - */ - @java.lang.Override - public int getOperationTypeValue() { - return operationType_; - } - /** - * - * - *
-   * The operation type.
-   * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The operationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType getOperationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType result = - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType.valueOf( - operationType_); - return result == null - ? com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType.UNRECOGNIZED - : result; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 7; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Short description of the operation.
-   * 
- * - * string description = 7; - * - * @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; - } - } - /** - * - * - *
-   * Short description of the operation.
-   * 
- * - * string description = 7; - * - * @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 LABELS_FIELD_NUMBER = 8; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_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(); - } - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * 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(); - } - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * 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; - } - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * 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 WARNINGS_FIELD_NUMBER = 9; - private com.google.protobuf.LazyStringList warnings_; - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @return A list containing the warnings. - */ - public com.google.protobuf.ProtocolStringList getWarningsList() { - return warnings_; - } - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - public java.lang.String getWarnings(int index) { - return warnings_.get(index); - } - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - public com.google.protobuf.ByteString getWarningsBytes(int index) { - return warnings_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batch_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, batch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, batchUuid_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (doneTime_ != null) { - output.writeMessage(4, getDoneTime()); - } - if (operationType_ - != com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType - .BATCH_OPERATION_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, operationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - for (int i = 0; i < warnings_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, warnings_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batch_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, batch_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, batchUuid_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (doneTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDoneTime()); - } - if (operationType_ - != com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType - .BATCH_OPERATION_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, operationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); - } - 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__); - } - { - int dataSize = 0; - for (int i = 0; i < warnings_.size(); i++) { - dataSize += computeStringSizeNoTag(warnings_.getRaw(i)); - } - size += dataSize; - size += 1 * getWarningsList().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.dataproc.v1.BatchOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.BatchOperationMetadata other = - (com.google.cloud.dataproc.v1.BatchOperationMetadata) obj; - - if (!getBatch().equals(other.getBatch())) return false; - if (!getBatchUuid().equals(other.getBatchUuid())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasDoneTime() != other.hasDoneTime()) return false; - if (hasDoneTime()) { - if (!getDoneTime().equals(other.getDoneTime())) return false; - } - if (operationType_ != other.operationType_) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getWarningsList().equals(other.getWarningsList())) 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) + BATCH_FIELD_NUMBER; - hash = (53 * hash) + getBatch().hashCode(); - hash = (37 * hash) + BATCH_UUID_FIELD_NUMBER; - hash = (53 * hash) + getBatchUuid().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasDoneTime()) { - hash = (37 * hash) + DONE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDoneTime().hashCode(); - } - hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + operationType_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getWarningsCount() > 0) { - hash = (37 * hash) + WARNINGS_FIELD_NUMBER; - hash = (53 * hash) + getWarningsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata 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.dataproc.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata parseFrom( - 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.dataproc.v1.BatchOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata 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.dataproc.v1.BatchOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata 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.dataproc.v1.BatchOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata 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.dataproc.v1.BatchOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Metadata describing the Batch operation.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.BatchOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.BatchOperationMetadata) - com.google.cloud.dataproc.v1.BatchOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - 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(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.BatchOperationMetadata.class, - com.google.cloud.dataproc.v1.BatchOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.BatchOperationMetadata.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(); - batch_ = ""; - - batchUuid_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (doneTimeBuilder_ == null) { - doneTime_ = null; - } else { - doneTime_ = null; - doneTimeBuilder_ = null; - } - operationType_ = 0; - - description_ = ""; - - internalGetMutableLabels().clear(); - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.BatchOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOperationMetadata build() { - com.google.cloud.dataproc.v1.BatchOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOperationMetadata buildPartial() { - com.google.cloud.dataproc.v1.BatchOperationMetadata result = - new com.google.cloud.dataproc.v1.BatchOperationMetadata(this); - int from_bitField0_ = bitField0_; - result.batch_ = batch_; - result.batchUuid_ = batchUuid_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (doneTimeBuilder_ == null) { - result.doneTime_ = doneTime_; - } else { - result.doneTime_ = doneTimeBuilder_.build(); - } - result.operationType_ = operationType_; - result.description_ = description_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (((bitField0_ & 0x00000002) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.warnings_ = warnings_; - 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.dataproc.v1.BatchOperationMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1.BatchOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.BatchOperationMetadata other) { - if (other == com.google.cloud.dataproc.v1.BatchOperationMetadata.getDefaultInstance()) - return this; - if (!other.getBatch().isEmpty()) { - batch_ = other.batch_; - onChanged(); - } - if (!other.getBatchUuid().isEmpty()) { - batchUuid_ = other.batchUuid_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasDoneTime()) { - mergeDoneTime(other.getDoneTime()); - } - if (other.operationType_ != 0) { - setOperationTypeValue(other.getOperationTypeValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (!other.warnings_.isEmpty()) { - if (warnings_.isEmpty()) { - warnings_ = other.warnings_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureWarningsIsMutable(); - warnings_.addAll(other.warnings_); - } - 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.dataproc.v1.BatchOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.BatchOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object batch_ = ""; - /** - * - * - *
-     * Name of the batch for the operation.
-     * 
- * - * string batch = 1; - * - * @return The batch. - */ - public java.lang.String getBatch() { - java.lang.Object ref = batch_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batch_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the batch for the operation.
-     * 
- * - * string batch = 1; - * - * @return The bytes for batch. - */ - public com.google.protobuf.ByteString getBatchBytes() { - java.lang.Object ref = batch_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batch_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the batch for the operation.
-     * 
- * - * string batch = 1; - * - * @param value The batch to set. - * @return This builder for chaining. - */ - public Builder setBatch(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - batch_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the batch for the operation.
-     * 
- * - * string batch = 1; - * - * @return This builder for chaining. - */ - public Builder clearBatch() { - - batch_ = getDefaultInstance().getBatch(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the batch for the operation.
-     * 
- * - * string batch = 1; - * - * @param value The bytes for batch to set. - * @return This builder for chaining. - */ - public Builder setBatchBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - batch_ = value; - onChanged(); - return this; - } - - private java.lang.Object batchUuid_ = ""; - /** - * - * - *
-     * Batch UUID for the operation.
-     * 
- * - * string batch_uuid = 2; - * - * @return The batchUuid. - */ - public java.lang.String getBatchUuid() { - java.lang.Object ref = batchUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batchUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Batch UUID for the operation.
-     * 
- * - * string batch_uuid = 2; - * - * @return The bytes for batchUuid. - */ - public com.google.protobuf.ByteString getBatchUuidBytes() { - java.lang.Object ref = batchUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batchUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Batch UUID for the operation.
-     * 
- * - * string batch_uuid = 2; - * - * @param value The batchUuid to set. - * @return This builder for chaining. - */ - public Builder setBatchUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - batchUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Batch UUID for the operation.
-     * 
- * - * string batch_uuid = 2; - * - * @return This builder for chaining. - */ - public Builder clearBatchUuid() { - - batchUuid_ = getDefaultInstance().getBatchUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Batch UUID for the operation.
-     * 
- * - * string batch_uuid = 2; - * - * @param value The bytes for batchUuid to set. - * @return This builder for chaining. - */ - public Builder setBatchUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - batchUuid_ = value; - onChanged(); - 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 when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * The time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @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 when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - 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 when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - 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 when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - 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 when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * The time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - 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 doneTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - doneTimeBuilder_; - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return Whether the doneTime field is set. - */ - public boolean hasDoneTime() { - return doneTimeBuilder_ != null || doneTime_ != null; - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return The doneTime. - */ - public com.google.protobuf.Timestamp getDoneTime() { - if (doneTimeBuilder_ == null) { - return doneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : doneTime_; - } else { - return doneTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public Builder setDoneTime(com.google.protobuf.Timestamp value) { - if (doneTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - doneTime_ = value; - onChanged(); - } else { - doneTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public Builder setDoneTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (doneTimeBuilder_ == null) { - doneTime_ = builderForValue.build(); - onChanged(); - } else { - doneTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public Builder mergeDoneTime(com.google.protobuf.Timestamp value) { - if (doneTimeBuilder_ == null) { - if (doneTime_ != null) { - doneTime_ = - com.google.protobuf.Timestamp.newBuilder(doneTime_).mergeFrom(value).buildPartial(); - } else { - doneTime_ = value; - } - onChanged(); - } else { - doneTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public Builder clearDoneTime() { - if (doneTimeBuilder_ == null) { - doneTime_ = null; - onChanged(); - } else { - doneTime_ = null; - doneTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public com.google.protobuf.Timestamp.Builder getDoneTimeBuilder() { - - onChanged(); - return getDoneTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - public com.google.protobuf.TimestampOrBuilder getDoneTimeOrBuilder() { - if (doneTimeBuilder_ != null) { - return doneTimeBuilder_.getMessageOrBuilder(); - } else { - return doneTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : doneTime_; - } - } - /** - * - * - *
-     * The time when the operation finished.
-     * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDoneTimeFieldBuilder() { - if (doneTimeBuilder_ == null) { - doneTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDoneTime(), getParentForChildren(), isClean()); - doneTime_ = null; - } - return doneTimeBuilder_; - } - - private int operationType_ = 0; - /** - * - * - *
-     * The operation type.
-     * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The enum numeric value on the wire for operationType. - */ - @java.lang.Override - public int getOperationTypeValue() { - return operationType_; - } - /** - * - * - *
-     * The operation type.
-     * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @param value The enum numeric value on the wire for operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationTypeValue(int value) { - - operationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The operation type.
-     * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The operationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType - getOperationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType result = - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType.valueOf( - operationType_); - return result == null - ? com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The operation type.
-     * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @param value The operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationType( - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType value) { - if (value == null) { - throw new NullPointerException(); - } - - operationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The operation type.
-     * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return This builder for chaining. - */ - public Builder clearOperationType() { - - operationType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * Short description of the operation.
-     * 
- * - * string description = 7; - * - * @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; - } - } - /** - * - * - *
-     * Short description of the operation.
-     * 
- * - * string description = 7; - * - * @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; - } - } - /** - * - * - *
-     * Short description of the operation.
-     * 
- * - * string description = 7; - * - * @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; - } - /** - * - * - *
-     * Short description of the operation.
-     * 
- * - * string description = 7; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Short description of the operation.
-     * 
- * - * string description = 7; - * - * @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 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(); - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * 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(); - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * 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(); - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Labels associated with the operation.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList warnings_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureWarningsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(warnings_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @return A list containing the warnings. - */ - public com.google.protobuf.ProtocolStringList getWarningsList() { - return warnings_.getUnmodifiableView(); - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - public java.lang.String getWarnings(int index) { - return warnings_.get(index); - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - public com.google.protobuf.ByteString getWarningsBytes(int index) { - return warnings_.getByteString(index); - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param index The index to set the value at. - * @param value The warnings to set. - * @return This builder for chaining. - */ - public Builder setWarnings(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param value The warnings to add. - * @return This builder for chaining. - */ - public Builder addWarnings(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param values The warnings to add. - * @return This builder for chaining. - */ - public Builder addAllWarnings(java.lang.Iterable values) { - ensureWarningsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, warnings_); - onChanged(); - return this; - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @return This builder for chaining. - */ - public Builder clearWarnings() { - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Warnings encountered during operation execution.
-     * 
- * - * repeated string warnings = 9; - * - * @param value The bytes of the warnings to add. - * @return This builder for chaining. - */ - public Builder addWarningsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWarningsIsMutable(); - warnings_.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.dataproc.v1.BatchOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.BatchOperationMetadata) - private static final com.google.cloud.dataproc.v1.BatchOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.BatchOperationMetadata(); - } - - public static com.google.cloud.dataproc.v1.BatchOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchOperationMetadata(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.dataproc.v1.BatchOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadataOrBuilder.java deleted file mode 100644 index f9f3a377..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOperationMetadataOrBuilder.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -public interface BatchOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.BatchOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Name of the batch for the operation.
-   * 
- * - * string batch = 1; - * - * @return The batch. - */ - java.lang.String getBatch(); - /** - * - * - *
-   * Name of the batch for the operation.
-   * 
- * - * string batch = 1; - * - * @return The bytes for batch. - */ - com.google.protobuf.ByteString getBatchBytes(); - - /** - * - * - *
-   * Batch UUID for the operation.
-   * 
- * - * string batch_uuid = 2; - * - * @return The batchUuid. - */ - java.lang.String getBatchUuid(); - /** - * - * - *
-   * Batch UUID for the operation.
-   * 
- * - * string batch_uuid = 2; - * - * @return The bytes for batchUuid. - */ - com.google.protobuf.ByteString getBatchUuidBytes(); - - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * The time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return Whether the doneTime field is set. - */ - boolean hasDoneTime(); - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - * - * @return The doneTime. - */ - com.google.protobuf.Timestamp getDoneTime(); - /** - * - * - *
-   * The time when the operation finished.
-   * 
- * - * .google.protobuf.Timestamp done_time = 4; - */ - com.google.protobuf.TimestampOrBuilder getDoneTimeOrBuilder(); - - /** - * - * - *
-   * The operation type.
-   * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The enum numeric value on the wire for operationType. - */ - int getOperationTypeValue(); - /** - * - * - *
-   * The operation type.
-   * 
- * - * .google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType operation_type = 6; - * - * - * @return The operationType. - */ - com.google.cloud.dataproc.v1.BatchOperationMetadata.BatchOperationType getOperationType(); - - /** - * - * - *
-   * Short description of the operation.
-   * 
- * - * string description = 7; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Short description of the operation.
-   * 
- * - * string description = 7; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - int getLabelsCount(); - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Labels associated with the operation.
-   * 
- * - * map<string, string> labels = 8; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @return A list containing the warnings. - */ - java.util.List getWarningsList(); - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @return The count of warnings. - */ - int getWarningsCount(); - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - java.lang.String getWarnings(int index); - /** - * - * - *
-   * Warnings encountered during operation execution.
-   * 
- * - * repeated string warnings = 9; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - com.google.protobuf.ByteString getWarningsBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOrBuilder.java deleted file mode 100644 index c8c898ce..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchOrBuilder.java +++ /dev/null @@ -1,694 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface BatchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.Batch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the batch.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the batch.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. A batch UUID (Unique Universal Identifier). The service
-   * generates this value when it creates the batch.
-   * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The uuid. - */ - java.lang.String getUuid(); - /** - * - * - *
-   * Output only. A batch UUID (Unique Universal Identifier). The service
-   * generates this value when it creates the batch.
-   * 
- * - * string uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for uuid. - */ - com.google.protobuf.ByteString getUuidBytes(); - - /** - * - * - *
-   * Output only. The time when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time when the batch was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkBatch field is set. - */ - boolean hasPysparkBatch(); - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkBatch. - */ - com.google.cloud.dataproc.v1.PySparkBatch getPysparkBatch(); - /** - * - * - *
-   * Optional. PySpark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkBatch pyspark_batch = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PySparkBatchOrBuilder getPysparkBatchOrBuilder(); - - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkBatch field is set. - */ - boolean hasSparkBatch(); - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkBatch. - */ - com.google.cloud.dataproc.v1.SparkBatch getSparkBatch(); - /** - * - * - *
-   * Optional. Spark batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkBatch spark_batch = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkBatchOrBuilder getSparkBatchOrBuilder(); - - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRBatch field is set. - */ - boolean hasSparkRBatch(); - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRBatch. - */ - com.google.cloud.dataproc.v1.SparkRBatch getSparkRBatch(); - /** - * - * - *
-   * Optional. SparkR batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRBatch spark_r_batch = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkRBatchOrBuilder getSparkRBatchOrBuilder(); - - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlBatch field is set. - */ - boolean hasSparkSqlBatch(); - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlBatch. - */ - com.google.cloud.dataproc.v1.SparkSqlBatch getSparkSqlBatch(); - /** - * - * - *
-   * Optional. SparkSql batch config.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlBatch spark_sql_batch = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder getSparkSqlBatchOrBuilder(); - - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the runtimeInfo field is set. - */ - boolean hasRuntimeInfo(); - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The runtimeInfo. - */ - com.google.cloud.dataproc.v1.RuntimeInfo getRuntimeInfo(); - /** - * - * - *
-   * Output only. Runtime information about batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder getRuntimeInfoOrBuilder(); - - /** - * - * - *
-   * Output only. The state of the batch.
-   * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The state of the batch.
-   * 
- * - * - * .google.cloud.dataproc.v1.Batch.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.Batch.State getState(); - - /** - * - * - *
-   * Output only. Batch state details, such as a failure
-   * description if the state is `FAILED`.
-   * 
- * - * string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stateMessage. - */ - java.lang.String getStateMessage(); - /** - * - * - *
-   * Output only. Batch state details, such as a failure
-   * description if the state is `FAILED`.
-   * 
- * - * string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stateMessage. - */ - com.google.protobuf.ByteString getStateMessageBytes(); - - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateTime field is set. - */ - boolean hasStateTime(); - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateTime. - */ - com.google.protobuf.Timestamp getStateTime(); - /** - * - * - *
-   * Output only. The time when the batch entered a current state.
-   * 
- * - * .google.protobuf.Timestamp state_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The email address of the user who created the batch.
-   * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The creator. - */ - java.lang.String getCreator(); - /** - * - * - *
-   * Output only. The email address of the user who created the batch.
-   * 
- * - * string creator = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for creator. - */ - com.google.protobuf.ByteString getCreatorBytes(); - - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this batch.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a batch.
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the runtimeConfig field is set. - */ - boolean hasRuntimeConfig(); - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The runtimeConfig. - */ - com.google.cloud.dataproc.v1.RuntimeConfig getRuntimeConfig(); - /** - * - * - *
-   * Optional. Runtime configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.RuntimeConfig runtime_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder getRuntimeConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the environmentConfig field is set. - */ - boolean hasEnvironmentConfig(); - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The environmentConfig. - */ - com.google.cloud.dataproc.v1.EnvironmentConfig getEnvironmentConfig(); - /** - * - * - *
-   * Optional. Environment configuration for the batch execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.EnvironmentConfig environment_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder getEnvironmentConfigOrBuilder(); - - /** - * - * - *
-   * Output only. The resource name of the operation associated with this batch.
-   * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operation. - */ - java.lang.String getOperation(); - /** - * - * - *
-   * Output only. The resource name of the operation associated with this batch.
-   * 
- * - * string operation = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operation. - */ - com.google.protobuf.ByteString getOperationBytes(); - - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStateHistoryList(); - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.Batch.StateHistory getStateHistory(int index); - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStateHistoryCount(); - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStateHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. Historical state information for the batch.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Batch.StateHistory state_history = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.Batch.StateHistoryOrBuilder getStateHistoryOrBuilder(int index); - - public com.google.cloud.dataproc.v1.Batch.BatchConfigCase getBatchConfigCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchesProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchesProto.java deleted file mode 100644 index aea24497..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BatchesProto.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public final class BatchesProto { - private BatchesProto() {} - - 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_dataproc_v1_CreateBatchRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_CreateBatchRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GetBatchRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListBatchesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListBatchesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Batch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Batch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Batch_StateHistory_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Batch_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Batch_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PySparkBatch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkBatch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkRBatch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_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/dataproc/v1/batches.proto" - + "\022\030google.cloud.dataproc.v1\032\034google/api/a" - + "nnotations.proto\032\027google/api/client.prot" - + "o\032\037google/api/field_behavior.proto\032\031goog" - + "le/api/resource.proto\032%google/cloud/data" - + "proc/v1/shared.proto\032#google/longrunning" - + "/operations.proto\032\033google/protobuf/empty" - + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\260\001\n\022CreateBatchRequest\0225\n\006parent\030\001 \001(\tB%" - + "\340A\002\372A\037\022\035dataproc.googleapis.com/Batch\0223\n" - + "\005batch\030\002 \001(\0132\037.google.cloud.dataproc.v1." - + "BatchB\003\340A\002\022\025\n\010batch_id\030\003 \001(\tB\003\340A\001\022\027\n\nreq" - + "uest_id\030\004 \001(\tB\003\340A\001\"F\n\017GetBatchRequest\0223\n" - + "\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dataproc.googleapis" - + ".com/Batch\"|\n\022ListBatchesRequest\0225\n\006pare" - + "nt\030\001 \001(\tB%\340A\002\372A\037\022\035dataproc.googleapis.co" - + "m/Batch\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_" - + "token\030\003 \001(\tB\003\340A\001\"`\n\023ListBatchesResponse\022" - + "0\n\007batches\030\001 \003(\0132\037.google.cloud.dataproc" - + ".v1.Batch\022\027\n\017next_page_token\030\002 \001(\t\"I\n\022De" - + "leteBatchRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" - + "dataproc.googleapis.com/Batch\"\310\n\n\005Batch\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\003\022\021\n\004uuid\030\002 \001(\tB\003\340A\003\0224\n" - + "\013create_time\030\003 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\022D\n\rpyspark_batch\030\004 \001(\0132&.goo" - + "gle.cloud.dataproc.v1.PySparkBatchB\003\340A\001H" - + "\000\022@\n\013spark_batch\030\005 \001(\0132$.google.cloud.da" - + "taproc.v1.SparkBatchB\003\340A\001H\000\022C\n\rspark_r_b" - + "atch\030\006 \001(\0132%.google.cloud.dataproc.v1.Sp" - + "arkRBatchB\003\340A\001H\000\022G\n\017spark_sql_batch\030\007 \001(" - + "\0132\'.google.cloud.dataproc.v1.SparkSqlBat" - + "chB\003\340A\001H\000\022@\n\014runtime_info\030\010 \001(\0132%.google" - + ".cloud.dataproc.v1.RuntimeInfoB\003\340A\003\0229\n\005s" - + "tate\030\t \001(\0162%.google.cloud.dataproc.v1.Ba" - + "tch.StateB\003\340A\003\022\032\n\rstate_message\030\n \001(\tB\003\340" - + "A\003\0223\n\nstate_time\030\013 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\022\024\n\007creator\030\014 \001(\tB\003\340A\003\022@\n" - + "\006labels\030\r \003(\0132+.google.cloud.dataproc.v1" - + ".Batch.LabelsEntryB\003\340A\001\022D\n\016runtime_confi" - + "g\030\016 \001(\0132\'.google.cloud.dataproc.v1.Runti" - + "meConfigB\003\340A\001\022L\n\022environment_config\030\017 \001(" - + "\0132+.google.cloud.dataproc.v1.Environment" - + "ConfigB\003\340A\001\022\026\n\toperation\030\020 \001(\tB\003\340A\003\022H\n\rs" - + "tate_history\030\021 \003(\0132,.google.cloud.datapr" - + "oc.v1.Batch.StateHistoryB\003\340A\003\032\240\001\n\014StateH" - + "istory\0229\n\005state\030\001 \001(\0162%.google.cloud.dat" - + "aproc.v1.Batch.StateB\003\340A\003\022\032\n\rstate_messa" - + "ge\030\002 \001(\tB\003\340A\003\0229\n\020state_start_time\030\003 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\032-\n\013Labe" - + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" - + "r\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PENDI" - + "NG\020\001\022\013\n\007RUNNING\020\002\022\016\n\nCANCELLING\020\003\022\r\n\tCAN" - + "CELLED\020\004\022\r\n\tSUCCEEDED\020\005\022\n\n\006FAILED\020\006:[\352AX" - + "\n\035dataproc.googleapis.com/Batch\0227project" - + "s/{project}/locations/{location}/batches" - + "/{batch}B\016\n\014batch_config\"\262\001\n\014PySparkBatc" - + "h\022!\n\024main_python_file_uri\030\001 \001(\tB\003\340A\002\022\021\n\004" - + "args\030\002 \003(\tB\003\340A\001\022\035\n\020python_file_uris\030\003 \003(" - + "\tB\003\340A\001\022\032\n\rjar_file_uris\030\004 \003(\tB\003\340A\001\022\026\n\tfi" - + "le_uris\030\005 \003(\tB\003\340A\001\022\031\n\014archive_uris\030\006 \003(\t" - + "B\003\340A\001\"\265\001\n\nSparkBatch\022 \n\021main_jar_file_ur" - + "i\030\001 \001(\tB\003\340A\001H\000\022\031\n\nmain_class\030\002 \001(\tB\003\340A\001H" - + "\000\022\021\n\004args\030\003 \003(\tB\003\340A\001\022\032\n\rjar_file_uris\030\004 " - + "\003(\tB\003\340A\001\022\026\n\tfile_uris\030\005 \003(\tB\003\340A\001\022\031\n\014arch" - + "ive_uris\030\006 \003(\tB\003\340A\001B\010\n\006driver\"q\n\013SparkRB" - + "atch\022\034\n\017main_r_file_uri\030\001 \001(\tB\003\340A\002\022\021\n\004ar" - + "gs\030\002 \003(\tB\003\340A\001\022\026\n\tfile_uris\030\003 \003(\tB\003\340A\001\022\031\n" - + "\014archive_uris\030\004 \003(\tB\003\340A\001\"\332\001\n\rSparkSqlBat" - + "ch\022\033\n\016query_file_uri\030\001 \001(\tB\003\340A\002\022Y\n\017query" - + "_variables\030\002 \003(\0132;.google.cloud.dataproc" - + ".v1.SparkSqlBatch.QueryVariablesEntryB\003\340" - + "A\001\022\032\n\rjar_file_uris\030\003 \003(\tB\003\340A\001\0325\n\023QueryV" - + "ariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\0012\235\006\n\017BatchController\022\352\001\n\013CreateBatc" - + "h\022,.google.cloud.dataproc.v1.CreateBatch" - + "Request\032\035.google.longrunning.Operation\"\215" - + "\001\202\323\344\223\0024\"+/v1/{parent=projects/*/location" - + "s/*}/batches:\005batch\332A\025parent,batch,batch" - + "_id\312A8\n\005Batch\022/google.cloud.dataproc.v1." - + "BatchOperationMetadata\022\222\001\n\010GetBatch\022).go" - + "ogle.cloud.dataproc.v1.GetBatchRequest\032\037" - + ".google.cloud.dataproc.v1.Batch\":\202\323\344\223\002-\022" - + "+/v1/{name=projects/*/locations/*/batche" - + "s/*}\332A\004name\022\250\001\n\013ListBatches\022,.google.clo" - + "ud.dataproc.v1.ListBatchesRequest\032-.goog" - + "le.cloud.dataproc.v1.ListBatchesResponse" - + "\"<\202\323\344\223\002-\022+/v1/{parent=projects/*/locatio" - + "ns/*}/batches\332A\006parent\022\217\001\n\013DeleteBatch\022," - + ".google.cloud.dataproc.v1.DeleteBatchReq" - + "uest\032\026.google.protobuf.Empty\":\202\323\344\223\002-*+/v" - + "1/{name=projects/*/locations/*/batches/*" - + "}\332A\004name\032K\312A\027dataproc.googleapis.com\322A.h" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tformBp\n\034com.google.cloud.dataproc.v1B\014B" - + "atchesProtoP\001Z@google.golang.org/genprot" - + "o/googleapis/cloud/dataproc/v1;dataprocb" - + "\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.cloud.dataproc.v1.SharedProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_CreateBatchRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_CreateBatchRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_CreateBatchRequest_descriptor, - new java.lang.String[] { - "Parent", "Batch", "BatchId", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_GetBatchRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_ListBatchesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1_ListBatchesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor, - new java.lang.String[] { - "Batches", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_dataproc_v1_Batch_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1_Batch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Batch_descriptor, - new java.lang.String[] { - "Name", - "Uuid", - "CreateTime", - "PysparkBatch", - "SparkBatch", - "SparkRBatch", - "SparkSqlBatch", - "RuntimeInfo", - "State", - "StateMessage", - "StateTime", - "Creator", - "Labels", - "RuntimeConfig", - "EnvironmentConfig", - "Operation", - "StateHistory", - "BatchConfig", - }); - internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor = - internal_static_google_cloud_dataproc_v1_Batch_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_Batch_StateHistory_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Batch_StateHistory_descriptor, - new java.lang.String[] { - "State", "StateMessage", "StateStartTime", - }); - internal_static_google_cloud_dataproc_v1_Batch_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_Batch_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1_Batch_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Batch_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1_PySparkBatch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor, - new java.lang.String[] { - "MainPythonFileUri", - "Args", - "PythonFileUris", - "JarFileUris", - "FileUris", - "ArchiveUris", - }); - internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1_SparkBatch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor, - new java.lang.String[] { - "MainJarFileUri", - "MainClass", - "Args", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Driver", - }); - internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1_SparkRBatch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor, - new java.lang.String[] { - "MainRFileUri", "Args", "FileUris", "ArchiveUris", - }); - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor, - new java.lang.String[] { - "QueryFileUri", "QueryVariables", "JarFileUris", - }); - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - 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.cloud.dataproc.v1.SharedProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequest.java deleted file mode 100644 index 01e1ca2d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequest.java +++ /dev/null @@ -1,999 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to cancel a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CancelJobRequest} - */ -public final class CancelJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CancelJobRequest) - CancelJobRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CancelJobRequest.newBuilder() to construct. - private CancelJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CancelJobRequest() { - projectId_ = ""; - region_ = ""; - jobId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CancelJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CancelJobRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_CancelJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CancelJobRequest.class, - com.google.cloud.dataproc.v1.CancelJobRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - 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.dataproc.v1.CancelJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.CancelJobRequest other = - (com.google.cloud.dataproc.v1.CancelJobRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getJobId().equals(other.getJobId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest 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.dataproc.v1.CancelJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest parseFrom( - 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.dataproc.v1.CancelJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest 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.dataproc.v1.CancelJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest 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.dataproc.v1.CancelJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest 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.dataproc.v1.CancelJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to cancel a job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CancelJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CancelJobRequest) - com.google.cloud.dataproc.v1.CancelJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_CancelJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CancelJobRequest.class, - com.google.cloud.dataproc.v1.CancelJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.CancelJobRequest.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(); - projectId_ = ""; - - region_ = ""; - - jobId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CancelJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.CancelJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CancelJobRequest build() { - com.google.cloud.dataproc.v1.CancelJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CancelJobRequest buildPartial() { - com.google.cloud.dataproc.v1.CancelJobRequest result = - new com.google.cloud.dataproc.v1.CancelJobRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.jobId_ = jobId_; - 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.dataproc.v1.CancelJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.CancelJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.CancelJobRequest other) { - if (other == com.google.cloud.dataproc.v1.CancelJobRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - 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.dataproc.v1.CancelJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.CancelJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = 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.dataproc.v1.CancelJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CancelJobRequest) - private static final com.google.cloud.dataproc.v1.CancelJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CancelJobRequest(); - } - - public static com.google.cloud.dataproc.v1.CancelJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CancelJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CancelJobRequest(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.dataproc.v1.CancelJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequestOrBuilder.java deleted file mode 100644 index 51f87edb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface CancelJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CancelJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java deleted file mode 100644 index 42993786..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java +++ /dev/null @@ -1,3268 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Describes the identifying information, config, and status of
- * a Dataproc cluster
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Cluster} - */ -public final class Cluster extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Cluster) - ClusterOrBuilder { - private static final long serialVersionUID = 0L; - // Use Cluster.newBuilder() to construct. - private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Cluster() { - projectId_ = ""; - clusterName_ = ""; - statusHistory_ = java.util.Collections.emptyList(); - clusterUuid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Cluster(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Cluster( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.ClusterConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.dataproc.v1.ClusterStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - statusHistory_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - statusHistory_.add( - input.readMessage( - com.google.cloud.dataproc.v1.ClusterStatus.parser(), extensionRegistry)); - 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: - { - com.google.cloud.dataproc.v1.ClusterMetrics.Builder subBuilder = null; - if (metrics_ != null) { - subBuilder = metrics_.toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterMetrics.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metrics_); - metrics_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder subBuilder = null; - if (virtualClusterConfig_ != null) { - subBuilder = virtualClusterConfig_.toBuilder(); - } - virtualClusterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.VirtualClusterConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(virtualClusterConfig_); - virtualClusterConfig_ = 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_ & 0x00000002) != 0)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Cluster.class, - com.google.cloud.dataproc.v1.Cluster.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The Google Cloud Platform project ID that the cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Google Cloud Platform project ID that the cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.ClusterConfig config_; - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER = 10; - private com.google.cloud.dataproc.v1.VirtualClusterConfig virtualClusterConfig_; - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the virtualClusterConfig field is set. - */ - @java.lang.Override - public boolean hasVirtualClusterConfig() { - return virtualClusterConfig_ != null; - } - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The virtualClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig() { - return virtualClusterConfig_ == null - ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() - : virtualClusterConfig_; - } - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder - getVirtualClusterConfigOrBuilder() { - return getVirtualClusterConfig(); - } - - 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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 STATUS_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.ClusterStatus status_; - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() - : status_; - } - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - public static final int STATUS_HISTORY_FIELD_NUMBER = 7; - private java.util.List statusHistory_; - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getStatusHistoryList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryOrBuilderList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getStatusHistoryCount() { - return statusHistory_.size(); - } - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusHistoryOrBuilder(int index) { - return statusHistory_.get(index); - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 6; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-   * generates this value when it creates the cluster.
-   * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-   * generates this value when it creates the cluster.
-   * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METRICS_FIELD_NUMBER = 9; - private com.google.cloud.dataproc.v1.ClusterMetrics metrics_; - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metrics field is set. - */ - @java.lang.Override - public boolean hasMetrics() { - return metrics_ != null; - } - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterMetrics getMetrics() { - return metrics_ == null - ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() - : metrics_; - } - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder getMetricsOrBuilder() { - return getMetrics(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (config_ != null) { - output.writeMessage(3, getConfig()); - } - if (status_ != null) { - output.writeMessage(4, getStatus()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clusterUuid_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - output.writeMessage(7, statusHistory_.get(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - if (metrics_ != null) { - output.writeMessage(9, getMetrics()); - } - if (virtualClusterConfig_ != null) { - output.writeMessage(10, getVirtualClusterConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfig()); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStatus()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clusterUuid_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, statusHistory_.get(i)); - } - 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__); - } - if (metrics_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMetrics()); - } - if (virtualClusterConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(10, getVirtualClusterConfig()); - } - 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.dataproc.v1.Cluster)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.Cluster other = (com.google.cloud.dataproc.v1.Cluster) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig().equals(other.getConfig())) return false; - } - if (hasVirtualClusterConfig() != other.hasVirtualClusterConfig()) return false; - if (hasVirtualClusterConfig()) { - if (!getVirtualClusterConfig().equals(other.getVirtualClusterConfig())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } - if (!getStatusHistoryList().equals(other.getStatusHistoryList())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (hasMetrics() != other.hasMetrics()) return false; - if (hasMetrics()) { - if (!getMetrics().equals(other.getMetrics())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (hasVirtualClusterConfig()) { - hash = (37 * hash) + VIRTUAL_CLUSTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getVirtualClusterConfig().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - if (getStatusHistoryCount() > 0) { - hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getStatusHistoryList().hashCode(); - } - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - if (hasMetrics()) { - hash = (37 * hash) + METRICS_FIELD_NUMBER; - hash = (53 * hash) + getMetrics().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.Cluster parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Cluster 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.dataproc.v1.Cluster parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Cluster parseFrom( - 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.dataproc.v1.Cluster parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Cluster parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.Cluster parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Cluster 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.dataproc.v1.Cluster parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Cluster 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.dataproc.v1.Cluster parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Cluster 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.dataproc.v1.Cluster prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Describes the identifying information, config, and status of
-   * a Dataproc cluster
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Cluster} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Cluster) - com.google.cloud.dataproc.v1.ClusterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - 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(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Cluster.class, - com.google.cloud.dataproc.v1.Cluster.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.Cluster.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusHistoryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - projectId_ = ""; - - clusterName_ = ""; - - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - if (virtualClusterConfigBuilder_ == null) { - virtualClusterConfig_ = null; - } else { - virtualClusterConfig_ = null; - virtualClusterConfigBuilder_ = null; - } - internalGetMutableLabels().clear(); - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - statusHistoryBuilder_.clear(); - } - clusterUuid_ = ""; - - if (metricsBuilder_ == null) { - metrics_ = null; - } else { - metrics_ = null; - metricsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_Cluster_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.Cluster.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster build() { - com.google.cloud.dataproc.v1.Cluster result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster buildPartial() { - com.google.cloud.dataproc.v1.Cluster result = new com.google.cloud.dataproc.v1.Cluster(this); - int from_bitField0_ = bitField0_; - result.projectId_ = projectId_; - result.clusterName_ = clusterName_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (virtualClusterConfigBuilder_ == null) { - result.virtualClusterConfig_ = virtualClusterConfig_; - } else { - result.virtualClusterConfig_ = virtualClusterConfigBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } - if (statusHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.statusHistory_ = statusHistory_; - } else { - result.statusHistory_ = statusHistoryBuilder_.build(); - } - result.clusterUuid_ = clusterUuid_; - if (metricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = metricsBuilder_.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.dataproc.v1.Cluster) { - return mergeFrom((com.google.cloud.dataproc.v1.Cluster) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.Cluster other) { - if (other == com.google.cloud.dataproc.v1.Cluster.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.hasVirtualClusterConfig()) { - mergeVirtualClusterConfig(other.getVirtualClusterConfig()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - if (statusHistoryBuilder_ == null) { - if (!other.statusHistory_.isEmpty()) { - if (statusHistory_.isEmpty()) { - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureStatusHistoryIsMutable(); - statusHistory_.addAll(other.statusHistory_); - } - onChanged(); - } - } else { - if (!other.statusHistory_.isEmpty()) { - if (statusHistoryBuilder_.isEmpty()) { - statusHistoryBuilder_.dispose(); - statusHistoryBuilder_ = null; - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000002); - statusHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStatusHistoryFieldBuilder() - : null; - } else { - statusHistoryBuilder_.addAllMessages(other.statusHistory_); - } - } - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (other.hasMetrics()) { - mergeMetrics(other.getMetrics()); - } - 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.dataproc.v1.Cluster parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.Cluster) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The Google Cloud Platform project ID that the cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Google Cloud Platform project ID that the cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Google Cloud Platform project ID that the cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Google Cloud Platform project ID that the cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Google Cloud Platform project ID that the cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name. Cluster names within a project must be
-     * unique. Names of deleted clusters can be reused.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.dataproc.v1.ClusterConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ClusterConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * Optional. The cluster config for a cluster of Compute Engine Instances.
-     * Note that Dataproc may set default values, and values may change
-     * when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.cloud.dataproc.v1.VirtualClusterConfig virtualClusterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.VirtualClusterConfig, - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, - com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder> - virtualClusterConfigBuilder_; - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the virtualClusterConfig field is set. - */ - public boolean hasVirtualClusterConfig() { - return virtualClusterConfigBuilder_ != null || virtualClusterConfig_ != null; - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The virtualClusterConfig. - */ - public com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig() { - if (virtualClusterConfigBuilder_ == null) { - return virtualClusterConfig_ == null - ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() - : virtualClusterConfig_; - } else { - return virtualClusterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setVirtualClusterConfig( - com.google.cloud.dataproc.v1.VirtualClusterConfig value) { - if (virtualClusterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - virtualClusterConfig_ = value; - onChanged(); - } else { - virtualClusterConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setVirtualClusterConfig( - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder builderForValue) { - if (virtualClusterConfigBuilder_ == null) { - virtualClusterConfig_ = builderForValue.build(); - onChanged(); - } else { - virtualClusterConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeVirtualClusterConfig( - com.google.cloud.dataproc.v1.VirtualClusterConfig value) { - if (virtualClusterConfigBuilder_ == null) { - if (virtualClusterConfig_ != null) { - virtualClusterConfig_ = - com.google.cloud.dataproc.v1.VirtualClusterConfig.newBuilder(virtualClusterConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - virtualClusterConfig_ = value; - } - onChanged(); - } else { - virtualClusterConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearVirtualClusterConfig() { - if (virtualClusterConfigBuilder_ == null) { - virtualClusterConfig_ = null; - onChanged(); - } else { - virtualClusterConfig_ = null; - virtualClusterConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder - getVirtualClusterConfigBuilder() { - - onChanged(); - return getVirtualClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder - getVirtualClusterConfigOrBuilder() { - if (virtualClusterConfigBuilder_ != null) { - return virtualClusterConfigBuilder_.getMessageOrBuilder(); - } else { - return virtualClusterConfig_ == null - ? com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance() - : virtualClusterConfig_; - } - } - /** - * - * - *
-     * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-     * does not directly control the underlying compute resources, for example,
-     * when creating a [Dataproc-on-GKE
-     * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-     * Note that Dataproc may set default values, and values may change when
-     * clusters are updated. Exactly one of config or virtualClusterConfig must be
-     * specified.
-     * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.VirtualClusterConfig, - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, - com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder> - getVirtualClusterConfigFieldBuilder() { - if (virtualClusterConfigBuilder_ == null) { - virtualClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.VirtualClusterConfig, - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder, - com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder>( - getVirtualClusterConfig(), getParentForChildren(), isClean()); - virtualClusterConfig_ = null; - } - return virtualClusterConfigBuilder_; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a cluster.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1.ClusterStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.ClusterStatus value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1.ClusterStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1.ClusterStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder>( - getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - private java.util.List statusHistory_ = - java.util.Collections.emptyList(); - - private void ensureStatusHistoryIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - statusHistory_ = - new java.util.ArrayList(statusHistory_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getStatusHistoryList() { - if (statusHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(statusHistory_); - } else { - return statusHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getStatusHistoryCount() { - if (statusHistoryBuilder_ == null) { - return statusHistory_.size(); - } else { - return statusHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatus getStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, value); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(com.google.cloud.dataproc.v1.ClusterStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(int index, com.google.cloud.dataproc.v1.ClusterStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllStatusHistory( - java.lang.Iterable values) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusHistory_); - onChanged(); - } else { - statusHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatusHistory() { - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - statusHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.remove(index); - onChanged(); - } else { - statusHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatus.Builder getStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusHistoryOrBuilder( - int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryOrBuilderList() { - if (statusHistoryBuilder_ != null) { - return statusHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statusHistory_); - } - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatus.Builder addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterStatus.Builder addStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryBuilderList() { - return getStatusHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterStatus, - com.google.cloud.dataproc.v1.ClusterStatus.Builder, - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder>( - statusHistory_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - statusHistory_ = null; - } - return statusHistoryBuilder_; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-     * generates this value when it creates the cluster.
-     * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-     * generates this value when it creates the cluster.
-     * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-     * generates this value when it creates the cluster.
-     * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-     * generates this value when it creates the cluster.
-     * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-     * generates this value when it creates the cluster.
-     * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterMetrics metrics_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterMetrics, - com.google.cloud.dataproc.v1.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder> - metricsBuilder_; - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metrics field is set. - */ - public boolean hasMetrics() { - return metricsBuilder_ != null || metrics_ != null; - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - public com.google.cloud.dataproc.v1.ClusterMetrics getMetrics() { - if (metricsBuilder_ == null) { - return metrics_ == null - ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() - : metrics_; - } else { - return metricsBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value) { - if (metricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - metricsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetrics(com.google.cloud.dataproc.v1.ClusterMetrics.Builder builderForValue) { - if (metricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - metricsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetrics(com.google.cloud.dataproc.v1.ClusterMetrics value) { - if (metricsBuilder_ == null) { - if (metrics_ != null) { - metrics_ = - com.google.cloud.dataproc.v1.ClusterMetrics.newBuilder(metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - metricsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearMetrics() { - if (metricsBuilder_ == null) { - metrics_ = null; - onChanged(); - } else { - metrics_ = null; - metricsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterMetrics.Builder getMetricsBuilder() { - - onChanged(); - return getMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder getMetricsOrBuilder() { - if (metricsBuilder_ != null) { - return metricsBuilder_.getMessageOrBuilder(); - } else { - return metrics_ == null - ? com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance() - : metrics_; - } - } - /** - * - * - *
-     * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-     * **Beta Feature**: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterMetrics, - com.google.cloud.dataproc.v1.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder> - getMetricsFieldBuilder() { - if (metricsBuilder_ == null) { - metricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterMetrics, - com.google.cloud.dataproc.v1.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder>( - getMetrics(), getParentForChildren(), isClean()); - metrics_ = null; - } - return metricsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.Cluster) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.Cluster) - private static final com.google.cloud.dataproc.v1.Cluster DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.Cluster(); - } - - public static com.google.cloud.dataproc.v1.Cluster getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Cluster parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Cluster(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.dataproc.v1.Cluster getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java deleted file mode 100644 index 1d78a9f8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java +++ /dev/null @@ -1,5171 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The cluster config.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterConfig} - */ -public final class ClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterConfig) - ClusterConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterConfig.newBuilder() to construct. - private ClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterConfig() { - configBucket_ = ""; - tempBucket_ = ""; - initializationActions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterConfig( - 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(); - - configBucket_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tempBucket_ = s; - break; - } - case 66: - { - com.google.cloud.dataproc.v1.GceClusterConfig.Builder subBuilder = null; - if (gceClusterConfig_ != null) { - subBuilder = gceClusterConfig_.toBuilder(); - } - gceClusterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.GceClusterConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gceClusterConfig_); - gceClusterConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder subBuilder = null; - if (masterConfig_ != null) { - subBuilder = masterConfig_.toBuilder(); - } - masterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.InstanceGroupConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(masterConfig_); - masterConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder subBuilder = null; - if (workerConfig_ != null) { - subBuilder = workerConfig_.toBuilder(); - } - workerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.InstanceGroupConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(workerConfig_); - workerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 90: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - initializationActions_ = - new java.util.ArrayList< - com.google.cloud.dataproc.v1.NodeInitializationAction>(); - mutable_bitField0_ |= 0x00000001; - } - initializationActions_.add( - input.readMessage( - com.google.cloud.dataproc.v1.NodeInitializationAction.parser(), - extensionRegistry)); - break; - } - case 98: - { - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder subBuilder = null; - if (secondaryWorkerConfig_ != null) { - subBuilder = secondaryWorkerConfig_.toBuilder(); - } - secondaryWorkerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.InstanceGroupConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(secondaryWorkerConfig_); - secondaryWorkerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.cloud.dataproc.v1.SoftwareConfig.Builder subBuilder = null; - if (softwareConfig_ != null) { - subBuilder = softwareConfig_.toBuilder(); - } - softwareConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SoftwareConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(softwareConfig_); - softwareConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.dataproc.v1.EncryptionConfig.Builder subBuilder = null; - if (encryptionConfig_ != null) { - subBuilder = encryptionConfig_.toBuilder(); - } - encryptionConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.EncryptionConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionConfig_); - encryptionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - com.google.cloud.dataproc.v1.SecurityConfig.Builder subBuilder = null; - if (securityConfig_ != null) { - subBuilder = securityConfig_.toBuilder(); - } - securityConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SecurityConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityConfig_); - securityConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 138: - { - com.google.cloud.dataproc.v1.LifecycleConfig.Builder subBuilder = null; - if (lifecycleConfig_ != null) { - subBuilder = lifecycleConfig_.toBuilder(); - } - lifecycleConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LifecycleConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lifecycleConfig_); - lifecycleConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 146: - { - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder subBuilder = null; - if (autoscalingConfig_ != null) { - subBuilder = autoscalingConfig_.toBuilder(); - } - autoscalingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.AutoscalingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingConfig_); - autoscalingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 154: - { - com.google.cloud.dataproc.v1.EndpointConfig.Builder subBuilder = null; - if (endpointConfig_ != null) { - subBuilder = endpointConfig_.toBuilder(); - } - endpointConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.EndpointConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointConfig_); - endpointConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 162: - { - com.google.cloud.dataproc.v1.MetastoreConfig.Builder subBuilder = null; - if (metastoreConfig_ != null) { - subBuilder = metastoreConfig_.toBuilder(); - } - metastoreConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.MetastoreConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metastoreConfig_); - metastoreConfig_ = 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_ & 0x00000001) != 0)) { - initializationActions_ = java.util.Collections.unmodifiableList(initializationActions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterConfig.class, - com.google.cloud.dataproc.v1.ClusterConfig.Builder.class); - } - - public static final int CONFIG_BUCKET_FIELD_NUMBER = 1; - private volatile java.lang.Object configBucket_; - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The configBucket. - */ - @java.lang.Override - public java.lang.String getConfigBucket() { - java.lang.Object ref = configBucket_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configBucket_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for configBucket. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConfigBucketBytes() { - java.lang.Object ref = configBucket_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - configBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TEMP_BUCKET_FIELD_NUMBER = 2; - private volatile java.lang.Object tempBucket_; - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - @java.lang.Override - public java.lang.String getTempBucket() { - java.lang.Object ref = tempBucket_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tempBucket_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTempBucketBytes() { - java.lang.Object ref = tempBucket_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tempBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GCE_CLUSTER_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.GceClusterConfig gceClusterConfig_; - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gceClusterConfig field is set. - */ - @java.lang.Override - public boolean hasGceClusterConfig() { - return gceClusterConfig_ != null; - } - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig getGceClusterConfig() { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder getGceClusterConfigOrBuilder() { - return getGceClusterConfig(); - } - - public static final int MASTER_CONFIG_FIELD_NUMBER = 9; - private com.google.cloud.dataproc.v1.InstanceGroupConfig masterConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the masterConfig field is set. - */ - @java.lang.Override - public boolean hasMasterConfig() { - return masterConfig_ != null; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig getMasterConfig() { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getMasterConfigOrBuilder() { - return getMasterConfig(); - } - - public static final int WORKER_CONFIG_FIELD_NUMBER = 10; - private com.google.cloud.dataproc.v1.InstanceGroupConfig workerConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the workerConfig field is set. - */ - @java.lang.Override - public boolean hasWorkerConfig() { - return workerConfig_ != null; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig getWorkerConfig() { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getWorkerConfigOrBuilder() { - return getWorkerConfig(); - } - - public static final int SECONDARY_WORKER_CONFIG_FIELD_NUMBER = 12; - private com.google.cloud.dataproc.v1.InstanceGroupConfig secondaryWorkerConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - @java.lang.Override - public boolean hasSecondaryWorkerConfig() { - return secondaryWorkerConfig_ != null; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig getSecondaryWorkerConfig() { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - return getSecondaryWorkerConfig(); - } - - public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 13; - private com.google.cloud.dataproc.v1.SoftwareConfig softwareConfig_; - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the softwareConfig field is set. - */ - @java.lang.Override - public boolean hasSoftwareConfig() { - return softwareConfig_ != null; - } - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SoftwareConfig getSoftwareConfig() { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder() { - return getSoftwareConfig(); - } - - public static final int INITIALIZATION_ACTIONS_FIELD_NUMBER = 11; - private java.util.List - initializationActions_; - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getInitializationActionsList() { - return initializationActions_; - } - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getInitializationActionsOrBuilderList() { - return initializationActions_; - } - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getInitializationActionsCount() { - return initializationActions_.size(); - } - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeInitializationAction getInitializationActions(int index) { - return initializationActions_.get(index); - } - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder - getInitializationActionsOrBuilder(int index) { - return initializationActions_.get(index); - } - - public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 15; - private com.google.cloud.dataproc.v1.EncryptionConfig encryptionConfig_; - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionConfig field is set. - */ - @java.lang.Override - public boolean hasEncryptionConfig() { - return encryptionConfig_ != null; - } - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EncryptionConfig getEncryptionConfig() { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { - return getEncryptionConfig(); - } - - public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 18; - private com.google.cloud.dataproc.v1.AutoscalingConfig autoscalingConfig_; - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscalingConfig field is set. - */ - @java.lang.Override - public boolean hasAutoscalingConfig() { - return autoscalingConfig_ != null; - } - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingConfig getAutoscalingConfig() { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1.AutoscalingConfig.getDefaultInstance() - : autoscalingConfig_; - } - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder() { - return getAutoscalingConfig(); - } - - public static final int SECURITY_CONFIG_FIELD_NUMBER = 16; - private com.google.cloud.dataproc.v1.SecurityConfig securityConfig_; - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - @java.lang.Override - public boolean hasSecurityConfig() { - return securityConfig_ != null; - } - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SecurityConfig getSecurityConfig() { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1.SecurityConfig.getDefaultInstance() - : securityConfig_; - } - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SecurityConfigOrBuilder getSecurityConfigOrBuilder() { - return getSecurityConfig(); - } - - public static final int LIFECYCLE_CONFIG_FIELD_NUMBER = 17; - private com.google.cloud.dataproc.v1.LifecycleConfig lifecycleConfig_; - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - @java.lang.Override - public boolean hasLifecycleConfig() { - return lifecycleConfig_ != null; - } - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LifecycleConfig getLifecycleConfig() { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder getLifecycleConfigOrBuilder() { - return getLifecycleConfig(); - } - - public static final int ENDPOINT_CONFIG_FIELD_NUMBER = 19; - private com.google.cloud.dataproc.v1.EndpointConfig endpointConfig_; - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endpointConfig field is set. - */ - @java.lang.Override - public boolean hasEndpointConfig() { - return endpointConfig_ != null; - } - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EndpointConfig getEndpointConfig() { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.EndpointConfigOrBuilder getEndpointConfigOrBuilder() { - return getEndpointConfig(); - } - - public static final int METASTORE_CONFIG_FIELD_NUMBER = 20; - private com.google.cloud.dataproc.v1.MetastoreConfig metastoreConfig_; - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - @java.lang.Override - public boolean hasMetastoreConfig() { - return metastoreConfig_ != null; - } - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig() { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder() { - return getMetastoreConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configBucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, configBucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempBucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tempBucket_); - } - if (gceClusterConfig_ != null) { - output.writeMessage(8, getGceClusterConfig()); - } - if (masterConfig_ != null) { - output.writeMessage(9, getMasterConfig()); - } - if (workerConfig_ != null) { - output.writeMessage(10, getWorkerConfig()); - } - for (int i = 0; i < initializationActions_.size(); i++) { - output.writeMessage(11, initializationActions_.get(i)); - } - if (secondaryWorkerConfig_ != null) { - output.writeMessage(12, getSecondaryWorkerConfig()); - } - if (softwareConfig_ != null) { - output.writeMessage(13, getSoftwareConfig()); - } - if (encryptionConfig_ != null) { - output.writeMessage(15, getEncryptionConfig()); - } - if (securityConfig_ != null) { - output.writeMessage(16, getSecurityConfig()); - } - if (lifecycleConfig_ != null) { - output.writeMessage(17, getLifecycleConfig()); - } - if (autoscalingConfig_ != null) { - output.writeMessage(18, getAutoscalingConfig()); - } - if (endpointConfig_ != null) { - output.writeMessage(19, getEndpointConfig()); - } - if (metastoreConfig_ != null) { - output.writeMessage(20, getMetastoreConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configBucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, configBucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempBucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tempBucket_); - } - if (gceClusterConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getGceClusterConfig()); - } - if (masterConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMasterConfig()); - } - if (workerConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getWorkerConfig()); - } - for (int i = 0; i < initializationActions_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, initializationActions_.get(i)); - } - if (secondaryWorkerConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(12, getSecondaryWorkerConfig()); - } - if (softwareConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getSoftwareConfig()); - } - if (encryptionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getEncryptionConfig()); - } - if (securityConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSecurityConfig()); - } - if (lifecycleConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getLifecycleConfig()); - } - if (autoscalingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getAutoscalingConfig()); - } - if (endpointConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getEndpointConfig()); - } - if (metastoreConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getMetastoreConfig()); - } - 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.dataproc.v1.ClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterConfig other = - (com.google.cloud.dataproc.v1.ClusterConfig) obj; - - if (!getConfigBucket().equals(other.getConfigBucket())) return false; - if (!getTempBucket().equals(other.getTempBucket())) return false; - if (hasGceClusterConfig() != other.hasGceClusterConfig()) return false; - if (hasGceClusterConfig()) { - if (!getGceClusterConfig().equals(other.getGceClusterConfig())) return false; - } - if (hasMasterConfig() != other.hasMasterConfig()) return false; - if (hasMasterConfig()) { - if (!getMasterConfig().equals(other.getMasterConfig())) return false; - } - if (hasWorkerConfig() != other.hasWorkerConfig()) return false; - if (hasWorkerConfig()) { - if (!getWorkerConfig().equals(other.getWorkerConfig())) return false; - } - if (hasSecondaryWorkerConfig() != other.hasSecondaryWorkerConfig()) return false; - if (hasSecondaryWorkerConfig()) { - if (!getSecondaryWorkerConfig().equals(other.getSecondaryWorkerConfig())) return false; - } - if (hasSoftwareConfig() != other.hasSoftwareConfig()) return false; - if (hasSoftwareConfig()) { - if (!getSoftwareConfig().equals(other.getSoftwareConfig())) return false; - } - if (!getInitializationActionsList().equals(other.getInitializationActionsList())) return false; - if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; - if (hasEncryptionConfig()) { - if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; - } - if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false; - if (hasAutoscalingConfig()) { - if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; - } - if (hasSecurityConfig() != other.hasSecurityConfig()) return false; - if (hasSecurityConfig()) { - if (!getSecurityConfig().equals(other.getSecurityConfig())) return false; - } - if (hasLifecycleConfig() != other.hasLifecycleConfig()) return false; - if (hasLifecycleConfig()) { - if (!getLifecycleConfig().equals(other.getLifecycleConfig())) return false; - } - if (hasEndpointConfig() != other.hasEndpointConfig()) return false; - if (hasEndpointConfig()) { - if (!getEndpointConfig().equals(other.getEndpointConfig())) return false; - } - if (hasMetastoreConfig() != other.hasMetastoreConfig()) return false; - if (hasMetastoreConfig()) { - if (!getMetastoreConfig().equals(other.getMetastoreConfig())) 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) + CONFIG_BUCKET_FIELD_NUMBER; - hash = (53 * hash) + getConfigBucket().hashCode(); - hash = (37 * hash) + TEMP_BUCKET_FIELD_NUMBER; - hash = (53 * hash) + getTempBucket().hashCode(); - if (hasGceClusterConfig()) { - hash = (37 * hash) + GCE_CLUSTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGceClusterConfig().hashCode(); - } - if (hasMasterConfig()) { - hash = (37 * hash) + MASTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMasterConfig().hashCode(); - } - if (hasWorkerConfig()) { - hash = (37 * hash) + WORKER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getWorkerConfig().hashCode(); - } - if (hasSecondaryWorkerConfig()) { - hash = (37 * hash) + SECONDARY_WORKER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSecondaryWorkerConfig().hashCode(); - } - if (hasSoftwareConfig()) { - hash = (37 * hash) + SOFTWARE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSoftwareConfig().hashCode(); - } - if (getInitializationActionsCount() > 0) { - hash = (37 * hash) + INITIALIZATION_ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getInitializationActionsList().hashCode(); - } - if (hasEncryptionConfig()) { - hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEncryptionConfig().hashCode(); - } - if (hasAutoscalingConfig()) { - hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getAutoscalingConfig().hashCode(); - } - if (hasSecurityConfig()) { - hash = (37 * hash) + SECURITY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSecurityConfig().hashCode(); - } - if (hasLifecycleConfig()) { - hash = (37 * hash) + LIFECYCLE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLifecycleConfig().hashCode(); - } - if (hasEndpointConfig()) { - hash = (37 * hash) + ENDPOINT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEndpointConfig().hashCode(); - } - if (hasMetastoreConfig()) { - hash = (37 * hash) + METASTORE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getMetastoreConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig 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.dataproc.v1.ClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig parseFrom( - 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.dataproc.v1.ClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig 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.dataproc.v1.ClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig 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.dataproc.v1.ClusterConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig 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.dataproc.v1.ClusterConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 cluster config.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterConfig) - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterConfig.class, - com.google.cloud.dataproc.v1.ClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInitializationActionsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - configBucket_ = ""; - - tempBucket_ = ""; - - if (gceClusterConfigBuilder_ == null) { - gceClusterConfig_ = null; - } else { - gceClusterConfig_ = null; - gceClusterConfigBuilder_ = null; - } - if (masterConfigBuilder_ == null) { - masterConfig_ = null; - } else { - masterConfig_ = null; - masterConfigBuilder_ = null; - } - if (workerConfigBuilder_ == null) { - workerConfig_ = null; - } else { - workerConfig_ = null; - workerConfigBuilder_ = null; - } - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = null; - } else { - secondaryWorkerConfig_ = null; - secondaryWorkerConfigBuilder_ = null; - } - if (softwareConfigBuilder_ == null) { - softwareConfig_ = null; - } else { - softwareConfig_ = null; - softwareConfigBuilder_ = null; - } - if (initializationActionsBuilder_ == null) { - initializationActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - initializationActionsBuilder_.clear(); - } - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = null; - } else { - encryptionConfig_ = null; - encryptionConfigBuilder_ = null; - } - if (autoscalingConfigBuilder_ == null) { - autoscalingConfig_ = null; - } else { - autoscalingConfig_ = null; - autoscalingConfigBuilder_ = null; - } - if (securityConfigBuilder_ == null) { - securityConfig_ = null; - } else { - securityConfig_ = null; - securityConfigBuilder_ = null; - } - if (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = null; - } else { - lifecycleConfig_ = null; - lifecycleConfigBuilder_ = null; - } - if (endpointConfigBuilder_ == null) { - endpointConfig_ = null; - } else { - endpointConfig_ = null; - endpointConfigBuilder_ = null; - } - if (metastoreConfigBuilder_ == null) { - metastoreConfig_ = null; - } else { - metastoreConfig_ = null; - metastoreConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfig build() { - com.google.cloud.dataproc.v1.ClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfig buildPartial() { - com.google.cloud.dataproc.v1.ClusterConfig result = - new com.google.cloud.dataproc.v1.ClusterConfig(this); - int from_bitField0_ = bitField0_; - result.configBucket_ = configBucket_; - result.tempBucket_ = tempBucket_; - if (gceClusterConfigBuilder_ == null) { - result.gceClusterConfig_ = gceClusterConfig_; - } else { - result.gceClusterConfig_ = gceClusterConfigBuilder_.build(); - } - if (masterConfigBuilder_ == null) { - result.masterConfig_ = masterConfig_; - } else { - result.masterConfig_ = masterConfigBuilder_.build(); - } - if (workerConfigBuilder_ == null) { - result.workerConfig_ = workerConfig_; - } else { - result.workerConfig_ = workerConfigBuilder_.build(); - } - if (secondaryWorkerConfigBuilder_ == null) { - result.secondaryWorkerConfig_ = secondaryWorkerConfig_; - } else { - result.secondaryWorkerConfig_ = secondaryWorkerConfigBuilder_.build(); - } - if (softwareConfigBuilder_ == null) { - result.softwareConfig_ = softwareConfig_; - } else { - result.softwareConfig_ = softwareConfigBuilder_.build(); - } - if (initializationActionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - initializationActions_ = java.util.Collections.unmodifiableList(initializationActions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.initializationActions_ = initializationActions_; - } else { - result.initializationActions_ = initializationActionsBuilder_.build(); - } - if (encryptionConfigBuilder_ == null) { - result.encryptionConfig_ = encryptionConfig_; - } else { - result.encryptionConfig_ = encryptionConfigBuilder_.build(); - } - if (autoscalingConfigBuilder_ == null) { - result.autoscalingConfig_ = autoscalingConfig_; - } else { - result.autoscalingConfig_ = autoscalingConfigBuilder_.build(); - } - if (securityConfigBuilder_ == null) { - result.securityConfig_ = securityConfig_; - } else { - result.securityConfig_ = securityConfigBuilder_.build(); - } - if (lifecycleConfigBuilder_ == null) { - result.lifecycleConfig_ = lifecycleConfig_; - } else { - result.lifecycleConfig_ = lifecycleConfigBuilder_.build(); - } - if (endpointConfigBuilder_ == null) { - result.endpointConfig_ = endpointConfig_; - } else { - result.endpointConfig_ = endpointConfigBuilder_.build(); - } - if (metastoreConfigBuilder_ == null) { - result.metastoreConfig_ = metastoreConfig_; - } else { - result.metastoreConfig_ = metastoreConfigBuilder_.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.dataproc.v1.ClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterConfig other) { - if (other == com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance()) return this; - if (!other.getConfigBucket().isEmpty()) { - configBucket_ = other.configBucket_; - onChanged(); - } - if (!other.getTempBucket().isEmpty()) { - tempBucket_ = other.tempBucket_; - onChanged(); - } - if (other.hasGceClusterConfig()) { - mergeGceClusterConfig(other.getGceClusterConfig()); - } - if (other.hasMasterConfig()) { - mergeMasterConfig(other.getMasterConfig()); - } - if (other.hasWorkerConfig()) { - mergeWorkerConfig(other.getWorkerConfig()); - } - if (other.hasSecondaryWorkerConfig()) { - mergeSecondaryWorkerConfig(other.getSecondaryWorkerConfig()); - } - if (other.hasSoftwareConfig()) { - mergeSoftwareConfig(other.getSoftwareConfig()); - } - if (initializationActionsBuilder_ == null) { - if (!other.initializationActions_.isEmpty()) { - if (initializationActions_.isEmpty()) { - initializationActions_ = other.initializationActions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInitializationActionsIsMutable(); - initializationActions_.addAll(other.initializationActions_); - } - onChanged(); - } - } else { - if (!other.initializationActions_.isEmpty()) { - if (initializationActionsBuilder_.isEmpty()) { - initializationActionsBuilder_.dispose(); - initializationActionsBuilder_ = null; - initializationActions_ = other.initializationActions_; - bitField0_ = (bitField0_ & ~0x00000001); - initializationActionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInitializationActionsFieldBuilder() - : null; - } else { - initializationActionsBuilder_.addAllMessages(other.initializationActions_); - } - } - } - if (other.hasEncryptionConfig()) { - mergeEncryptionConfig(other.getEncryptionConfig()); - } - if (other.hasAutoscalingConfig()) { - mergeAutoscalingConfig(other.getAutoscalingConfig()); - } - if (other.hasSecurityConfig()) { - mergeSecurityConfig(other.getSecurityConfig()); - } - if (other.hasLifecycleConfig()) { - mergeLifecycleConfig(other.getLifecycleConfig()); - } - if (other.hasEndpointConfig()) { - mergeEndpointConfig(other.getEndpointConfig()); - } - if (other.hasMetastoreConfig()) { - mergeMetastoreConfig(other.getMetastoreConfig()); - } - 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.dataproc.v1.ClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object configBucket_ = ""; - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The configBucket. - */ - public java.lang.String getConfigBucket() { - java.lang.Object ref = configBucket_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - configBucket_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for configBucket. - */ - public com.google.protobuf.ByteString getConfigBucketBytes() { - java.lang.Object ref = configBucket_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - configBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The configBucket to set. - * @return This builder for chaining. - */ - public Builder setConfigBucket(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - configBucket_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearConfigBucket() { - - configBucket_ = getDefaultInstance().getConfigBucket(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for configBucket to set. - * @return This builder for chaining. - */ - public Builder setConfigBucketBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - configBucket_ = value; - onChanged(); - return this; - } - - private java.lang.Object tempBucket_ = ""; - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - public java.lang.String getTempBucket() { - java.lang.Object ref = tempBucket_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tempBucket_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - public com.google.protobuf.ByteString getTempBucketBytes() { - java.lang.Object ref = tempBucket_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tempBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The tempBucket to set. - * @return This builder for chaining. - */ - public Builder setTempBucket(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tempBucket_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTempBucket() { - - tempBucket_ = getDefaultInstance().getTempBucket(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for tempBucket to set. - * @return This builder for chaining. - */ - public Builder setTempBucketBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tempBucket_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.GceClusterConfig gceClusterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GceClusterConfig, - com.google.cloud.dataproc.v1.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder> - gceClusterConfigBuilder_; - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gceClusterConfig field is set. - */ - public boolean hasGceClusterConfig() { - return gceClusterConfigBuilder_ != null || gceClusterConfig_ != null; - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - public com.google.cloud.dataproc.v1.GceClusterConfig getGceClusterConfig() { - if (gceClusterConfigBuilder_ == null) { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } else { - return gceClusterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGceClusterConfig(com.google.cloud.dataproc.v1.GceClusterConfig value) { - if (gceClusterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gceClusterConfig_ = value; - onChanged(); - } else { - gceClusterConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGceClusterConfig( - com.google.cloud.dataproc.v1.GceClusterConfig.Builder builderForValue) { - if (gceClusterConfigBuilder_ == null) { - gceClusterConfig_ = builderForValue.build(); - onChanged(); - } else { - gceClusterConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGceClusterConfig(com.google.cloud.dataproc.v1.GceClusterConfig value) { - if (gceClusterConfigBuilder_ == null) { - if (gceClusterConfig_ != null) { - gceClusterConfig_ = - com.google.cloud.dataproc.v1.GceClusterConfig.newBuilder(gceClusterConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - gceClusterConfig_ = value; - } - onChanged(); - } else { - gceClusterConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGceClusterConfig() { - if (gceClusterConfigBuilder_ == null) { - gceClusterConfig_ = null; - onChanged(); - } else { - gceClusterConfig_ = null; - gceClusterConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GceClusterConfig.Builder getGceClusterConfigBuilder() { - - onChanged(); - return getGceClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder getGceClusterConfigOrBuilder() { - if (gceClusterConfigBuilder_ != null) { - return gceClusterConfigBuilder_.getMessageOrBuilder(); - } else { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GceClusterConfig, - com.google.cloud.dataproc.v1.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder> - getGceClusterConfigFieldBuilder() { - if (gceClusterConfigBuilder_ == null) { - gceClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GceClusterConfig, - com.google.cloud.dataproc.v1.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder>( - getGceClusterConfig(), getParentForChildren(), isClean()); - gceClusterConfig_ = null; - } - return gceClusterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.InstanceGroupConfig masterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - masterConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the masterConfig field is set. - */ - public boolean hasMasterConfig() { - return masterConfigBuilder_ != null || masterConfig_ != null; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig getMasterConfig() { - if (masterConfigBuilder_ == null) { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } else { - return masterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMasterConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (masterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - masterConfig_ = value; - onChanged(); - } else { - masterConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMasterConfig( - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder builderForValue) { - if (masterConfigBuilder_ == null) { - masterConfig_ = builderForValue.build(); - onChanged(); - } else { - masterConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeMasterConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (masterConfigBuilder_ == null) { - if (masterConfig_ != null) { - masterConfig_ = - com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder(masterConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - masterConfig_ = value; - } - onChanged(); - } else { - masterConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearMasterConfig() { - if (masterConfigBuilder_ == null) { - masterConfig_ = null; - onChanged(); - } else { - masterConfig_ = null; - masterConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder getMasterConfigBuilder() { - - onChanged(); - return getMasterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getMasterConfigOrBuilder() { - if (masterConfigBuilder_ != null) { - return masterConfigBuilder_.getMessageOrBuilder(); - } else { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's master instance.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - getMasterConfigFieldBuilder() { - if (masterConfigBuilder_ == null) { - masterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder>( - getMasterConfig(), getParentForChildren(), isClean()); - masterConfig_ = null; - } - return masterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.InstanceGroupConfig workerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - workerConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the workerConfig field is set. - */ - public boolean hasWorkerConfig() { - return workerConfigBuilder_ != null || workerConfig_ != null; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig getWorkerConfig() { - if (workerConfigBuilder_ == null) { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } else { - return workerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setWorkerConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (workerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workerConfig_ = value; - onChanged(); - } else { - workerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder builderForValue) { - if (workerConfigBuilder_ == null) { - workerConfig_ = builderForValue.build(); - onChanged(); - } else { - workerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeWorkerConfig(com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (workerConfigBuilder_ == null) { - if (workerConfig_ != null) { - workerConfig_ = - com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder(workerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - workerConfig_ = value; - } - onChanged(); - } else { - workerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearWorkerConfig() { - if (workerConfigBuilder_ == null) { - workerConfig_ = null; - onChanged(); - } else { - workerConfig_ = null; - workerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder getWorkerConfigBuilder() { - - onChanged(); - return getWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getWorkerConfigOrBuilder() { - if (workerConfigBuilder_ != null) { - return workerConfigBuilder_.getMessageOrBuilder(); - } else { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the cluster's worker instances.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - getWorkerConfigFieldBuilder() { - if (workerConfigBuilder_ == null) { - workerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder>( - getWorkerConfig(), getParentForChildren(), isClean()); - workerConfig_ = null; - } - return workerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.InstanceGroupConfig secondaryWorkerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - secondaryWorkerConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - public boolean hasSecondaryWorkerConfig() { - return secondaryWorkerConfigBuilder_ != null || secondaryWorkerConfig_ != null; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig getSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } else { - return secondaryWorkerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - secondaryWorkerConfig_ = value; - onChanged(); - } else { - secondaryWorkerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder builderForValue) { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = builderForValue.build(); - onChanged(); - } else { - secondaryWorkerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecondaryWorkerConfig( - com.google.cloud.dataproc.v1.InstanceGroupConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (secondaryWorkerConfig_ != null) { - secondaryWorkerConfig_ = - com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder(secondaryWorkerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - secondaryWorkerConfig_ = value; - } - onChanged(); - } else { - secondaryWorkerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = null; - onChanged(); - } else { - secondaryWorkerConfig_ = null; - secondaryWorkerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder - getSecondaryWorkerConfigBuilder() { - - onChanged(); - return getSecondaryWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - if (secondaryWorkerConfigBuilder_ != null) { - return secondaryWorkerConfigBuilder_.getMessageOrBuilder(); - } else { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * a cluster's secondary worker instances
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder> - getSecondaryWorkerConfigFieldBuilder() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.InstanceGroupConfig, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder>( - getSecondaryWorkerConfig(), getParentForChildren(), isClean()); - secondaryWorkerConfig_ = null; - } - return secondaryWorkerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.SoftwareConfig softwareConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SoftwareConfig, - com.google.cloud.dataproc.v1.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder> - softwareConfigBuilder_; - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the softwareConfig field is set. - */ - public boolean hasSoftwareConfig() { - return softwareConfigBuilder_ != null || softwareConfig_ != null; - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - public com.google.cloud.dataproc.v1.SoftwareConfig getSoftwareConfig() { - if (softwareConfigBuilder_ == null) { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } else { - return softwareConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSoftwareConfig(com.google.cloud.dataproc.v1.SoftwareConfig value) { - if (softwareConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - softwareConfig_ = value; - onChanged(); - } else { - softwareConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSoftwareConfig( - com.google.cloud.dataproc.v1.SoftwareConfig.Builder builderForValue) { - if (softwareConfigBuilder_ == null) { - softwareConfig_ = builderForValue.build(); - onChanged(); - } else { - softwareConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSoftwareConfig(com.google.cloud.dataproc.v1.SoftwareConfig value) { - if (softwareConfigBuilder_ == null) { - if (softwareConfig_ != null) { - softwareConfig_ = - com.google.cloud.dataproc.v1.SoftwareConfig.newBuilder(softwareConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - softwareConfig_ = value; - } - onChanged(); - } else { - softwareConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSoftwareConfig() { - if (softwareConfigBuilder_ == null) { - softwareConfig_ = null; - onChanged(); - } else { - softwareConfig_ = null; - softwareConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SoftwareConfig.Builder getSoftwareConfigBuilder() { - - onChanged(); - return getSoftwareConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder() { - if (softwareConfigBuilder_ != null) { - return softwareConfigBuilder_.getMessageOrBuilder(); - } else { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } - } - /** - * - * - *
-     * Optional. The config settings for cluster software.
-     * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SoftwareConfig, - com.google.cloud.dataproc.v1.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder> - getSoftwareConfigFieldBuilder() { - if (softwareConfigBuilder_ == null) { - softwareConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SoftwareConfig, - com.google.cloud.dataproc.v1.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder>( - getSoftwareConfig(), getParentForChildren(), isClean()); - softwareConfig_ = null; - } - return softwareConfigBuilder_; - } - - private java.util.List - initializationActions_ = java.util.Collections.emptyList(); - - private void ensureInitializationActionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - initializationActions_ = - new java.util.ArrayList( - initializationActions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeInitializationAction, - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder> - initializationActionsBuilder_; - - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInitializationActionsList() { - if (initializationActionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(initializationActions_); - } else { - return initializationActionsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getInitializationActionsCount() { - if (initializationActionsBuilder_ == null) { - return initializationActions_.size(); - } else { - return initializationActionsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeInitializationAction getInitializationActions( - int index) { - if (initializationActionsBuilder_ == null) { - return initializationActions_.get(index); - } else { - return initializationActionsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInitializationActions( - int index, com.google.cloud.dataproc.v1.NodeInitializationAction value) { - if (initializationActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInitializationActionsIsMutable(); - initializationActions_.set(index, value); - onChanged(); - } else { - initializationActionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInitializationActions( - int index, com.google.cloud.dataproc.v1.NodeInitializationAction.Builder builderForValue) { - if (initializationActionsBuilder_ == null) { - ensureInitializationActionsIsMutable(); - initializationActions_.set(index, builderForValue.build()); - onChanged(); - } else { - initializationActionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - com.google.cloud.dataproc.v1.NodeInitializationAction value) { - if (initializationActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInitializationActionsIsMutable(); - initializationActions_.add(value); - onChanged(); - } else { - initializationActionsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - int index, com.google.cloud.dataproc.v1.NodeInitializationAction value) { - if (initializationActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInitializationActionsIsMutable(); - initializationActions_.add(index, value); - onChanged(); - } else { - initializationActionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder builderForValue) { - if (initializationActionsBuilder_ == null) { - ensureInitializationActionsIsMutable(); - initializationActions_.add(builderForValue.build()); - onChanged(); - } else { - initializationActionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - int index, com.google.cloud.dataproc.v1.NodeInitializationAction.Builder builderForValue) { - if (initializationActionsBuilder_ == null) { - ensureInitializationActionsIsMutable(); - initializationActions_.add(index, builderForValue.build()); - onChanged(); - } else { - initializationActionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllInitializationActions( - java.lang.Iterable - values) { - if (initializationActionsBuilder_ == null) { - ensureInitializationActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, initializationActions_); - onChanged(); - } else { - initializationActionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearInitializationActions() { - if (initializationActionsBuilder_ == null) { - initializationActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - initializationActionsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeInitializationActions(int index) { - if (initializationActionsBuilder_ == null) { - ensureInitializationActionsIsMutable(); - initializationActions_.remove(index); - onChanged(); - } else { - initializationActionsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeInitializationAction.Builder - getInitializationActionsBuilder(int index) { - return getInitializationActionsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder - getInitializationActionsOrBuilder(int index) { - if (initializationActionsBuilder_ == null) { - return initializationActions_.get(index); - } else { - return initializationActionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInitializationActionsOrBuilderList() { - if (initializationActionsBuilder_ != null) { - return initializationActionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(initializationActions_); - } - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeInitializationAction.Builder - addInitializationActionsBuilder() { - return getInitializationActionsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.NodeInitializationAction.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeInitializationAction.Builder - addInitializationActionsBuilder(int index) { - return getInitializationActionsFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1.NodeInitializationAction.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Commands to execute on each node after config is
-     * completed. By default, executables are run on master and all worker nodes.
-     * You can test a node's `role` metadata to run an executable on
-     * a master or worker node, as shown below using `curl` (you can also use
-     * `wget`):
-     *     ROLE=$(curl -H Metadata-Flavor:Google
-     *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getInitializationActionsBuilderList() { - return getInitializationActionsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeInitializationAction, - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder> - getInitializationActionsFieldBuilder() { - if (initializationActionsBuilder_ == null) { - initializationActionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeInitializationAction, - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder>( - initializationActions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - initializationActions_ = null; - } - return initializationActionsBuilder_; - } - - private com.google.cloud.dataproc.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EncryptionConfig, - com.google.cloud.dataproc.v1.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder> - encryptionConfigBuilder_; - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionConfig field is set. - */ - public boolean hasEncryptionConfig() { - return encryptionConfigBuilder_ != null || encryptionConfig_ != null; - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - public com.google.cloud.dataproc.v1.EncryptionConfig getEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } else { - return encryptionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionConfig(com.google.cloud.dataproc.v1.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encryptionConfig_ = value; - onChanged(); - } else { - encryptionConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionConfig( - com.google.cloud.dataproc.v1.EncryptionConfig.Builder builderForValue) { - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = builderForValue.build(); - onChanged(); - } else { - encryptionConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEncryptionConfig(com.google.cloud.dataproc.v1.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (encryptionConfig_ != null) { - encryptionConfig_ = - com.google.cloud.dataproc.v1.EncryptionConfig.newBuilder(encryptionConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - encryptionConfig_ = value; - } - onChanged(); - } else { - encryptionConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - encryptionConfig_ = null; - onChanged(); - } else { - encryptionConfig_ = null; - encryptionConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EncryptionConfig.Builder getEncryptionConfigBuilder() { - - onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { - if (encryptionConfigBuilder_ != null) { - return encryptionConfigBuilder_.getMessageOrBuilder(); - } else { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EncryptionConfig, - com.google.cloud.dataproc.v1.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { - if (encryptionConfigBuilder_ == null) { - encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EncryptionConfig, - com.google.cloud.dataproc.v1.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder>( - getEncryptionConfig(), getParentForChildren(), isClean()); - encryptionConfig_ = null; - } - return encryptionConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.AutoscalingConfig autoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingConfig, - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder> - autoscalingConfigBuilder_; - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscalingConfig field is set. - */ - public boolean hasAutoscalingConfig() { - return autoscalingConfigBuilder_ != null || autoscalingConfig_ != null; - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - public com.google.cloud.dataproc.v1.AutoscalingConfig getAutoscalingConfig() { - if (autoscalingConfigBuilder_ == null) { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1.AutoscalingConfig.getDefaultInstance() - : autoscalingConfig_; - } else { - return autoscalingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscalingConfig(com.google.cloud.dataproc.v1.AutoscalingConfig value) { - if (autoscalingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - autoscalingConfig_ = value; - onChanged(); - } else { - autoscalingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscalingConfig( - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder builderForValue) { - if (autoscalingConfigBuilder_ == null) { - autoscalingConfig_ = builderForValue.build(); - onChanged(); - } else { - autoscalingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAutoscalingConfig(com.google.cloud.dataproc.v1.AutoscalingConfig value) { - if (autoscalingConfigBuilder_ == null) { - if (autoscalingConfig_ != null) { - autoscalingConfig_ = - com.google.cloud.dataproc.v1.AutoscalingConfig.newBuilder(autoscalingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - autoscalingConfig_ = value; - } - onChanged(); - } else { - autoscalingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAutoscalingConfig() { - if (autoscalingConfigBuilder_ == null) { - autoscalingConfig_ = null; - onChanged(); - } else { - autoscalingConfig_ = null; - autoscalingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingConfig.Builder getAutoscalingConfigBuilder() { - - onChanged(); - return getAutoscalingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder() { - if (autoscalingConfigBuilder_ != null) { - return autoscalingConfigBuilder_.getMessageOrBuilder(); - } else { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1.AutoscalingConfig.getDefaultInstance() - : autoscalingConfig_; - } - } - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingConfig, - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder> - getAutoscalingConfigFieldBuilder() { - if (autoscalingConfigBuilder_ == null) { - autoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingConfig, - com.google.cloud.dataproc.v1.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder>( - getAutoscalingConfig(), getParentForChildren(), isClean()); - autoscalingConfig_ = null; - } - return autoscalingConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.SecurityConfig securityConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SecurityConfig, - com.google.cloud.dataproc.v1.SecurityConfig.Builder, - com.google.cloud.dataproc.v1.SecurityConfigOrBuilder> - securityConfigBuilder_; - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - public boolean hasSecurityConfig() { - return securityConfigBuilder_ != null || securityConfig_ != null; - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - public com.google.cloud.dataproc.v1.SecurityConfig getSecurityConfig() { - if (securityConfigBuilder_ == null) { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1.SecurityConfig.getDefaultInstance() - : securityConfig_; - } else { - return securityConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecurityConfig(com.google.cloud.dataproc.v1.SecurityConfig value) { - if (securityConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityConfig_ = value; - onChanged(); - } else { - securityConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecurityConfig( - com.google.cloud.dataproc.v1.SecurityConfig.Builder builderForValue) { - if (securityConfigBuilder_ == null) { - securityConfig_ = builderForValue.build(); - onChanged(); - } else { - securityConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecurityConfig(com.google.cloud.dataproc.v1.SecurityConfig value) { - if (securityConfigBuilder_ == null) { - if (securityConfig_ != null) { - securityConfig_ = - com.google.cloud.dataproc.v1.SecurityConfig.newBuilder(securityConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - securityConfig_ = value; - } - onChanged(); - } else { - securityConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSecurityConfig() { - if (securityConfigBuilder_ == null) { - securityConfig_ = null; - onChanged(); - } else { - securityConfig_ = null; - securityConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SecurityConfig.Builder getSecurityConfigBuilder() { - - onChanged(); - return getSecurityConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SecurityConfigOrBuilder getSecurityConfigOrBuilder() { - if (securityConfigBuilder_ != null) { - return securityConfigBuilder_.getMessageOrBuilder(); - } else { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1.SecurityConfig.getDefaultInstance() - : securityConfig_; - } - } - /** - * - * - *
-     * Optional. Security settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SecurityConfig, - com.google.cloud.dataproc.v1.SecurityConfig.Builder, - com.google.cloud.dataproc.v1.SecurityConfigOrBuilder> - getSecurityConfigFieldBuilder() { - if (securityConfigBuilder_ == null) { - securityConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SecurityConfig, - com.google.cloud.dataproc.v1.SecurityConfig.Builder, - com.google.cloud.dataproc.v1.SecurityConfigOrBuilder>( - getSecurityConfig(), getParentForChildren(), isClean()); - securityConfig_ = null; - } - return securityConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.LifecycleConfig lifecycleConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LifecycleConfig, - com.google.cloud.dataproc.v1.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder> - lifecycleConfigBuilder_; - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - public boolean hasLifecycleConfig() { - return lifecycleConfigBuilder_ != null || lifecycleConfig_ != null; - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - public com.google.cloud.dataproc.v1.LifecycleConfig getLifecycleConfig() { - if (lifecycleConfigBuilder_ == null) { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } else { - return lifecycleConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLifecycleConfig(com.google.cloud.dataproc.v1.LifecycleConfig value) { - if (lifecycleConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lifecycleConfig_ = value; - onChanged(); - } else { - lifecycleConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLifecycleConfig( - com.google.cloud.dataproc.v1.LifecycleConfig.Builder builderForValue) { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = builderForValue.build(); - onChanged(); - } else { - lifecycleConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLifecycleConfig(com.google.cloud.dataproc.v1.LifecycleConfig value) { - if (lifecycleConfigBuilder_ == null) { - if (lifecycleConfig_ != null) { - lifecycleConfig_ = - com.google.cloud.dataproc.v1.LifecycleConfig.newBuilder(lifecycleConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - lifecycleConfig_ = value; - } - onChanged(); - } else { - lifecycleConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLifecycleConfig() { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = null; - onChanged(); - } else { - lifecycleConfig_ = null; - lifecycleConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LifecycleConfig.Builder getLifecycleConfigBuilder() { - - onChanged(); - return getLifecycleConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder getLifecycleConfigOrBuilder() { - if (lifecycleConfigBuilder_ != null) { - return lifecycleConfigBuilder_.getMessageOrBuilder(); - } else { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } - } - /** - * - * - *
-     * Optional. Lifecycle setting for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LifecycleConfig, - com.google.cloud.dataproc.v1.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder> - getLifecycleConfigFieldBuilder() { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LifecycleConfig, - com.google.cloud.dataproc.v1.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder>( - getLifecycleConfig(), getParentForChildren(), isClean()); - lifecycleConfig_ = null; - } - return lifecycleConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.EndpointConfig endpointConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EndpointConfig, - com.google.cloud.dataproc.v1.EndpointConfig.Builder, - com.google.cloud.dataproc.v1.EndpointConfigOrBuilder> - endpointConfigBuilder_; - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endpointConfig field is set. - */ - public boolean hasEndpointConfig() { - return endpointConfigBuilder_ != null || endpointConfig_ != null; - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - public com.google.cloud.dataproc.v1.EndpointConfig getEndpointConfig() { - if (endpointConfigBuilder_ == null) { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } else { - return endpointConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndpointConfig(com.google.cloud.dataproc.v1.EndpointConfig value) { - if (endpointConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointConfig_ = value; - onChanged(); - } else { - endpointConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndpointConfig( - com.google.cloud.dataproc.v1.EndpointConfig.Builder builderForValue) { - if (endpointConfigBuilder_ == null) { - endpointConfig_ = builderForValue.build(); - onChanged(); - } else { - endpointConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEndpointConfig(com.google.cloud.dataproc.v1.EndpointConfig value) { - if (endpointConfigBuilder_ == null) { - if (endpointConfig_ != null) { - endpointConfig_ = - com.google.cloud.dataproc.v1.EndpointConfig.newBuilder(endpointConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - endpointConfig_ = value; - } - onChanged(); - } else { - endpointConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearEndpointConfig() { - if (endpointConfigBuilder_ == null) { - endpointConfig_ = null; - onChanged(); - } else { - endpointConfig_ = null; - endpointConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EndpointConfig.Builder getEndpointConfigBuilder() { - - onChanged(); - return getEndpointConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.EndpointConfigOrBuilder getEndpointConfigOrBuilder() { - if (endpointConfigBuilder_ != null) { - return endpointConfigBuilder_.getMessageOrBuilder(); - } else { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EndpointConfig, - com.google.cloud.dataproc.v1.EndpointConfig.Builder, - com.google.cloud.dataproc.v1.EndpointConfigOrBuilder> - getEndpointConfigFieldBuilder() { - if (endpointConfigBuilder_ == null) { - endpointConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.EndpointConfig, - com.google.cloud.dataproc.v1.EndpointConfig.Builder, - com.google.cloud.dataproc.v1.EndpointConfigOrBuilder>( - getEndpointConfig(), getParentForChildren(), isClean()); - endpointConfig_ = null; - } - return endpointConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.MetastoreConfig metastoreConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder> - metastoreConfigBuilder_; - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - public boolean hasMetastoreConfig() { - return metastoreConfigBuilder_ != null || metastoreConfig_ != null; - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - public com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig() { - if (metastoreConfigBuilder_ == null) { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } else { - return metastoreConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetastoreConfig(com.google.cloud.dataproc.v1.MetastoreConfig value) { - if (metastoreConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metastoreConfig_ = value; - onChanged(); - } else { - metastoreConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMetastoreConfig( - com.google.cloud.dataproc.v1.MetastoreConfig.Builder builderForValue) { - if (metastoreConfigBuilder_ == null) { - metastoreConfig_ = builderForValue.build(); - onChanged(); - } else { - metastoreConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeMetastoreConfig(com.google.cloud.dataproc.v1.MetastoreConfig value) { - if (metastoreConfigBuilder_ == null) { - if (metastoreConfig_ != null) { - metastoreConfig_ = - com.google.cloud.dataproc.v1.MetastoreConfig.newBuilder(metastoreConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - metastoreConfig_ = value; - } - onChanged(); - } else { - metastoreConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearMetastoreConfig() { - if (metastoreConfigBuilder_ == null) { - metastoreConfig_ = null; - onChanged(); - } else { - metastoreConfig_ = null; - metastoreConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.MetastoreConfig.Builder getMetastoreConfigBuilder() { - - onChanged(); - return getMetastoreConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder() { - if (metastoreConfigBuilder_ != null) { - return metastoreConfigBuilder_.getMessageOrBuilder(); - } else { - return metastoreConfig_ == null - ? com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance() - : metastoreConfig_; - } - } - /** - * - * - *
-     * Optional. Metastore configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder> - getMetastoreConfigFieldBuilder() { - if (metastoreConfigBuilder_ == null) { - metastoreConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.MetastoreConfig, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder, - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder>( - getMetastoreConfig(), getParentForChildren(), isClean()); - metastoreConfig_ = null; - } - return metastoreConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.ClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterConfig) - private static final com.google.cloud.dataproc.v1.ClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterConfig(); - } - - public static com.google.cloud.dataproc.v1.ClusterConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterConfig(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.dataproc.v1.ClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java deleted file mode 100644 index 848764d7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The configBucket. - */ - java.lang.String getConfigBucket(); - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for configBucket. - */ - com.google.protobuf.ByteString getConfigBucketBytes(); - - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - java.lang.String getTempBucket(); - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - com.google.protobuf.ByteString getTempBucketBytes(); - - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gceClusterConfig field is set. - */ - boolean hasGceClusterConfig(); - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - com.google.cloud.dataproc.v1.GceClusterConfig getGceClusterConfig(); - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder getGceClusterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the masterConfig field is set. - */ - boolean hasMasterConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - com.google.cloud.dataproc.v1.InstanceGroupConfig getMasterConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's master instance.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getMasterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the workerConfig field is set. - */ - boolean hasWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - com.google.cloud.dataproc.v1.InstanceGroupConfig getWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the cluster's worker instances.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the secondaryWorkerConfig field is set. - */ - boolean hasSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - com.google.cloud.dataproc.v1.InstanceGroupConfig getSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * a cluster's secondary worker instances
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder getSecondaryWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the softwareConfig field is set. - */ - boolean hasSoftwareConfig(); - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - com.google.cloud.dataproc.v1.SoftwareConfig getSoftwareConfig(); - /** - * - * - *
-   * Optional. The config settings for cluster software.
-   * 
- * - * - * .google.cloud.dataproc.v1.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getInitializationActionsList(); - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.NodeInitializationAction getInitializationActions(int index); - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getInitializationActionsCount(); - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getInitializationActionsOrBuilderList(); - /** - * - * - *
-   * Optional. Commands to execute on each node after config is
-   * completed. By default, executables are run on master and all worker nodes.
-   * You can test a node's `role` metadata to run an executable on
-   * a master or worker node, as shown below using `curl` (you can also use
-   * `wget`):
-   *     ROLE=$(curl -H Metadata-Flavor:Google
-   *     http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder getInitializationActionsOrBuilder( - int index); - - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the encryptionConfig field is set. - */ - boolean hasEncryptionConfig(); - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - com.google.cloud.dataproc.v1.EncryptionConfig getEncryptionConfig(); - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscalingConfig field is set. - */ - boolean hasAutoscalingConfig(); - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - com.google.cloud.dataproc.v1.AutoscalingConfig getAutoscalingConfig(); - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingConfig autoscaling_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - boolean hasSecurityConfig(); - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - com.google.cloud.dataproc.v1.SecurityConfig getSecurityConfig(); - /** - * - * - *
-   * Optional. Security settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.SecurityConfig security_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SecurityConfigOrBuilder getSecurityConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - boolean hasLifecycleConfig(); - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - com.google.cloud.dataproc.v1.LifecycleConfig getLifecycleConfig(); - /** - * - * - *
-   * Optional. Lifecycle setting for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.LifecycleConfig lifecycle_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder getLifecycleConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endpointConfig field is set. - */ - boolean hasEndpointConfig(); - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - com.google.cloud.dataproc.v1.EndpointConfig getEndpointConfig(); - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1.EndpointConfig endpoint_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.EndpointConfigOrBuilder getEndpointConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the metastoreConfig field is set. - */ - boolean hasMetastoreConfig(); - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The metastoreConfig. - */ - com.google.cloud.dataproc.v1.MetastoreConfig getMetastoreConfig(); - /** - * - * - *
-   * Optional. Metastore configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.MetastoreConfig metastore_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder getMetastoreConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetrics.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetrics.java deleted file mode 100644 index 34679ea7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetrics.java +++ /dev/null @@ -1,1081 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Contains cluster daemon metrics, such as HDFS and YARN stats.
- * **Beta Feature**: This report is available for testing purposes only. It may
- * be changed before final release.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterMetrics} - */ -public final class ClusterMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterMetrics) - ClusterMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterMetrics.newBuilder() to construct. - private ClusterMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterMetrics() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterMetrics( - 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)) { - hdfsMetrics_ = - com.google.protobuf.MapField.newMapField( - HdfsMetricsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry hdfsMetrics__ = - input.readMessage( - HdfsMetricsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - hdfsMetrics_.getMutableMap().put(hdfsMetrics__.getKey(), hdfsMetrics__.getValue()); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - yarnMetrics_ = - com.google.protobuf.MapField.newMapField( - YarnMetricsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry yarnMetrics__ = - input.readMessage( - YarnMetricsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - yarnMetrics_.getMutableMap().put(yarnMetrics__.getKey(), yarnMetrics__.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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetHdfsMetrics(); - case 2: - return internalGetYarnMetrics(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterMetrics.class, - com.google.cloud.dataproc.v1.ClusterMetrics.Builder.class); - } - - public static final int HDFS_METRICS_FIELD_NUMBER = 1; - - private static final class HdfsMetricsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - - private com.google.protobuf.MapField hdfsMetrics_; - - private com.google.protobuf.MapField internalGetHdfsMetrics() { - if (hdfsMetrics_ == null) { - return com.google.protobuf.MapField.emptyMapField(HdfsMetricsDefaultEntryHolder.defaultEntry); - } - return hdfsMetrics_; - } - - public int getHdfsMetricsCount() { - return internalGetHdfsMetrics().getMap().size(); - } - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public boolean containsHdfsMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetHdfsMetrics().getMap().containsKey(key); - } - /** Use {@link #getHdfsMetricsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHdfsMetrics() { - return getHdfsMetricsMap(); - } - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public java.util.Map getHdfsMetricsMap() { - return internalGetHdfsMetrics().getMap(); - } - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public long getHdfsMetricsOrDefault(java.lang.String key, long defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHdfsMetrics().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public long getHdfsMetricsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHdfsMetrics().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int YARN_METRICS_FIELD_NUMBER = 2; - - private static final class YarnMetricsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - - private com.google.protobuf.MapField yarnMetrics_; - - private com.google.protobuf.MapField internalGetYarnMetrics() { - if (yarnMetrics_ == null) { - return com.google.protobuf.MapField.emptyMapField(YarnMetricsDefaultEntryHolder.defaultEntry); - } - return yarnMetrics_; - } - - public int getYarnMetricsCount() { - return internalGetYarnMetrics().getMap().size(); - } - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public boolean containsYarnMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetYarnMetrics().getMap().containsKey(key); - } - /** Use {@link #getYarnMetricsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getYarnMetrics() { - return getYarnMetricsMap(); - } - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public java.util.Map getYarnMetricsMap() { - return internalGetYarnMetrics().getMap(); - } - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public long getYarnMetricsOrDefault(java.lang.String key, long defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetYarnMetrics().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public long getYarnMetricsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetYarnMetrics().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetHdfsMetrics(), HdfsMetricsDefaultEntryHolder.defaultEntry, 1); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetYarnMetrics(), YarnMetricsDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetHdfsMetrics().getMap().entrySet()) { - com.google.protobuf.MapEntry hdfsMetrics__ = - HdfsMetricsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hdfsMetrics__); - } - for (java.util.Map.Entry entry : - internalGetYarnMetrics().getMap().entrySet()) { - com.google.protobuf.MapEntry yarnMetrics__ = - YarnMetricsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, yarnMetrics__); - } - 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.dataproc.v1.ClusterMetrics)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterMetrics other = - (com.google.cloud.dataproc.v1.ClusterMetrics) obj; - - if (!internalGetHdfsMetrics().equals(other.internalGetHdfsMetrics())) return false; - if (!internalGetYarnMetrics().equals(other.internalGetYarnMetrics())) 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 (!internalGetHdfsMetrics().getMap().isEmpty()) { - hash = (37 * hash) + HDFS_METRICS_FIELD_NUMBER; - hash = (53 * hash) + internalGetHdfsMetrics().hashCode(); - } - if (!internalGetYarnMetrics().getMap().isEmpty()) { - hash = (37 * hash) + YARN_METRICS_FIELD_NUMBER; - hash = (53 * hash) + internalGetYarnMetrics().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics 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.dataproc.v1.ClusterMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics parseFrom( - 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.dataproc.v1.ClusterMetrics parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics 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.dataproc.v1.ClusterMetrics parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics 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.dataproc.v1.ClusterMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics 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.dataproc.v1.ClusterMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Contains cluster daemon metrics, such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It may
-   * be changed before final release.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterMetrics) - com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetHdfsMetrics(); - case 2: - return internalGetYarnMetrics(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableHdfsMetrics(); - case 2: - return internalGetMutableYarnMetrics(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterMetrics.class, - com.google.cloud.dataproc.v1.ClusterMetrics.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterMetrics.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(); - internalGetMutableHdfsMetrics().clear(); - internalGetMutableYarnMetrics().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterMetrics getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterMetrics build() { - com.google.cloud.dataproc.v1.ClusterMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterMetrics buildPartial() { - com.google.cloud.dataproc.v1.ClusterMetrics result = - new com.google.cloud.dataproc.v1.ClusterMetrics(this); - int from_bitField0_ = bitField0_; - result.hdfsMetrics_ = internalGetHdfsMetrics(); - result.hdfsMetrics_.makeImmutable(); - result.yarnMetrics_ = internalGetYarnMetrics(); - result.yarnMetrics_.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.dataproc.v1.ClusterMetrics) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterMetrics other) { - if (other == com.google.cloud.dataproc.v1.ClusterMetrics.getDefaultInstance()) return this; - internalGetMutableHdfsMetrics().mergeFrom(other.internalGetHdfsMetrics()); - internalGetMutableYarnMetrics().mergeFrom(other.internalGetYarnMetrics()); - 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.dataproc.v1.ClusterMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ClusterMetrics) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField hdfsMetrics_; - - private com.google.protobuf.MapField - internalGetHdfsMetrics() { - if (hdfsMetrics_ == null) { - return com.google.protobuf.MapField.emptyMapField( - HdfsMetricsDefaultEntryHolder.defaultEntry); - } - return hdfsMetrics_; - } - - private com.google.protobuf.MapField - internalGetMutableHdfsMetrics() { - onChanged(); - ; - if (hdfsMetrics_ == null) { - hdfsMetrics_ = - com.google.protobuf.MapField.newMapField(HdfsMetricsDefaultEntryHolder.defaultEntry); - } - if (!hdfsMetrics_.isMutable()) { - hdfsMetrics_ = hdfsMetrics_.copy(); - } - return hdfsMetrics_; - } - - public int getHdfsMetricsCount() { - return internalGetHdfsMetrics().getMap().size(); - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public boolean containsHdfsMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetHdfsMetrics().getMap().containsKey(key); - } - /** Use {@link #getHdfsMetricsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHdfsMetrics() { - return getHdfsMetricsMap(); - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public java.util.Map getHdfsMetricsMap() { - return internalGetHdfsMetrics().getMap(); - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public long getHdfsMetricsOrDefault(java.lang.String key, long defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHdfsMetrics().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - @java.lang.Override - public long getHdfsMetricsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHdfsMetrics().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHdfsMetrics() { - internalGetMutableHdfsMetrics().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - public Builder removeHdfsMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableHdfsMetrics().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableHdfsMetrics() { - return internalGetMutableHdfsMetrics().getMutableMap(); - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - public Builder putHdfsMetrics(java.lang.String key, long value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - - internalGetMutableHdfsMetrics().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The HDFS metrics.
-     * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - public Builder putAllHdfsMetrics(java.util.Map values) { - internalGetMutableHdfsMetrics().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField yarnMetrics_; - - private com.google.protobuf.MapField - internalGetYarnMetrics() { - if (yarnMetrics_ == null) { - return com.google.protobuf.MapField.emptyMapField( - YarnMetricsDefaultEntryHolder.defaultEntry); - } - return yarnMetrics_; - } - - private com.google.protobuf.MapField - internalGetMutableYarnMetrics() { - onChanged(); - ; - if (yarnMetrics_ == null) { - yarnMetrics_ = - com.google.protobuf.MapField.newMapField(YarnMetricsDefaultEntryHolder.defaultEntry); - } - if (!yarnMetrics_.isMutable()) { - yarnMetrics_ = yarnMetrics_.copy(); - } - return yarnMetrics_; - } - - public int getYarnMetricsCount() { - return internalGetYarnMetrics().getMap().size(); - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public boolean containsYarnMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetYarnMetrics().getMap().containsKey(key); - } - /** Use {@link #getYarnMetricsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getYarnMetrics() { - return getYarnMetricsMap(); - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public java.util.Map getYarnMetricsMap() { - return internalGetYarnMetrics().getMap(); - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public long getYarnMetricsOrDefault(java.lang.String key, long defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetYarnMetrics().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - @java.lang.Override - public long getYarnMetricsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetYarnMetrics().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearYarnMetrics() { - internalGetMutableYarnMetrics().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - public Builder removeYarnMetrics(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableYarnMetrics().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableYarnMetrics() { - return internalGetMutableYarnMetrics().getMutableMap(); - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - public Builder putYarnMetrics(java.lang.String key, long value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - - internalGetMutableYarnMetrics().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The YARN metrics.
-     * 
- * - * map<string, int64> yarn_metrics = 2; - */ - public Builder putAllYarnMetrics(java.util.Map values) { - internalGetMutableYarnMetrics().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.dataproc.v1.ClusterMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterMetrics) - private static final com.google.cloud.dataproc.v1.ClusterMetrics DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterMetrics(); - } - - public static com.google.cloud.dataproc.v1.ClusterMetrics getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterMetrics(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.dataproc.v1.ClusterMetrics getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetricsOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetricsOrBuilder.java deleted file mode 100644 index 8cea6493..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetricsOrBuilder.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - int getHdfsMetricsCount(); - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - boolean containsHdfsMetrics(java.lang.String key); - /** Use {@link #getHdfsMetricsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getHdfsMetrics(); - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - java.util.Map getHdfsMetricsMap(); - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - long getHdfsMetricsOrDefault(java.lang.String key, long defaultValue); - /** - * - * - *
-   * The HDFS metrics.
-   * 
- * - * map<string, int64> hdfs_metrics = 1; - */ - long getHdfsMetricsOrThrow(java.lang.String key); - - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - int getYarnMetricsCount(); - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - boolean containsYarnMetrics(java.lang.String key); - /** Use {@link #getYarnMetricsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getYarnMetrics(); - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - java.util.Map getYarnMetricsMap(); - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - long getYarnMetricsOrDefault(java.lang.String key, long defaultValue); - /** - * - * - *
-   * The YARN metrics.
-   * 
- * - * map<string, int64> yarn_metrics = 2; - */ - long getYarnMetricsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperation.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperation.java deleted file mode 100644 index 1fd830b1..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperation.java +++ /dev/null @@ -1,903 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The cluster operation triggered by a workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperation} - */ -public final class ClusterOperation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterOperation) - ClusterOperationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterOperation.newBuilder() to construct. - private ClusterOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterOperation() { - operationId_ = ""; - error_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterOperation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterOperation( - 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(); - - operationId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - error_ = s; - break; - } - case 24: - { - done_ = 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterOperation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperation.class, - com.google.cloud.dataproc.v1.ClusterOperation.Builder.class); - } - - public static final int OPERATION_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object operationId_; - /** - * - * - *
-   * Output only. The id of the cluster operation.
-   * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationId. - */ - @java.lang.Override - public java.lang.String getOperationId() { - java.lang.Object ref = operationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The id of the cluster operation.
-   * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOperationIdBytes() { - java.lang.Object ref = operationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ERROR_FIELD_NUMBER = 2; - private volatile java.lang.Object error_; - /** - * - * - *
-   * Output only. Error, if operation failed.
-   * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - @java.lang.Override - public java.lang.String getError() { - java.lang.Object ref = error_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - error_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Error, if operation failed.
-   * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - @java.lang.Override - public com.google.protobuf.ByteString getErrorBytes() { - java.lang.Object ref = error_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - error_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DONE_FIELD_NUMBER = 3; - private boolean done_; - /** - * - * - *
-   * Output only. Indicates the operation is done.
-   * 
- * - * bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, error_); - } - if (done_ != false) { - output.writeBool(3, done_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, error_); - } - if (done_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, done_); - } - 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.dataproc.v1.ClusterOperation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterOperation other = - (com.google.cloud.dataproc.v1.ClusterOperation) obj; - - if (!getOperationId().equals(other.getOperationId())) return false; - if (!getError().equals(other.getError())) return false; - if (getDone() != other.getDone()) 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) + OPERATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getOperationId().hashCode(); - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - hash = (37 * hash) + DONE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDone()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterOperation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation 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.dataproc.v1.ClusterOperation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation parseFrom( - 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.dataproc.v1.ClusterOperation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation 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.dataproc.v1.ClusterOperation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation 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.dataproc.v1.ClusterOperation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation 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.dataproc.v1.ClusterOperation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 cluster operation triggered by a workflow.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterOperation) - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterOperation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperation.class, - com.google.cloud.dataproc.v1.ClusterOperation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterOperation.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(); - operationId_ = ""; - - error_ = ""; - - done_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperation build() { - com.google.cloud.dataproc.v1.ClusterOperation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperation buildPartial() { - com.google.cloud.dataproc.v1.ClusterOperation result = - new com.google.cloud.dataproc.v1.ClusterOperation(this); - result.operationId_ = operationId_; - result.error_ = error_; - result.done_ = done_; - 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.dataproc.v1.ClusterOperation) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterOperation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterOperation other) { - if (other == com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance()) return this; - if (!other.getOperationId().isEmpty()) { - operationId_ = other.operationId_; - onChanged(); - } - if (!other.getError().isEmpty()) { - error_ = other.error_; - onChanged(); - } - if (other.getDone() != false) { - setDone(other.getDone()); - } - 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.dataproc.v1.ClusterOperation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ClusterOperation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object operationId_ = ""; - /** - * - * - *
-     * Output only. The id of the cluster operation.
-     * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationId. - */ - public java.lang.String getOperationId() { - java.lang.Object ref = operationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The id of the cluster operation.
-     * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationId. - */ - public com.google.protobuf.ByteString getOperationIdBytes() { - java.lang.Object ref = operationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The id of the cluster operation.
-     * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The operationId to set. - * @return This builder for chaining. - */ - public Builder setOperationId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - operationId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The id of the cluster operation.
-     * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOperationId() { - - operationId_ = getDefaultInstance().getOperationId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The id of the cluster operation.
-     * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for operationId to set. - * @return This builder for chaining. - */ - public Builder setOperationIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - operationId_ = value; - onChanged(); - return this; - } - - private java.lang.Object error_ = ""; - /** - * - * - *
-     * Output only. Error, if operation failed.
-     * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - public java.lang.String getError() { - java.lang.Object ref = error_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - error_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Error, if operation failed.
-     * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - public com.google.protobuf.ByteString getErrorBytes() { - java.lang.Object ref = error_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - error_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Error, if operation failed.
-     * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The error to set. - * @return This builder for chaining. - */ - public Builder setError(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - error_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Error, if operation failed.
-     * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearError() { - - error_ = getDefaultInstance().getError(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Error, if operation failed.
-     * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for error to set. - * @return This builder for chaining. - */ - public Builder setErrorBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - error_ = value; - onChanged(); - return this; - } - - private boolean done_; - /** - * - * - *
-     * Output only. Indicates the operation is done.
-     * 
- * - * bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - /** - * - * - *
-     * Output only. Indicates the operation is done.
-     * 
- * - * bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The done to set. - * @return This builder for chaining. - */ - public Builder setDone(boolean value) { - - done_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Indicates the operation is done.
-     * 
- * - * bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDone() { - - done_ = 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.dataproc.v1.ClusterOperation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterOperation) - private static final com.google.cloud.dataproc.v1.ClusterOperation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterOperation(); - } - - public static com.google.cloud.dataproc.v1.ClusterOperation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterOperation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterOperation(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.dataproc.v1.ClusterOperation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadata.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadata.java deleted file mode 100644 index 4058f305..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadata.java +++ /dev/null @@ -1,2639 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Metadata describing the operation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperationMetadata} - */ -public final class ClusterOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterOperationMetadata) - ClusterOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterOperationMetadata.newBuilder() to construct. - private ClusterOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterOperationMetadata() { - clusterName_ = ""; - clusterUuid_ = ""; - statusHistory_ = java.util.Collections.emptyList(); - operationType_ = ""; - description_ = ""; - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterOperationMetadata( - 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 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 74: - { - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterOperationStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - statusHistory_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - statusHistory_.add( - input.readMessage( - com.google.cloud.dataproc.v1.ClusterOperationStatus.parser(), - extensionRegistry)); - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - operationType_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 106: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - warnings_.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)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 13: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperationMetadata.class, - com.google.cloud.dataproc.v1.ClusterOperationMetadata.Builder.class); - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 7; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 8; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_FIELD_NUMBER = 9; - private com.google.cloud.dataproc.v1.ClusterOperationStatus status_; - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() - : status_; - } - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - public static final int STATUS_HISTORY_FIELD_NUMBER = 10; - private java.util.List statusHistory_; - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryOrBuilderList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getStatusHistoryCount() { - return statusHistory_.size(); - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder( - int index) { - return statusHistory_.get(index); - } - - public static final int OPERATION_TYPE_FIELD_NUMBER = 11; - private volatile java.lang.Object operationType_; - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - @java.lang.Override - public java.lang.String getOperationType() { - java.lang.Object ref = operationType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationType_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOperationTypeBytes() { - java.lang.Object ref = operationType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 12; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 LABELS_FIELD_NUMBER = 13; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_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(); - } - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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(); - } - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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; - } - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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 WARNINGS_FIELD_NUMBER = 14; - private com.google.protobuf.LazyStringList warnings_; - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the warnings. - */ - public com.google.protobuf.ProtocolStringList getWarningsList() { - return warnings_; - } - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - public java.lang.String getWarnings(int index) { - return warnings_.get(index); - } - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - public com.google.protobuf.ByteString getWarningsBytes(int index) { - return warnings_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, clusterUuid_); - } - if (status_ != null) { - output.writeMessage(9, getStatus()); - } - for (int i = 0; i < statusHistory_.size(); i++) { - output.writeMessage(10, statusHistory_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, operationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, description_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 13); - for (int i = 0; i < warnings_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, warnings_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, clusterUuid_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getStatus()); - } - for (int i = 0; i < statusHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, statusHistory_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, operationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, description_); - } - 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(13, labels__); - } - { - int dataSize = 0; - for (int i = 0; i < warnings_.size(); i++) { - dataSize += computeStringSizeNoTag(warnings_.getRaw(i)); - } - size += dataSize; - size += 1 * getWarningsList().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.dataproc.v1.ClusterOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterOperationMetadata other = - (com.google.cloud.dataproc.v1.ClusterOperationMetadata) obj; - - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } - if (!getStatusHistoryList().equals(other.getStatusHistoryList())) return false; - if (!getOperationType().equals(other.getOperationType())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getWarningsList().equals(other.getWarningsList())) 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) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - if (getStatusHistoryCount() > 0) { - hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getStatusHistoryList().hashCode(); - } - hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getOperationType().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getWarningsCount() > 0) { - hash = (37 * hash) + WARNINGS_FIELD_NUMBER; - hash = (53 * hash) + getWarningsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata 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.dataproc.v1.ClusterOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata parseFrom( - 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.dataproc.v1.ClusterOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata 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.dataproc.v1.ClusterOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata 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.dataproc.v1.ClusterOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata 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.dataproc.v1.ClusterOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Metadata describing the operation.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterOperationMetadata) - com.google.cloud.dataproc.v1.ClusterOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 13: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 13: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperationMetadata.class, - com.google.cloud.dataproc.v1.ClusterOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusHistoryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - clusterName_ = ""; - - clusterUuid_ = ""; - - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - statusHistoryBuilder_.clear(); - } - operationType_ = ""; - - description_ = ""; - - internalGetMutableLabels().clear(); - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationMetadata build() { - com.google.cloud.dataproc.v1.ClusterOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationMetadata buildPartial() { - com.google.cloud.dataproc.v1.ClusterOperationMetadata result = - new com.google.cloud.dataproc.v1.ClusterOperationMetadata(this); - int from_bitField0_ = bitField0_; - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } - if (statusHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.statusHistory_ = statusHistory_; - } else { - result.statusHistory_ = statusHistoryBuilder_.build(); - } - result.operationType_ = operationType_; - result.description_ = description_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - warnings_ = warnings_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.warnings_ = warnings_; - 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.dataproc.v1.ClusterOperationMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterOperationMetadata other) { - if (other == com.google.cloud.dataproc.v1.ClusterOperationMetadata.getDefaultInstance()) - return this; - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - if (statusHistoryBuilder_ == null) { - if (!other.statusHistory_.isEmpty()) { - if (statusHistory_.isEmpty()) { - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStatusHistoryIsMutable(); - statusHistory_.addAll(other.statusHistory_); - } - onChanged(); - } - } else { - if (!other.statusHistory_.isEmpty()) { - if (statusHistoryBuilder_.isEmpty()) { - statusHistoryBuilder_.dispose(); - statusHistoryBuilder_ = null; - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - statusHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStatusHistoryFieldBuilder() - : null; - } else { - statusHistoryBuilder_.addAllMessages(other.statusHistory_); - } - } - } - if (!other.getOperationType().isEmpty()) { - operationType_ = other.operationType_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (!other.warnings_.isEmpty()) { - if (warnings_.isEmpty()) { - warnings_ = other.warnings_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureWarningsIsMutable(); - warnings_.addAll(other.warnings_); - } - 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.dataproc.v1.ClusterOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ClusterOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Output only. Name of the cluster for the operation.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Name of the cluster for the operation.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Name of the cluster for the operation.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the cluster for the operation.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Name of the cluster for the operation.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Output only. Cluster UUID for the operation.
-     * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Cluster UUID for the operation.
-     * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Cluster UUID for the operation.
-     * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Cluster UUID for the operation.
-     * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Cluster UUID for the operation.
-     * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterOperationStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus( - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1.ClusterOperationStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder>( - getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - private java.util.List statusHistory_ = - java.util.Collections.emptyList(); - - private void ensureStatusHistoryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - statusHistory_ = - new java.util.ArrayList( - statusHistory_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryList() { - if (statusHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(statusHistory_); - } else { - return statusHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getStatusHistoryCount() { - if (statusHistoryBuilder_ == null) { - return statusHistory_.size(); - } else { - return statusHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterOperationStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, value); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(com.google.cloud.dataproc.v1.ClusterOperationStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterOperationStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllStatusHistory( - java.lang.Iterable values) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusHistory_); - onChanged(); - } else { - statusHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatusHistory() { - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - statusHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.remove(index); - onChanged(); - } else { - statusHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder getStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder( - int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryOrBuilderList() { - if (statusHistoryBuilder_ != null) { - return statusHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statusHistory_); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder addStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryBuilderList() { - return getStatusHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperationStatus, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder>( - statusHistory_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - statusHistory_ = null; - } - return statusHistoryBuilder_; - } - - private java.lang.Object operationType_ = ""; - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - public java.lang.String getOperationType() { - java.lang.Object ref = operationType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - public com.google.protobuf.ByteString getOperationTypeBytes() { - java.lang.Object ref = operationType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - operationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOperationType() { - - operationType_ = getDefaultInstance().getOperationType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - operationType_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 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(); - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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(); - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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; - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @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; - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - 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(); - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - 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; - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList warnings_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureWarningsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - warnings_ = new com.google.protobuf.LazyStringArrayList(warnings_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the warnings. - */ - public com.google.protobuf.ProtocolStringList getWarningsList() { - return warnings_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - public java.lang.String getWarnings(int index) { - return warnings_.get(index); - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - public com.google.protobuf.ByteString getWarningsBytes(int index) { - return warnings_.getByteString(index); - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index to set the value at. - * @param value The warnings to set. - * @return This builder for chaining. - */ - public Builder setWarnings(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The warnings to add. - * @return This builder for chaining. - */ - public Builder addWarnings(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param values The warnings to add. - * @return This builder for chaining. - */ - public Builder addAllWarnings(java.lang.Iterable values) { - ensureWarningsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, warnings_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearWarnings() { - warnings_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes of the warnings to add. - * @return This builder for chaining. - */ - public Builder addWarningsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWarningsIsMutable(); - warnings_.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.dataproc.v1.ClusterOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterOperationMetadata) - private static final com.google.cloud.dataproc.v1.ClusterOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterOperationMetadata(); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterOperationMetadata(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.dataproc.v1.ClusterOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadataOrBuilder.java deleted file mode 100644 index 68614859..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadataOrBuilder.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1.ClusterOperationStatus getStatus(); - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOperationStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterOperationStatus status_history = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder(int index); - - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - java.lang.String getOperationType(); - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - com.google.protobuf.ByteString getOperationTypeBytes(); - - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getLabelsCount(); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the warnings. - */ - java.util.List getWarningsList(); - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of warnings. - */ - int getWarningsCount(); - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The warnings at the given index. - */ - java.lang.String getWarnings(int index); - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the warnings at the given index. - */ - com.google.protobuf.ByteString getWarningsBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationOrBuilder.java deleted file mode 100644 index 0c573e43..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterOperationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterOperation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The id of the cluster operation.
-   * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationId. - */ - java.lang.String getOperationId(); - /** - * - * - *
-   * Output only. The id of the cluster operation.
-   * 
- * - * string operation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationId. - */ - com.google.protobuf.ByteString getOperationIdBytes(); - - /** - * - * - *
-   * Output only. Error, if operation failed.
-   * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - java.lang.String getError(); - /** - * - * - *
-   * Output only. Error, if operation failed.
-   * 
- * - * string error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - com.google.protobuf.ByteString getErrorBytes(); - - /** - * - * - *
-   * Output only. Indicates the operation is done.
-   * 
- * - * bool done = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - boolean getDone(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatus.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatus.java deleted file mode 100644 index 51a4ad97..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatus.java +++ /dev/null @@ -1,1464 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The status of the operation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperationStatus} - */ -public final class ClusterOperationStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterOperationStatus) - ClusterOperationStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterOperationStatus.newBuilder() to construct. - private ClusterOperationStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterOperationStatus() { - state_ = 0; - innerState_ = ""; - details_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterOperationStatus(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterOperationStatus( - 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - innerState_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - details_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (stateStartTime_ != null) { - subBuilder = stateStartTime_.toBuilder(); - } - stateStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateStartTime_); - stateStartTime_ = 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.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperationStatus.class, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder.class); - } - - /** - * - * - *
-   * The operation state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.ClusterOperationStatus.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unused.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * - * - *
-     * The operation has been created.
-     * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - * - * - *
-     * The operation is running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The operation is done; either cancelled or completed.
-     * 
- * - * DONE = 3; - */ - DONE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Unused.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * - * - *
-     * The operation has been created.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - * - * - *
-     * The operation is running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The operation is done; either cancelled or completed.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_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 UNKNOWN; - case 1: - return PENDING; - case 2: - return RUNNING; - case 3: - return DONE; - 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.dataproc.v1.ClusterOperationStatus.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.ClusterOperationStatus.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterOperationStatus.State result = - com.google.cloud.dataproc.v1.ClusterOperationStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.ClusterOperationStatus.State.UNRECOGNIZED - : result; - } - - public static final int INNER_STATE_FIELD_NUMBER = 2; - private volatile java.lang.Object innerState_; - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The innerState. - */ - @java.lang.Override - public java.lang.String getInnerState() { - java.lang.Object ref = innerState_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - innerState_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for innerState. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInnerStateBytes() { - java.lang.Object ref = innerState_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - innerState_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DETAILS_FIELD_NUMBER = 3; - private volatile java.lang.Object details_; - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_START_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp stateStartTime_; - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - @java.lang.Override - public boolean hasStateStartTime() { - return stateStartTime_ != null; - } - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStateStartTime() { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - return getStateStartTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (state_ != com.google.cloud.dataproc.v1.ClusterOperationStatus.State.UNKNOWN.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(innerState_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, innerState_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, details_); - } - if (stateStartTime_ != null) { - output.writeMessage(4, getStateStartTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.dataproc.v1.ClusterOperationStatus.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(innerState_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, innerState_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); - } - if (stateStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStateStartTime()); - } - 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.dataproc.v1.ClusterOperationStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterOperationStatus other = - (com.google.cloud.dataproc.v1.ClusterOperationStatus) obj; - - if (state_ != other.state_) return false; - if (!getInnerState().equals(other.getInnerState())) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (hasStateStartTime() != other.hasStateStartTime()) return false; - if (hasStateStartTime()) { - if (!getStateStartTime().equals(other.getStateStartTime())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + INNER_STATE_FIELD_NUMBER; - hash = (53 * hash) + getInnerState().hashCode(); - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - if (hasStateStartTime()) { - hash = (37 * hash) + STATE_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStateStartTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus 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.dataproc.v1.ClusterOperationStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus parseFrom( - 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.dataproc.v1.ClusterOperationStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus 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.dataproc.v1.ClusterOperationStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus 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.dataproc.v1.ClusterOperationStatus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus 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.dataproc.v1.ClusterOperationStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 status of the operation.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterOperationStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterOperationStatus) - com.google.cloud.dataproc.v1.ClusterOperationStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterOperationStatus.class, - com.google.cloud.dataproc.v1.ClusterOperationStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterOperationStatus.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(); - state_ = 0; - - innerState_ = ""; - - details_ = ""; - - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.OperationsProto - .internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus build() { - com.google.cloud.dataproc.v1.ClusterOperationStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus buildPartial() { - com.google.cloud.dataproc.v1.ClusterOperationStatus result = - new com.google.cloud.dataproc.v1.ClusterOperationStatus(this); - result.state_ = state_; - result.innerState_ = innerState_; - result.details_ = details_; - if (stateStartTimeBuilder_ == null) { - result.stateStartTime_ = stateStartTime_; - } else { - result.stateStartTime_ = stateStartTimeBuilder_.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.dataproc.v1.ClusterOperationStatus) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterOperationStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterOperationStatus other) { - if (other == com.google.cloud.dataproc.v1.ClusterOperationStatus.getDefaultInstance()) - return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getInnerState().isEmpty()) { - innerState_ = other.innerState_; - onChanged(); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - onChanged(); - } - if (other.hasStateStartTime()) { - mergeStateStartTime(other.getStateStartTime()); - } - 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.dataproc.v1.ClusterOperationStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ClusterOperationStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterOperationStatus.State result = - com.google.cloud.dataproc.v1.ClusterOperationStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.ClusterOperationStatus.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.ClusterOperationStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object innerState_ = ""; - /** - * - * - *
-     * Output only. A message containing the detailed operation state.
-     * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The innerState. - */ - public java.lang.String getInnerState() { - java.lang.Object ref = innerState_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - innerState_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A message containing the detailed operation state.
-     * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for innerState. - */ - public com.google.protobuf.ByteString getInnerStateBytes() { - java.lang.Object ref = innerState_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - innerState_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A message containing the detailed operation state.
-     * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The innerState to set. - * @return This builder for chaining. - */ - public Builder setInnerState(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - innerState_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing the detailed operation state.
-     * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearInnerState() { - - innerState_ = getDefaultInstance().getInnerState(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing the detailed operation state.
-     * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for innerState to set. - * @return This builder for chaining. - */ - public Builder setInnerStateBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - innerState_ = value; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - * - * - *
-     * Output only. A message containing any operation metadata details.
-     * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A message containing any operation metadata details.
-     * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A message containing any operation metadata details.
-     * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - details_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing any operation metadata details.
-     * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - - details_ = getDefaultInstance().getDetails(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A message containing any operation metadata details.
-     * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - details_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp stateStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - stateStartTimeBuilder_; - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - public boolean hasStateStartTime() { - return stateStartTimeBuilder_ != null || stateStartTime_ != null; - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - public com.google.protobuf.Timestamp getStateStartTime() { - if (stateStartTimeBuilder_ == null) { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } else { - return stateStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateStartTime_ = value; - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = builderForValue.build(); - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (stateStartTime_ != null) { - stateStartTime_ = - com.google.protobuf.Timestamp.newBuilder(stateStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - stateStartTime_ = value; - } - onChanged(); - } else { - stateStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateStartTime() { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - onChanged(); - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStateStartTimeBuilder() { - - onChanged(); - return getStateStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - if (stateStartTimeBuilder_ != null) { - return stateStartTimeBuilder_.getMessageOrBuilder(); - } else { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - } - /** - * - * - *
-     * Output only. The time this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStateStartTimeFieldBuilder() { - if (stateStartTimeBuilder_ == null) { - stateStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStateStartTime(), getParentForChildren(), isClean()); - stateStartTime_ = null; - } - return stateStartTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.ClusterOperationStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterOperationStatus) - private static final com.google.cloud.dataproc.v1.ClusterOperationStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterOperationStatus(); - } - - public static com.google.cloud.dataproc.v1.ClusterOperationStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterOperationStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterOperationStatus(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.dataproc.v1.ClusterOperationStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatusOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatusOrBuilder.java deleted file mode 100644 index 5f2a78e0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatusOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterOperationStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterOperationStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperationStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.ClusterOperationStatus.State getState(); - - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The innerState. - */ - java.lang.String getInnerState(); - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for innerState. - */ - com.google.protobuf.ByteString getInnerStateBytes(); - - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for details. - */ - com.google.protobuf.ByteString getDetailsBytes(); - - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - boolean hasStateStartTime(); - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - com.google.protobuf.Timestamp getStateStartTime(); - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java deleted file mode 100644 index 88fb3d88..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.Cluster) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Google Cloud Platform project ID that the cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The Google Cloud Platform project ID that the cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name. Cluster names within a project must be
-   * unique. Names of deleted clusters can be reused.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - com.google.cloud.dataproc.v1.ClusterConfig getConfig(); - /** - * - * - *
-   * Optional. The cluster config for a cluster of Compute Engine Instances.
-   * Note that Dataproc may set default values, and values may change
-   * when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the virtualClusterConfig field is set. - */ - boolean hasVirtualClusterConfig(); - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The virtualClusterConfig. - */ - com.google.cloud.dataproc.v1.VirtualClusterConfig getVirtualClusterConfig(); - /** - * - * - *
-   * Optional. The virtual cluster config, used when creating a Dataproc cluster that
-   * does not directly control the underlying compute resources, for example,
-   * when creating a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * Note that Dataproc may set default values, and values may change when
-   * clusters are updated. Exactly one of config or virtualClusterConfig must be
-   * specified.
-   * 
- * - * - * .google.cloud.dataproc.v1.VirtualClusterConfig virtual_cluster_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder getVirtualClusterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a cluster.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1.ClusterStatus getStatus(); - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder getStatusHistoryOrBuilder(int index); - - /** - * - * - *
-   * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-   * generates this value when it creates the cluster.
-   * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Output only. A cluster UUID (Unique Universal Identifier). Dataproc
-   * generates this value when it creates the cluster.
-   * 
- * - * string cluster_uuid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the metrics field is set. - */ - boolean hasMetrics(); - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - com.google.cloud.dataproc.v1.ClusterMetrics getMetrics(); - /** - * - * - *
-   * Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
-   * **Beta Feature**: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterMetricsOrBuilder getMetricsOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelector.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelector.java deleted file mode 100644 index 5b8cd799..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelector.java +++ /dev/null @@ -1,1011 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A selector that chooses target cluster for jobs based on metadata.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterSelector} - */ -public final class ClusterSelector extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterSelector) - ClusterSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterSelector.newBuilder() to construct. - private ClusterSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterSelector() { - zone_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterSelector(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterSelector( - 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(); - - zone_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusterLabels_ = - com.google.protobuf.MapField.newMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry clusterLabels__ = - input.readMessage( - ClusterLabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusterLabels_ - .getMutableMap() - .put(clusterLabels__.getKey(), clusterLabels__.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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterSelector.class, - com.google.cloud.dataproc.v1.ClusterSelector.Builder.class); - } - - public static final int ZONE_FIELD_NUMBER = 1; - private volatile java.lang.Object zone_; - /** - * - * - *
-   * Optional. The zone where workflow process executes. This parameter does not
-   * affect the selection of the cluster.
-   * If unspecified, the zone of the first cluster matching the selector
-   * is used.
-   * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. The zone where workflow process executes. This parameter does not
-   * affect the selection of the cluster.
-   * If unspecified, the zone of the first cluster matching the selector
-   * is used.
-   * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 CLUSTER_LABELS_FIELD_NUMBER = 2; - - private static final class ClusterLabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField clusterLabels_; - - private com.google.protobuf.MapField - internalGetClusterLabels() { - if (clusterLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - } - return clusterLabels_; - } - - public int getClusterLabelsCount() { - return internalGetClusterLabels().getMap().size(); - } - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetClusterLabels().getMap().containsKey(key); - } - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getClusterLabels() { - return getClusterLabelsMap(); - } - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map getClusterLabelsMap() { - return internalGetClusterLabels().getMap(); - } - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetClusterLabels(), ClusterLabelsDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); - } - for (java.util.Map.Entry entry : - internalGetClusterLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry clusterLabels__ = - ClusterLabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, clusterLabels__); - } - 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.dataproc.v1.ClusterSelector)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterSelector other = - (com.google.cloud.dataproc.v1.ClusterSelector) obj; - - if (!getZone().equals(other.getZone())) return false; - if (!internalGetClusterLabels().equals(other.internalGetClusterLabels())) 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(); - if (!internalGetClusterLabels().getMap().isEmpty()) { - hash = (37 * hash) + CLUSTER_LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetClusterLabels().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterSelector parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector 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.dataproc.v1.ClusterSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector parseFrom( - 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.dataproc.v1.ClusterSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector 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.dataproc.v1.ClusterSelector parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector 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.dataproc.v1.ClusterSelector parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector 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.dataproc.v1.ClusterSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A selector that chooses target cluster for jobs based on metadata.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterSelector} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterSelector) - com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterSelector.class, - com.google.cloud.dataproc.v1.ClusterSelector.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterSelector.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_ = ""; - - internalGetMutableClusterLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelector getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelector build() { - com.google.cloud.dataproc.v1.ClusterSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelector buildPartial() { - com.google.cloud.dataproc.v1.ClusterSelector result = - new com.google.cloud.dataproc.v1.ClusterSelector(this); - int from_bitField0_ = bitField0_; - result.zone_ = zone_; - result.clusterLabels_ = internalGetClusterLabels(); - result.clusterLabels_.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.dataproc.v1.ClusterSelector) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterSelector) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterSelector other) { - if (other == com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance()) return this; - if (!other.getZone().isEmpty()) { - zone_ = other.zone_; - onChanged(); - } - internalGetMutableClusterLabels().mergeFrom(other.internalGetClusterLabels()); - 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.dataproc.v1.ClusterSelector parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ClusterSelector) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object zone_ = ""; - /** - * - * - *
-     * Optional. The zone where workflow process executes. This parameter does not
-     * affect the selection of the cluster.
-     * If unspecified, the zone of the first cluster matching the selector
-     * is used.
-     * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The zone where workflow process executes. This parameter does not
-     * affect the selection of the cluster.
-     * If unspecified, the zone of the first cluster matching the selector
-     * is used.
-     * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The zone where workflow process executes. This parameter does not
-     * affect the selection of the cluster.
-     * If unspecified, the zone of the first cluster matching the selector
-     * is used.
-     * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. The zone where workflow process executes. This parameter does not
-     * affect the selection of the cluster.
-     * If unspecified, the zone of the first cluster matching the selector
-     * is used.
-     * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearZone() { - - zone_ = getDefaultInstance().getZone(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The zone where workflow process executes. This parameter does not
-     * affect the selection of the cluster.
-     * If unspecified, the zone of the first cluster matching the selector
-     * is used.
-     * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 com.google.protobuf.MapField clusterLabels_; - - private com.google.protobuf.MapField - internalGetClusterLabels() { - if (clusterLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - } - return clusterLabels_; - } - - private com.google.protobuf.MapField - internalGetMutableClusterLabels() { - onChanged(); - ; - if (clusterLabels_ == null) { - clusterLabels_ = - com.google.protobuf.MapField.newMapField(ClusterLabelsDefaultEntryHolder.defaultEntry); - } - if (!clusterLabels_.isMutable()) { - clusterLabels_ = clusterLabels_.copy(); - } - return clusterLabels_; - } - - public int getClusterLabelsCount() { - return internalGetClusterLabels().getMap().size(); - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetClusterLabels().getMap().containsKey(key); - } - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getClusterLabels() { - return getClusterLabelsMap(); - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map getClusterLabelsMap() { - return internalGetClusterLabels().getMap(); - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearClusterLabels() { - internalGetMutableClusterLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableClusterLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableClusterLabels() { - return internalGetMutableClusterLabels().getMutableMap(); - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putClusterLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableClusterLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Required. The cluster labels. Cluster must have all labels
-     * to match.
-     * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putAllClusterLabels(java.util.Map values) { - internalGetMutableClusterLabels().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.dataproc.v1.ClusterSelector) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterSelector) - private static final com.google.cloud.dataproc.v1.ClusterSelector DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterSelector(); - } - - public static com.google.cloud.dataproc.v1.ClusterSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterSelector(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.dataproc.v1.ClusterSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelectorOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelectorOrBuilder.java deleted file mode 100644 index 27b47f2d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelectorOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterSelectorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterSelector) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The zone where workflow process executes. This parameter does not
-   * affect the selection of the cluster.
-   * If unspecified, the zone of the first cluster matching the selector
-   * is used.
-   * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The zone. - */ - java.lang.String getZone(); - /** - * - * - *
-   * Optional. The zone where workflow process executes. This parameter does not
-   * affect the selection of the cluster.
-   * If unspecified, the zone of the first cluster matching the selector
-   * is used.
-   * 
- * - * string zone = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for zone. - */ - com.google.protobuf.ByteString getZoneBytes(); - - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getClusterLabelsCount(); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - boolean containsClusterLabels(java.lang.String key); - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getClusterLabels(); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.Map getClusterLabelsMap(); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.lang.String getClusterLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.lang.String getClusterLabelsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatus.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatus.java deleted file mode 100644 index 5ba77c15..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatus.java +++ /dev/null @@ -1,1787 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The status of a cluster and its instances.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterStatus} - */ -public final class ClusterStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ClusterStatus) - ClusterStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClusterStatus.newBuilder() to construct. - private ClusterStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClusterStatus() { - state_ = 0; - detail_ = ""; - substate_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterStatus(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClusterStatus( - 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - detail_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (stateStartTime_ != null) { - subBuilder = stateStartTime_.toBuilder(); - } - stateStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateStartTime_); - stateStartTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - int rawValue = input.readEnum(); - - substate_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterStatus.class, - com.google.cloud.dataproc.v1.ClusterStatus.Builder.class); - } - - /** - * - * - *
-   * The cluster state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.ClusterStatus.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The cluster state is unknown.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * - * - *
-     * The cluster is being created and set up. It is not ready for use.
-     * 
- * - * CREATING = 1; - */ - CREATING(1), - /** - * - * - *
-     * The cluster is currently running and healthy. It is ready for use.
-     * **Note:** The cluster state changes from "creating" to "running" status
-     * after the master node(s), first two primary worker nodes (and the last
-     * primary worker node if primary workers > 2) are running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The cluster encountered an error. It is not ready for use.
-     * 
- * - * ERROR = 3; - */ - ERROR(3), - /** - * - * - *
-     * The cluster has encountered an error while being updated. Jobs can
-     * be submitted to the cluster, but the cluster cannot be updated.
-     * 
- * - * ERROR_DUE_TO_UPDATE = 9; - */ - ERROR_DUE_TO_UPDATE(9), - /** - * - * - *
-     * The cluster is being deleted. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - DELETING(4), - /** - * - * - *
-     * The cluster is being updated. It continues to accept and process jobs.
-     * 
- * - * UPDATING = 5; - */ - UPDATING(5), - /** - * - * - *
-     * The cluster is being stopped. It cannot be used.
-     * 
- * - * STOPPING = 6; - */ - STOPPING(6), - /** - * - * - *
-     * The cluster is currently stopped. It is not ready for use.
-     * 
- * - * STOPPED = 7; - */ - STOPPED(7), - /** - * - * - *
-     * The cluster is being started. It is not ready for use.
-     * 
- * - * STARTING = 8; - */ - STARTING(8), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The cluster state is unknown.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * - * - *
-     * The cluster is being created and set up. It is not ready for use.
-     * 
- * - * CREATING = 1; - */ - public static final int CREATING_VALUE = 1; - /** - * - * - *
-     * The cluster is currently running and healthy. It is ready for use.
-     * **Note:** The cluster state changes from "creating" to "running" status
-     * after the master node(s), first two primary worker nodes (and the last
-     * primary worker node if primary workers > 2) are running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The cluster encountered an error. It is not ready for use.
-     * 
- * - * ERROR = 3; - */ - public static final int ERROR_VALUE = 3; - /** - * - * - *
-     * The cluster has encountered an error while being updated. Jobs can
-     * be submitted to the cluster, but the cluster cannot be updated.
-     * 
- * - * ERROR_DUE_TO_UPDATE = 9; - */ - public static final int ERROR_DUE_TO_UPDATE_VALUE = 9; - /** - * - * - *
-     * The cluster is being deleted. It cannot be used.
-     * 
- * - * DELETING = 4; - */ - public static final int DELETING_VALUE = 4; - /** - * - * - *
-     * The cluster is being updated. It continues to accept and process jobs.
-     * 
- * - * UPDATING = 5; - */ - public static final int UPDATING_VALUE = 5; - /** - * - * - *
-     * The cluster is being stopped. It cannot be used.
-     * 
- * - * STOPPING = 6; - */ - public static final int STOPPING_VALUE = 6; - /** - * - * - *
-     * The cluster is currently stopped. It is not ready for use.
-     * 
- * - * STOPPED = 7; - */ - public static final int STOPPED_VALUE = 7; - /** - * - * - *
-     * The cluster is being started. It is not ready for use.
-     * 
- * - * STARTING = 8; - */ - public static final int STARTING_VALUE = 8; - - 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 UNKNOWN; - case 1: - return CREATING; - case 2: - return RUNNING; - case 3: - return ERROR; - case 9: - return ERROR_DUE_TO_UPDATE; - case 4: - return DELETING; - case 5: - return UPDATING; - case 6: - return STOPPING; - case 7: - return STOPPED; - case 8: - return STARTING; - 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.dataproc.v1.ClusterStatus.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.ClusterStatus.State) - } - - /** - * - * - *
-   * The cluster substate.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.ClusterStatus.Substate} - */ - public enum Substate implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The cluster substate is unknown.
-     * 
- * - * UNSPECIFIED = 0; - */ - UNSPECIFIED(0), - /** - * - * - *
-     * The cluster is known to be in an unhealthy state
-     * (for example, critical daemons are not running or HDFS capacity is
-     * exhausted).
-     * Applies to RUNNING state.
-     * 
- * - * UNHEALTHY = 1; - */ - UNHEALTHY(1), - /** - * - * - *
-     * The agent-reported status is out of date (may occur if
-     * Dataproc loses communication with Agent).
-     * Applies to RUNNING state.
-     * 
- * - * STALE_STATUS = 2; - */ - STALE_STATUS(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The cluster substate is unknown.
-     * 
- * - * UNSPECIFIED = 0; - */ - public static final int UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The cluster is known to be in an unhealthy state
-     * (for example, critical daemons are not running or HDFS capacity is
-     * exhausted).
-     * Applies to RUNNING state.
-     * 
- * - * UNHEALTHY = 1; - */ - public static final int UNHEALTHY_VALUE = 1; - /** - * - * - *
-     * The agent-reported status is out of date (may occur if
-     * Dataproc loses communication with Agent).
-     * Applies to RUNNING state.
-     * 
- * - * STALE_STATUS = 2; - */ - public static final int STALE_STATUS_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 Substate 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 Substate forNumber(int value) { - switch (value) { - case 0: - return UNSPECIFIED; - case 1: - return UNHEALTHY; - case 2: - return STALE_STATUS; - 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 Substate findValueByNumber(int number) { - return Substate.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.dataproc.v1.ClusterStatus.getDescriptor().getEnumTypes().get(1); - } - - private static final Substate[] VALUES = values(); - - public static Substate 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 Substate(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.ClusterStatus.Substate) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterStatus.State result = - com.google.cloud.dataproc.v1.ClusterStatus.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.ClusterStatus.State.UNRECOGNIZED : result; - } - - public static final int DETAIL_FIELD_NUMBER = 2; - private volatile java.lang.Object detail_; - /** - * - * - *
-   * Optional. Output only. Details of cluster's state.
-   * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The detail. - */ - @java.lang.Override - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detail_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Output only. Details of cluster's state.
-   * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for detail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_START_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp stateStartTime_; - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - @java.lang.Override - public boolean hasStateStartTime() { - return stateStartTime_ != null; - } - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStateStartTime() { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - return getStateStartTime(); - } - - public static final int SUBSTATE_FIELD_NUMBER = 4; - private int substate_; - /** - * - * - *
-   * Output only. Additional state information that includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - @java.lang.Override - public int getSubstateValue() { - return substate_; - } - /** - * - * - *
-   * Output only. Additional state information that includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterStatus.Substate result = - com.google.cloud.dataproc.v1.ClusterStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1.ClusterStatus.Substate.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 (state_ != com.google.cloud.dataproc.v1.ClusterStatus.State.UNKNOWN.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_); - } - if (stateStartTime_ != null) { - output.writeMessage(3, getStateStartTime()); - } - if (substate_ != com.google.cloud.dataproc.v1.ClusterStatus.Substate.UNSPECIFIED.getNumber()) { - output.writeEnum(4, substate_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.dataproc.v1.ClusterStatus.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_); - } - if (stateStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStateStartTime()); - } - if (substate_ != com.google.cloud.dataproc.v1.ClusterStatus.Substate.UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, substate_); - } - 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.dataproc.v1.ClusterStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ClusterStatus other = - (com.google.cloud.dataproc.v1.ClusterStatus) obj; - - if (state_ != other.state_) return false; - if (!getDetail().equals(other.getDetail())) return false; - if (hasStateStartTime() != other.hasStateStartTime()) return false; - if (hasStateStartTime()) { - if (!getStateStartTime().equals(other.getStateStartTime())) return false; - } - if (substate_ != other.substate_) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DETAIL_FIELD_NUMBER; - hash = (53 * hash) + getDetail().hashCode(); - if (hasStateStartTime()) { - hash = (37 * hash) + STATE_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStateStartTime().hashCode(); - } - hash = (37 * hash) + SUBSTATE_FIELD_NUMBER; - hash = (53 * hash) + substate_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ClusterStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus 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.dataproc.v1.ClusterStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus parseFrom( - 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.dataproc.v1.ClusterStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus 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.dataproc.v1.ClusterStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus 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.dataproc.v1.ClusterStatus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus 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.dataproc.v1.ClusterStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 status of a cluster and its instances.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ClusterStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ClusterStatus) - com.google.cloud.dataproc.v1.ClusterStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ClusterStatus.class, - com.google.cloud.dataproc.v1.ClusterStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ClusterStatus.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(); - state_ = 0; - - detail_ = ""; - - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - substate_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus build() { - com.google.cloud.dataproc.v1.ClusterStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus buildPartial() { - com.google.cloud.dataproc.v1.ClusterStatus result = - new com.google.cloud.dataproc.v1.ClusterStatus(this); - result.state_ = state_; - result.detail_ = detail_; - if (stateStartTimeBuilder_ == null) { - result.stateStartTime_ = stateStartTime_; - } else { - result.stateStartTime_ = stateStartTimeBuilder_.build(); - } - result.substate_ = substate_; - 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.dataproc.v1.ClusterStatus) { - return mergeFrom((com.google.cloud.dataproc.v1.ClusterStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ClusterStatus other) { - if (other == com.google.cloud.dataproc.v1.ClusterStatus.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getDetail().isEmpty()) { - detail_ = other.detail_; - onChanged(); - } - if (other.hasStateStartTime()) { - mergeStateStartTime(other.getStateStartTime()); - } - if (other.substate_ != 0) { - setSubstateValue(other.getSubstateValue()); - } - 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.dataproc.v1.ClusterStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ClusterStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterStatus.State result = - com.google.cloud.dataproc.v1.ClusterStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.ClusterStatus.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.ClusterStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object detail_ = ""; - /** - * - * - *
-     * Optional. Output only. Details of cluster's state.
-     * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The detail. - */ - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Output only. Details of cluster's state.
-     * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for detail. - */ - public com.google.protobuf.ByteString getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Output only. Details of cluster's state.
-     * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The detail to set. - * @return This builder for chaining. - */ - public Builder setDetail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - detail_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Output only. Details of cluster's state.
-     * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearDetail() { - - detail_ = getDefaultInstance().getDetail(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Output only. Details of cluster's state.
-     * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for detail to set. - * @return This builder for chaining. - */ - public Builder setDetailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - detail_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp stateStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - stateStartTimeBuilder_; - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - public boolean hasStateStartTime() { - return stateStartTimeBuilder_ != null || stateStartTime_ != null; - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - public com.google.protobuf.Timestamp getStateStartTime() { - if (stateStartTimeBuilder_ == null) { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } else { - return stateStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateStartTime_ = value; - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = builderForValue.build(); - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (stateStartTime_ != null) { - stateStartTime_ = - com.google.protobuf.Timestamp.newBuilder(stateStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - stateStartTime_ = value; - } - onChanged(); - } else { - stateStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateStartTime() { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - onChanged(); - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStateStartTimeBuilder() { - - onChanged(); - return getStateStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - if (stateStartTimeBuilder_ != null) { - return stateStartTimeBuilder_.getMessageOrBuilder(); - } else { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - } - /** - * - * - *
-     * Output only. Time when this state was entered (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStateStartTimeFieldBuilder() { - if (stateStartTimeBuilder_ == null) { - stateStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStateStartTime(), getParentForChildren(), isClean()); - stateStartTime_ = null; - } - return stateStartTimeBuilder_; - } - - private int substate_ = 0; - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - @java.lang.Override - public int getSubstateValue() { - return substate_; - } - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for substate to set. - * @return This builder for chaining. - */ - public Builder setSubstateValue(int value) { - - substate_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ClusterStatus.Substate result = - com.google.cloud.dataproc.v1.ClusterStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1.ClusterStatus.Substate.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The substate to set. - * @return This builder for chaining. - */ - public Builder setSubstate(com.google.cloud.dataproc.v1.ClusterStatus.Substate value) { - if (value == null) { - throw new NullPointerException(); - } - - substate_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearSubstate() { - - substate_ = 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.dataproc.v1.ClusterStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ClusterStatus) - private static final com.google.cloud.dataproc.v1.ClusterStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ClusterStatus(); - } - - public static com.google.cloud.dataproc.v1.ClusterStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClusterStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterStatus(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.dataproc.v1.ClusterStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatusOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatusOrBuilder.java deleted file mode 100644 index 9abedcb6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatusOrBuilder.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ClusterStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ClusterStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.ClusterStatus.State getState(); - - /** - * - * - *
-   * Optional. Output only. Details of cluster's state.
-   * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The detail. - */ - java.lang.String getDetail(); - /** - * - * - *
-   * Optional. Output only. Details of cluster's state.
-   * 
- * - * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for detail. - */ - com.google.protobuf.ByteString getDetailBytes(); - - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - boolean hasStateStartTime(); - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - com.google.protobuf.Timestamp getStateStartTime(); - /** - * - * - *
-   * Output only. Time when this state was entered (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Additional state information that includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - int getSubstateValue(); - /** - * - * - *
-   * Output only. Additional state information that includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - com.google.cloud.dataproc.v1.ClusterStatus.Substate getSubstate(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java deleted file mode 100644 index 17f1cf5a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java +++ /dev/null @@ -1,934 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public final class ClustersProto { - private ClustersProto() {} - - 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_dataproc_v1_Cluster_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_EndpointConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_AutoscalingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_EncryptionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GceClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_AcceleratorConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DiskConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SecurityConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_KerberosConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_IdentityConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SoftwareConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_MetastoreConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_CreateClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_StopClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_StartClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GetClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListClustersRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListClustersResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ReservationAffinity_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/dataproc/v1/clusters.prot" - + "o\022\030google.cloud.dataproc.v1\032\034google/api/" - + "annotations.proto\032\027google/api/client.pro" - + "to\032\037google/api/field_behavior.proto\032\031goo" - + "gle/api/resource.proto\032%google/cloud/dat" - + "aproc/v1/shared.proto\032#google/longrunnin" - + "g/operations.proto\032\036google/protobuf/dura" - + "tion.proto\032 google/protobuf/field_mask.p" - + "roto\032\037google/protobuf/timestamp.proto\"\242\004" - + "\n\007Cluster\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\031\n\014cl" - + "uster_name\030\002 \001(\tB\003\340A\002\022<\n\006config\030\003 \001(\0132\'." - + "google.cloud.dataproc.v1.ClusterConfigB\003" - + "\340A\001\022S\n\026virtual_cluster_config\030\n \001(\0132..go" - + "ogle.cloud.dataproc.v1.VirtualClusterCon" - + "figB\003\340A\001\022B\n\006labels\030\010 \003(\0132-.google.cloud." - + "dataproc.v1.Cluster.LabelsEntryB\003\340A\001\022<\n\006" - + "status\030\004 \001(\0132\'.google.cloud.dataproc.v1." - + "ClusterStatusB\003\340A\003\022D\n\016status_history\030\007 \003" - + "(\0132\'.google.cloud.dataproc.v1.ClusterSta" - + "tusB\003\340A\003\022\031\n\014cluster_uuid\030\006 \001(\tB\003\340A\003\022>\n\007m" - + "etrics\030\t \001(\0132(.google.cloud.dataproc.v1." - + "ClusterMetricsB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\334\007\n\rClusterCo" - + "nfig\022\032\n\rconfig_bucket\030\001 \001(\tB\003\340A\001\022\030\n\013temp" - + "_bucket\030\002 \001(\tB\003\340A\001\022K\n\022gce_cluster_config" - + "\030\010 \001(\0132*.google.cloud.dataproc.v1.GceClu" - + "sterConfigB\003\340A\001\022I\n\rmaster_config\030\t \001(\0132-" - + ".google.cloud.dataproc.v1.InstanceGroupC" - + "onfigB\003\340A\001\022I\n\rworker_config\030\n \001(\0132-.goog" - + "le.cloud.dataproc.v1.InstanceGroupConfig" - + "B\003\340A\001\022S\n\027secondary_worker_config\030\014 \001(\0132-" - + ".google.cloud.dataproc.v1.InstanceGroupC" - + "onfigB\003\340A\001\022F\n\017software_config\030\r \001(\0132(.go" - + "ogle.cloud.dataproc.v1.SoftwareConfigB\003\340" - + "A\001\022W\n\026initialization_actions\030\013 \003(\01322.goo" - + "gle.cloud.dataproc.v1.NodeInitialization" - + "ActionB\003\340A\001\022J\n\021encryption_config\030\017 \001(\0132*" - + ".google.cloud.dataproc.v1.EncryptionConf" - + "igB\003\340A\001\022L\n\022autoscaling_config\030\022 \001(\0132+.go" - + "ogle.cloud.dataproc.v1.AutoscalingConfig" - + "B\003\340A\001\022F\n\017security_config\030\020 \001(\0132(.google." - + "cloud.dataproc.v1.SecurityConfigB\003\340A\001\022H\n" - + "\020lifecycle_config\030\021 \001(\0132).google.cloud.d" - + "ataproc.v1.LifecycleConfigB\003\340A\001\022F\n\017endpo" - + "int_config\030\023 \001(\0132(.google.cloud.dataproc" - + ".v1.EndpointConfigB\003\340A\001\022H\n\020metastore_con" - + "fig\030\024 \001(\0132).google.cloud.dataproc.v1.Met" - + "astoreConfigB\003\340A\001\"\236\002\n\024VirtualClusterConf" - + "ig\022\033\n\016staging_bucket\030\001 \001(\tB\003\340A\001\022\030\n\013temp_" - + "bucket\030\002 \001(\tB\003\340A\001\022[\n\031kubernetes_cluster_" - + "config\030\006 \001(\01321.google.cloud.dataproc.v1." - + "KubernetesClusterConfigB\003\340A\002H\000\022Y\n\031auxili" - + "ary_services_config\030\007 \001(\01321.google.cloud" - + ".dataproc.v1.AuxiliaryServicesConfigB\003\340A" - + "\001B\027\n\025infrastructure_config\"\301\001\n\027Auxiliary" - + "ServicesConfig\022H\n\020metastore_config\030\001 \001(\013" - + "2).google.cloud.dataproc.v1.MetastoreCon" - + "figB\003\340A\001\022\\\n\033spark_history_server_config\030" - + "\002 \001(\01322.google.cloud.dataproc.v1.SparkHi" - + "storyServerConfigB\003\340A\001\"\272\001\n\016EndpointConfi" - + "g\022P\n\nhttp_ports\030\001 \003(\01327.google.cloud.dat" - + "aproc.v1.EndpointConfig.HttpPortsEntryB\003" - + "\340A\003\022$\n\027enable_http_port_access\030\002 \001(\010B\003\340A" - + "\001\0320\n\016HttpPortsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\",\n\021AutoscalingConfig\022\027\n\npoli" - + "cy_uri\030\001 \001(\tB\003\340A\001\"4\n\020EncryptionConfig\022 \n" - + "\023gce_pd_kms_key_name\030\001 \001(\tB\003\340A\001\"\233\007\n\020GceC" - + "lusterConfig\022\025\n\010zone_uri\030\001 \001(\tB\003\340A\001\022\030\n\013n" - + "etwork_uri\030\002 \001(\tB\003\340A\001\022\033\n\016subnetwork_uri\030" - + "\006 \001(\tB\003\340A\001\022\035\n\020internal_ip_only\030\007 \001(\010B\003\340A" - + "\001\022k\n\032private_ipv6_google_access\030\014 \001(\0162B." - + "google.cloud.dataproc.v1.GceClusterConfi" - + "g.PrivateIpv6GoogleAccessB\003\340A\001\022\034\n\017servic" - + "e_account\030\010 \001(\tB\003\340A\001\022#\n\026service_account_" - + "scopes\030\003 \003(\tB\003\340A\001\022\014\n\004tags\030\004 \003(\t\022J\n\010metad" - + "ata\030\005 \003(\01328.google.cloud.dataproc.v1.Gce" - + "ClusterConfig.MetadataEntry\022P\n\024reservati" - + "on_affinity\030\013 \001(\0132-.google.cloud.datapro" - + "c.v1.ReservationAffinityB\003\340A\001\022M\n\023node_gr" - + "oup_affinity\030\r \001(\0132+.google.cloud.datapr" - + "oc.v1.NodeGroupAffinityB\003\340A\001\022W\n\030shielded" - + "_instance_config\030\016 \001(\01320.google.cloud.da" - + "taproc.v1.ShieldedInstanceConfigB\003\340A\001\022_\n" - + "\034confidential_instance_config\030\017 \001(\01324.go" - + "ogle.cloud.dataproc.v1.ConfidentialInsta" - + "nceConfigB\003\340A\001\032/\n\rMetadataEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\203\001\n\027PrivateIpv6G" - + "oogleAccess\022*\n&PRIVATE_IPV6_GOOGLE_ACCES" - + "S_UNSPECIFIED\020\000\022\033\n\027INHERIT_FROM_SUBNETWO" - + "RK\020\001\022\014\n\010OUTBOUND\020\002\022\021\n\rBIDIRECTIONAL\020\003\"0\n" - + "\021NodeGroupAffinity\022\033\n\016node_group_uri\030\001 \001" - + "(\tB\003\340A\002\"}\n\026ShieldedInstanceConfig\022\037\n\022ena" - + "ble_secure_boot\030\001 \001(\010B\003\340A\001\022\030\n\013enable_vtp" - + "m\030\002 \001(\010B\003\340A\001\022(\n\033enable_integrity_monitor" - + "ing\030\003 \001(\010B\003\340A\001\"F\n\032ConfidentialInstanceCo" - + "nfig\022(\n\033enable_confidential_compute\030\001 \001(" - + "\010B\003\340A\001\"\315\004\n\023InstanceGroupConfig\022\032\n\rnum_in" - + "stances\030\001 \001(\005B\003\340A\001\022\033\n\016instance_names\030\002 \003" - + "(\tB\003\340A\003\022\026\n\timage_uri\030\003 \001(\tB\003\340A\001\022\035\n\020machi" - + "ne_type_uri\030\004 \001(\tB\003\340A\001\022>\n\013disk_config\030\005 " - + "\001(\0132$.google.cloud.dataproc.v1.DiskConfi" - + "gB\003\340A\001\022\033\n\016is_preemptible\030\006 \001(\010B\003\340A\003\022Y\n\016p" - + "reemptibility\030\n \001(\0162<.google.cloud.datap" - + "roc.v1.InstanceGroupConfig.Preemptibilit" - + "yB\003\340A\001\022O\n\024managed_group_config\030\007 \001(\0132,.g" - + "oogle.cloud.dataproc.v1.ManagedGroupConf" - + "igB\003\340A\003\022F\n\014accelerators\030\010 \003(\0132+.google.c" - + "loud.dataproc.v1.AcceleratorConfigB\003\340A\001\022" - + "\035\n\020min_cpu_platform\030\t \001(\tB\003\340A\001\"V\n\016Preemp" - + "tibility\022\036\n\032PREEMPTIBILITY_UNSPECIFIED\020\000" - + "\022\023\n\017NON_PREEMPTIBLE\020\001\022\017\n\013PREEMPTIBLE\020\002\"c" - + "\n\022ManagedGroupConfig\022#\n\026instance_templat" - + "e_name\030\001 \001(\tB\003\340A\003\022(\n\033instance_group_mana" - + "ger_name\030\002 \001(\tB\003\340A\003\"L\n\021AcceleratorConfig" - + "\022\034\n\024accelerator_type_uri\030\001 \001(\t\022\031\n\021accele" - + "rator_count\030\002 \001(\005\"\210\001\n\nDiskConfig\022\033\n\016boot" - + "_disk_type\030\003 \001(\tB\003\340A\001\022\036\n\021boot_disk_size_" - + "gb\030\001 \001(\005B\003\340A\001\022\033\n\016num_local_ssds\030\002 \001(\005B\003\340" - + "A\001\022 \n\023local_ssd_interface\030\004 \001(\tB\003\340A\001\"s\n\030" - + "NodeInitializationAction\022\034\n\017executable_f" - + "ile\030\001 \001(\tB\003\340A\002\0229\n\021execution_timeout\030\002 \001(" - + "\0132\031.google.protobuf.DurationB\003\340A\001\"\307\003\n\rCl" - + "usterStatus\022A\n\005state\030\001 \001(\0162-.google.clou" - + "d.dataproc.v1.ClusterStatus.StateB\003\340A\003\022\026" - + "\n\006detail\030\002 \001(\tB\006\340A\003\340A\001\0229\n\020state_start_ti" - + "me\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022G\n\010substate\030\004 \001(\01620.google.cloud.datap" - + "roc.v1.ClusterStatus.SubstateB\003\340A\003\"\230\001\n\005S" - + "tate\022\013\n\007UNKNOWN\020\000\022\014\n\010CREATING\020\001\022\013\n\007RUNNI" - + "NG\020\002\022\t\n\005ERROR\020\003\022\027\n\023ERROR_DUE_TO_UPDATE\020\t" - + "\022\014\n\010DELETING\020\004\022\014\n\010UPDATING\020\005\022\014\n\010STOPPING" - + "\020\006\022\013\n\007STOPPED\020\007\022\014\n\010STARTING\020\010\"<\n\010Substat" - + "e\022\017\n\013UNSPECIFIED\020\000\022\r\n\tUNHEALTHY\020\001\022\020\n\014STA" - + "LE_STATUS\020\002\"\240\001\n\016SecurityConfig\022F\n\017kerber" - + "os_config\030\001 \001(\0132(.google.cloud.dataproc." - + "v1.KerberosConfigB\003\340A\001\022F\n\017identity_confi" - + "g\030\002 \001(\0132(.google.cloud.dataproc.v1.Ident" - + "ityConfigB\003\340A\001\"\220\004\n\016KerberosConfig\022\034\n\017ena" - + "ble_kerberos\030\001 \001(\010B\003\340A\001\022(\n\033root_principa" - + "l_password_uri\030\002 \001(\tB\003\340A\001\022\030\n\013kms_key_uri" - + "\030\003 \001(\tB\003\340A\001\022\031\n\014keystore_uri\030\004 \001(\tB\003\340A\001\022\033" - + "\n\016truststore_uri\030\005 \001(\tB\003\340A\001\022\"\n\025keystore_" - + "password_uri\030\006 \001(\tB\003\340A\001\022\035\n\020key_password_" - + "uri\030\007 \001(\tB\003\340A\001\022$\n\027truststore_password_ur" - + "i\030\010 \001(\tB\003\340A\001\022$\n\027cross_realm_trust_realm\030" - + "\t \001(\tB\003\340A\001\022\"\n\025cross_realm_trust_kdc\030\n \001(" - + "\tB\003\340A\001\022+\n\036cross_realm_trust_admin_server" - + "\030\013 \001(\tB\003\340A\001\0222\n%cross_realm_trust_shared_" - + "password_uri\030\014 \001(\tB\003\340A\001\022\033\n\016kdc_db_key_ur" - + "i\030\r \001(\tB\003\340A\001\022\037\n\022tgt_lifetime_hours\030\016 \001(\005" - + "B\003\340A\001\022\022\n\005realm\030\017 \001(\tB\003\340A\001\"\306\001\n\016IdentityCo" - + "nfig\022r\n\034user_service_account_mapping\030\001 \003" - + "(\0132G.google.cloud.dataproc.v1.IdentityCo" - + "nfig.UserServiceAccountMappingEntryB\003\340A\002" - + "\032@\n\036UserServiceAccountMappingEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\371\001\n\016SoftwareC" - + "onfig\022\032\n\rimage_version\030\001 \001(\tB\003\340A\001\022Q\n\npro" - + "perties\030\002 \003(\01328.google.cloud.dataproc.v1" - + ".SoftwareConfig.PropertiesEntryB\003\340A\001\022E\n\023" - + "optional_components\030\003 \003(\0162#.google.cloud" - + ".dataproc.v1.ComponentB\003\340A\001\0321\n\017Propertie" - + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\203" - + "\002\n\017LifecycleConfig\0227\n\017idle_delete_ttl\030\001 " - + "\001(\0132\031.google.protobuf.DurationB\003\340A\001\022;\n\020a" - + "uto_delete_time\030\002 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\001H\000\0229\n\017auto_delete_ttl\030\003 \001(" - + "\0132\031.google.protobuf.DurationB\003\340A\001H\000\0228\n\017i" - + "dle_start_time\030\004 \001(\0132\032.google.protobuf.T" - + "imestampB\003\340A\003B\005\n\003ttl\"_\n\017MetastoreConfig\022" - + "L\n\032dataproc_metastore_service\030\001 \001(\tB(\340A\002" - + "\372A\"\n metastore.googleapis.com/Service\"\232\002" - + "\n\016ClusterMetrics\022O\n\014hdfs_metrics\030\001 \003(\01329" - + ".google.cloud.dataproc.v1.ClusterMetrics" - + ".HdfsMetricsEntry\022O\n\014yarn_metrics\030\002 \003(\0132" - + "9.google.cloud.dataproc.v1.ClusterMetric" - + "s.YarnMetricsEntry\0322\n\020HdfsMetricsEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\0322\n\020YarnMe" - + "tricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\002" - + "8\001\"\356\001\n\024CreateClusterRequest\022\027\n\nproject_i" - + "d\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\0227\n\007clu" - + "ster\030\002 \001(\0132!.google.cloud.dataproc.v1.Cl" - + "usterB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\022V\n a" - + "ction_on_failed_primary_workers\030\005 \001(\0162\'." - + "google.cloud.dataproc.v1.FailureActionB\003" - + "\340A\001\"\256\002\n\024UpdateClusterRequest\022\027\n\nproject_" - + "id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\005 \001(\tB\003\340A\002\022\031\n\014cl" - + "uster_name\030\002 \001(\tB\003\340A\002\0227\n\007cluster\030\003 \001(\0132!" - + ".google.cloud.dataproc.v1.ClusterB\003\340A\002\022E" - + "\n\035graceful_decommission_timeout\030\006 \001(\0132\031." - + "google.protobuf.DurationB\003\340A\001\0224\n\013update_" - + "mask\030\004 \001(\0132\032.google.protobuf.FieldMaskB\003" - + "\340A\002\022\027\n\nrequest_id\030\007 \001(\tB\003\340A\001\"\221\001\n\022StopClu" - + "sterRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006" - + "region\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\003 \001(\tB" - + "\003\340A\002\022\031\n\014cluster_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nreque" - + "st_id\030\005 \001(\tB\003\340A\001\"\222\001\n\023StartClusterRequest" - + "\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\002 \001(" - + "\tB\003\340A\002\022\031\n\014cluster_name\030\003 \001(\tB\003\340A\002\022\031\n\014clu" - + "ster_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\005 \001(\t" - + "B\003\340A\001\"\223\001\n\024DeleteClusterRequest\022\027\n\nprojec" - + "t_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\031\n\014" - + "cluster_name\030\002 \001(\tB\003\340A\002\022\031\n\014cluster_uuid\030" - + "\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\005 \001(\tB\003\340A\001\"\\\n\021G" - + "etClusterRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A" - + "\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002" - + " \001(\tB\003\340A\002\"\211\001\n\023ListClustersRequest\022\027\n\npro" - + "ject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\004 \001(\tB\003\340A\002\022" - + "\023\n\006filter\030\005 \001(\tB\003\340A\001\022\026\n\tpage_size\030\002 \001(\005B" - + "\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"n\n\024ListClu" - + "stersResponse\0228\n\010clusters\030\001 \003(\0132!.google" - + ".cloud.dataproc.v1.ClusterB\003\340A\003\022\034\n\017next_" - + "page_token\030\002 \001(\tB\003\340A\003\"a\n\026DiagnoseCluster" - + "Request\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006regi" - + "on\030\003 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002" - + "\"1\n\026DiagnoseClusterResults\022\027\n\noutput_uri" - + "\030\001 \001(\tB\003\340A\003\"\370\001\n\023ReservationAffinity\022Y\n\030c" - + "onsume_reservation_type\030\001 \001(\01622.google.c" - + "loud.dataproc.v1.ReservationAffinity.Typ" - + "eB\003\340A\001\022\020\n\003key\030\002 \001(\tB\003\340A\001\022\023\n\006values\030\003 \003(\t" - + "B\003\340A\001\"_\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016N" - + "O_RESERVATION\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024" - + "SPECIFIC_RESERVATION\020\0032\344\020\n\021ClusterContro" - + "ller\022\200\002\n\rCreateCluster\022..google.cloud.da" - + "taproc.v1.CreateClusterRequest\032\035.google." - + "longrunning.Operation\"\237\001\202\323\344\223\002>\"3/v1/proj" - + "ects/{project_id}/regions/{region}/clust" - + "ers:\007cluster\332A\031project_id,region,cluster" - + "\312A<\n\007Cluster\0221google.cloud.dataproc.v1.C" - + "lusterOperationMetadata\022\250\002\n\rUpdateCluste" - + "r\022..google.cloud.dataproc.v1.UpdateClust" - + "erRequest\032\035.google.longrunning.Operation" - + "\"\307\001\202\323\344\223\002M2B/v1/projects/{project_id}/reg" - + "ions/{region}/clusters/{cluster_name}:\007c" - + "luster\332A2project_id,region,cluster_name," - + "cluster,update_mask\312A<\n\007Cluster\0221google." - + "cloud.dataproc.v1.ClusterOperationMetada" - + "ta\022\356\001\n\013StopCluster\022,.google.cloud.datapr" - + "oc.v1.StopClusterRequest\032\035.google.longru" - + "nning.Operation\"\221\001\202\323\344\223\002L\"G/v1/projects/{" - + "project_id}/regions/{region}/clusters/{c" - + "luster_name}:stop:\001*\312A<\n\007Cluster\0221google" - + ".cloud.dataproc.v1.ClusterOperationMetad" - + "ata\022\361\001\n\014StartCluster\022-.google.cloud.data" - + "proc.v1.StartClusterRequest\032\035.google.lon" - + "grunning.Operation\"\222\001\202\323\344\223\002M\"H/v1/project" - + "s/{project_id}/regions/{region}/clusters" - + "/{cluster_name}:start:\001*\312A<\n\007Cluster\0221go" - + "ogle.cloud.dataproc.v1.ClusterOperationM" - + "etadata\022\231\002\n\rDeleteCluster\022..google.cloud" - + ".dataproc.v1.DeleteClusterRequest\032\035.goog" - + "le.longrunning.Operation\"\270\001\202\323\344\223\002D*B/v1/p" - + "rojects/{project_id}/regions/{region}/cl" - + "usters/{cluster_name}\332A\036project_id,regio" - + "n,cluster_name\312AJ\n\025google.protobuf.Empty" - + "\0221google.cloud.dataproc.v1.ClusterOperat" - + "ionMetadata\022\311\001\n\nGetCluster\022+.google.clou" - + "d.dataproc.v1.GetClusterRequest\032!.google" - + ".cloud.dataproc.v1.Cluster\"k\202\323\344\223\002D\022B/v1/" - + "projects/{project_id}/regions/{region}/c" - + "lusters/{cluster_name}\332A\036project_id,regi" - + "on,cluster_name\022\331\001\n\014ListClusters\022-.googl" - + "e.cloud.dataproc.v1.ListClustersRequest\032" - + "..google.cloud.dataproc.v1.ListClustersR" - + "esponse\"j\202\323\344\223\0025\0223/v1/projects/{project_i" - + "d}/regions/{region}/clusters\332A\021project_i" - + "d,region\332A\030project_id,region,filter\022\252\002\n\017" - + "DiagnoseCluster\0220.google.cloud.dataproc." - + "v1.DiagnoseClusterRequest\032\035.google.longr" - + "unning.Operation\"\305\001\202\323\344\223\002P\"K/v1/projects/" - + "{project_id}/regions/{region}/clusters/{" - + "cluster_name}:diagnose:\001*\332A\036project_id,r" - + "egion,cluster_name\312AK\n\026DiagnoseClusterRe" - + "sults\0221google.cloud.dataproc.v1.ClusterO" - + "perationMetadata\032K\312A\027dataproc.googleapis" - + ".com\322A.https://www.googleapis.com/auth/c" - + "loud-platformB\263\002\n\034com.google.cloud.datap" - + "roc.v1B\rClustersProtoP\001Z@google.golang.o" - + "rg/genproto/googleapis/cloud/dataproc/v1" - + ";dataproc\352A^\n container.googleapis.com/C" - + "luster\022:projects/{project}/locations/{lo" - + "cation}/clusters/{cluster}\352A^\n metastore" - + ".googleapis.com/Service\022:projects/{proje" - + "ct}/locations/{location}/services/{servi" - + "ce}b\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.cloud.dataproc.v1.SharedProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_Cluster_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_Cluster_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Cluster_descriptor, - new java.lang.String[] { - "ProjectId", - "ClusterName", - "Config", - "VirtualClusterConfig", - "Labels", - "Status", - "StatusHistory", - "ClusterUuid", - "Metrics", - }); - internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_Cluster_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Cluster_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_ClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterConfig_descriptor, - new java.lang.String[] { - "ConfigBucket", - "TempBucket", - "GceClusterConfig", - "MasterConfig", - "WorkerConfig", - "SecondaryWorkerConfig", - "SoftwareConfig", - "InitializationActions", - "EncryptionConfig", - "AutoscalingConfig", - "SecurityConfig", - "LifecycleConfig", - "EndpointConfig", - "MetastoreConfig", - }); - internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor, - new java.lang.String[] { - "StagingBucket", - "TempBucket", - "KubernetesClusterConfig", - "AuxiliaryServicesConfig", - "InfrastructureConfig", - }); - internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_AuxiliaryServicesConfig_descriptor, - new java.lang.String[] { - "MetastoreConfig", "SparkHistoryServerConfig", - }); - internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1_EndpointConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor, - new java.lang.String[] { - "HttpPorts", "EnableHttpPortAccess", - }); - internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1_AutoscalingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_AutoscalingConfig_descriptor, - new java.lang.String[] { - "PolicyUri", - }); - internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1_EncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor, - new java.lang.String[] { - "GcePdKmsKeyName", - }); - internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1_GceClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor, - new java.lang.String[] { - "ZoneUri", - "NetworkUri", - "SubnetworkUri", - "InternalIpOnly", - "PrivateIpv6GoogleAccess", - "ServiceAccount", - "ServiceAccountScopes", - "Tags", - "Metadata", - "ReservationAffinity", - "NodeGroupAffinity", - "ShieldedInstanceConfig", - "ConfidentialInstanceConfig", - }); - internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_descriptor = - internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor, - new java.lang.String[] { - "NodeGroupUri", - }); - internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor, - new java.lang.String[] { - "EnableSecureBoot", "EnableVtpm", "EnableIntegrityMonitoring", - }); - internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor, - new java.lang.String[] { - "EnableConfidentialCompute", - }); - internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor, - new java.lang.String[] { - "NumInstances", - "InstanceNames", - "ImageUri", - "MachineTypeUri", - "DiskConfig", - "IsPreemptible", - "Preemptibility", - "ManagedGroupConfig", - "Accelerators", - "MinCpuPlatform", - }); - internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor, - new java.lang.String[] { - "InstanceTemplateName", "InstanceGroupManagerName", - }); - internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1_AcceleratorConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_AcceleratorConfig_descriptor, - new java.lang.String[] { - "AcceleratorTypeUri", "AcceleratorCount", - }); - internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1_DiskConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor, - new java.lang.String[] { - "BootDiskType", "BootDiskSizeGb", "NumLocalSsds", "LocalSsdInterface", - }); - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor, - new java.lang.String[] { - "ExecutableFile", "ExecutionTimeout", - }); - internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1_ClusterStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterStatus_descriptor, - new java.lang.String[] { - "State", "Detail", "StateStartTime", "Substate", - }); - internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1_SecurityConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor, - new java.lang.String[] { - "KerberosConfig", "IdentityConfig", - }); - internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1_KerberosConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor, - new java.lang.String[] { - "EnableKerberos", - "RootPrincipalPasswordUri", - "KmsKeyUri", - "KeystoreUri", - "TruststoreUri", - "KeystorePasswordUri", - "KeyPasswordUri", - "TruststorePasswordUri", - "CrossRealmTrustRealm", - "CrossRealmTrustKdc", - "CrossRealmTrustAdminServer", - "CrossRealmTrustSharedPasswordUri", - "KdcDbKeyUri", - "TgtLifetimeHours", - "Realm", - }); - internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1_IdentityConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor, - new java.lang.String[] { - "UserServiceAccountMapping", - }); - internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_descriptor = - internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1_SoftwareConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor, - new java.lang.String[] { - "ImageVersion", "Properties", "OptionalComponents", - }); - internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor, - new java.lang.String[] { - "IdleDeleteTtl", "AutoDeleteTime", "AutoDeleteTtl", "IdleStartTime", "Ttl", - }); - internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_dataproc_v1_MetastoreConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor, - new java.lang.String[] { - "DataprocMetastoreService", - }); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor, - new java.lang.String[] { - "HdfsMetrics", "YarnMetrics", - }); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterMetrics_HdfsMetricsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_ClusterMetrics_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterMetrics_YarnMetricsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_dataproc_v1_CreateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Cluster", "RequestId", "ActionOnFailedPrimaryWorkers", - }); - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", - "Region", - "ClusterName", - "Cluster", - "GracefulDecommissionTimeout", - "UpdateMask", - "RequestId", - }); - internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_dataproc_v1_StopClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_dataproc_v1_StartClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_dataproc_v1_GetClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", - }); - internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_dataproc_v1_ListClustersRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_dataproc_v1_ListClustersResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor, - new java.lang.String[] { - "Clusters", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", - }); - internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor, - new java.lang.String[] { - "OutputUri", - }); - internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_cloud_dataproc_v1_ReservationAffinity_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor, - new java.lang.String[] { - "ConsumeReservationType", "Key", "Values", - }); - 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.resourceDefinition); - 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.cloud.dataproc.v1.SharedProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Component.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Component.java deleted file mode 100644 index 95757b56..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Component.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Cluster components that can be activated.
- * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.Component} - */ -public enum Component implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Unspecified component. Specifying this will cause Cluster creation to fail.
-   * 
- * - * COMPONENT_UNSPECIFIED = 0; - */ - COMPONENT_UNSPECIFIED(0), - /** - * - * - *
-   * The Anaconda python distribution. The Anaconda component is not supported
-   * in the Dataproc
-   * <a
-   * href="/dataproc/docs/concepts/versioning/dataproc-release-2.0">2.0
-   * image</a>. The 2.0 image is pre-installed with Miniconda.
-   * 
- * - * ANACONDA = 5; - */ - ANACONDA(5), - /** - * - * - *
-   * Docker
-   * 
- * - * DOCKER = 13; - */ - DOCKER(13), - /** - * - * - *
-   * The Druid query engine. (alpha)
-   * 
- * - * DRUID = 9; - */ - DRUID(9), - /** - * - * - *
-   * Flink
-   * 
- * - * FLINK = 14; - */ - FLINK(14), - /** - * - * - *
-   * HBase. (beta)
-   * 
- * - * HBASE = 11; - */ - HBASE(11), - /** - * - * - *
-   * The Hive Web HCatalog (the REST service for accessing HCatalog).
-   * 
- * - * HIVE_WEBHCAT = 3; - */ - HIVE_WEBHCAT(3), - /** - * - * - *
-   * The Jupyter Notebook.
-   * 
- * - * JUPYTER = 1; - */ - JUPYTER(1), - /** - * - * - *
-   * The Presto query engine.
-   * 
- * - * PRESTO = 6; - */ - PRESTO(6), - /** - * - * - *
-   * The Ranger service.
-   * 
- * - * RANGER = 12; - */ - RANGER(12), - /** - * - * - *
-   * The Solr service.
-   * 
- * - * SOLR = 10; - */ - SOLR(10), - /** - * - * - *
-   * The Zeppelin notebook.
-   * 
- * - * ZEPPELIN = 4; - */ - ZEPPELIN(4), - /** - * - * - *
-   * The Zookeeper service.
-   * 
- * - * ZOOKEEPER = 8; - */ - ZOOKEEPER(8), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-   * Unspecified component. Specifying this will cause Cluster creation to fail.
-   * 
- * - * COMPONENT_UNSPECIFIED = 0; - */ - public static final int COMPONENT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * The Anaconda python distribution. The Anaconda component is not supported
-   * in the Dataproc
-   * <a
-   * href="/dataproc/docs/concepts/versioning/dataproc-release-2.0">2.0
-   * image</a>. The 2.0 image is pre-installed with Miniconda.
-   * 
- * - * ANACONDA = 5; - */ - public static final int ANACONDA_VALUE = 5; - /** - * - * - *
-   * Docker
-   * 
- * - * DOCKER = 13; - */ - public static final int DOCKER_VALUE = 13; - /** - * - * - *
-   * The Druid query engine. (alpha)
-   * 
- * - * DRUID = 9; - */ - public static final int DRUID_VALUE = 9; - /** - * - * - *
-   * Flink
-   * 
- * - * FLINK = 14; - */ - public static final int FLINK_VALUE = 14; - /** - * - * - *
-   * HBase. (beta)
-   * 
- * - * HBASE = 11; - */ - public static final int HBASE_VALUE = 11; - /** - * - * - *
-   * The Hive Web HCatalog (the REST service for accessing HCatalog).
-   * 
- * - * HIVE_WEBHCAT = 3; - */ - public static final int HIVE_WEBHCAT_VALUE = 3; - /** - * - * - *
-   * The Jupyter Notebook.
-   * 
- * - * JUPYTER = 1; - */ - public static final int JUPYTER_VALUE = 1; - /** - * - * - *
-   * The Presto query engine.
-   * 
- * - * PRESTO = 6; - */ - public static final int PRESTO_VALUE = 6; - /** - * - * - *
-   * The Ranger service.
-   * 
- * - * RANGER = 12; - */ - public static final int RANGER_VALUE = 12; - /** - * - * - *
-   * The Solr service.
-   * 
- * - * SOLR = 10; - */ - public static final int SOLR_VALUE = 10; - /** - * - * - *
-   * The Zeppelin notebook.
-   * 
- * - * ZEPPELIN = 4; - */ - public static final int ZEPPELIN_VALUE = 4; - /** - * - * - *
-   * The Zookeeper service.
-   * 
- * - * ZOOKEEPER = 8; - */ - public static final int ZOOKEEPER_VALUE = 8; - - 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 Component 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 Component forNumber(int value) { - switch (value) { - case 0: - return COMPONENT_UNSPECIFIED; - case 5: - return ANACONDA; - case 13: - return DOCKER; - case 9: - return DRUID; - case 14: - return FLINK; - case 11: - return HBASE; - case 3: - return HIVE_WEBHCAT; - case 1: - return JUPYTER; - case 6: - return PRESTO; - case 12: - return RANGER; - case 10: - return SOLR; - case 4: - return ZEPPELIN; - case 8: - return ZOOKEEPER; - 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 Component findValueByNumber(int number) { - return Component.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.dataproc.v1.SharedProto.getDescriptor().getEnumTypes().get(0); - } - - private static final Component[] VALUES = values(); - - public static Component 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 Component(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.Component) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java deleted file mode 100644 index 7b030cfe..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfig.java +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Confidential Instance Config for clusters using [Confidential
- * VMs](https://cloud.google.com/compute/confidential-vm/docs)
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ConfidentialInstanceConfig} - */ -public final class ConfidentialInstanceConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ConfidentialInstanceConfig) - ConfidentialInstanceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidentialInstanceConfig.newBuilder() to construct. - private ConfidentialInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidentialInstanceConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidentialInstanceConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidentialInstanceConfig( - 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: - { - enableConfidentialCompute_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.class, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder.class); - } - - public static final int ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER = 1; - private boolean enableConfidentialCompute_; - /** - * - * - *
-   * Optional. Defines whether the instance should have confidential compute enabled.
-   * 
- * - * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableConfidentialCompute. - */ - @java.lang.Override - public boolean getEnableConfidentialCompute() { - return enableConfidentialCompute_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (enableConfidentialCompute_ != false) { - output.writeBool(1, enableConfidentialCompute_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableConfidentialCompute_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableConfidentialCompute_); - } - 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.dataproc.v1.ConfidentialInstanceConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig other = - (com.google.cloud.dataproc.v1.ConfidentialInstanceConfig) obj; - - if (getEnableConfidentialCompute() != other.getEnableConfidentialCompute()) 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) + ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfidentialCompute()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig 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.dataproc.v1.ConfidentialInstanceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig parseFrom( - 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.dataproc.v1.ConfidentialInstanceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig 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.dataproc.v1.ConfidentialInstanceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig 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.dataproc.v1.ConfidentialInstanceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig 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.dataproc.v1.ConfidentialInstanceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs)
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ConfidentialInstanceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ConfidentialInstanceConfig) - com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.class, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.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(); - enableConfidentialCompute_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ConfidentialInstanceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig build() { - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig buildPartial() { - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig result = - new com.google.cloud.dataproc.v1.ConfidentialInstanceConfig(this); - result.enableConfidentialCompute_ = enableConfidentialCompute_; - 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.dataproc.v1.ConfidentialInstanceConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.ConfidentialInstanceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ConfidentialInstanceConfig other) { - if (other == com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.getDefaultInstance()) - return this; - if (other.getEnableConfidentialCompute() != false) { - setEnableConfidentialCompute(other.getEnableConfidentialCompute()); - } - 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.dataproc.v1.ConfidentialInstanceConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ConfidentialInstanceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enableConfidentialCompute_; - /** - * - * - *
-     * Optional. Defines whether the instance should have confidential compute enabled.
-     * 
- * - * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableConfidentialCompute. - */ - @java.lang.Override - public boolean getEnableConfidentialCompute() { - return enableConfidentialCompute_; - } - /** - * - * - *
-     * Optional. Defines whether the instance should have confidential compute enabled.
-     * 
- * - * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableConfidentialCompute to set. - * @return This builder for chaining. - */ - public Builder setEnableConfidentialCompute(boolean value) { - - enableConfidentialCompute_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Defines whether the instance should have confidential compute enabled.
-     * 
- * - * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableConfidentialCompute() { - - enableConfidentialCompute_ = 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.dataproc.v1.ConfidentialInstanceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ConfidentialInstanceConfig) - private static final com.google.cloud.dataproc.v1.ConfidentialInstanceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ConfidentialInstanceConfig(); - } - - public static com.google.cloud.dataproc.v1.ConfidentialInstanceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidentialInstanceConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidentialInstanceConfig(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.dataproc.v1.ConfidentialInstanceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java deleted file mode 100644 index dcf27cf8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ConfidentialInstanceConfigOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ConfidentialInstanceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ConfidentialInstanceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Defines whether the instance should have confidential compute enabled.
-   * 
- * - * bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableConfidentialCompute. - */ - boolean getEnableConfidentialCompute(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequest.java deleted file mode 100644 index 77fc7589..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequest.java +++ /dev/null @@ -1,1003 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to create an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest} - */ -public final class CreateAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) - CreateAutoscalingPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateAutoscalingPolicyRequest.newBuilder() to construct. - private CreateAutoscalingPolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateAutoscalingPolicyRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAutoscalingPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateAutoscalingPolicyRequest( - 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.dataproc.v1.AutoscalingPolicy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.dataproc.v1.AutoscalingPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.create`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.create`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 POLICY_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.AutoscalingPolicy policy_; - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy() { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (policy_ != null) { - output.writeMessage(2, getPolicy()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicy()); - } - 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.dataproc.v1.CreateAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) 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 (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest 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.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - 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.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest 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.dataproc.v1.CreateAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest 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.dataproc.v1.CreateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest 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.dataproc.v1.CreateAutoscalingPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to create an autoscaling policy.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.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 (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest(this); - result.parent_ = parent_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.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.dataproc.v1.CreateAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest other) { - if (other == com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - 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.dataproc.v1.CreateAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The "resource name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.create`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.create`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.create`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.create`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.create`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 com.google.cloud.dataproc.v1.AutoscalingPolicy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy(com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy(com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.cloud.dataproc.v1.AutoscalingPolicy.newBuilder(policy_) - .mergeFrom(value) - .buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.CreateAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAutoscalingPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateAutoscalingPolicyRequest(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.dataproc.v1.CreateAutoscalingPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index a7571aef..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface CreateAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.create`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.create`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy(); - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequest.java deleted file mode 100644 index 29c5ec47..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequest.java +++ /dev/null @@ -1,1364 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to create a batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateBatchRequest} - */ -public final class CreateBatchRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CreateBatchRequest) - CreateBatchRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateBatchRequest.newBuilder() to construct. - private CreateBatchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateBatchRequest() { - parent_ = ""; - batchId_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBatchRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateBatchRequest( - 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.dataproc.v1.Batch.Builder subBuilder = null; - if (batch_ != null) { - subBuilder = batch_.toBuilder(); - } - batch_ = - input.readMessage(com.google.cloud.dataproc.v1.Batch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(batch_); - batch_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - batchId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_CreateBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_CreateBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateBatchRequest.class, - com.google.cloud.dataproc.v1.CreateBatchRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent resource where this batch will be created.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent resource where this batch will be created.
-   * 
- * - * - * 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 BATCH_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.Batch batch_; - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the batch field is set. - */ - @java.lang.Override - public boolean hasBatch() { - return batch_ != null; - } - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The batch. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch getBatch() { - return batch_ == null ? com.google.cloud.dataproc.v1.Batch.getDefaultInstance() : batch_; - } - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOrBuilder getBatchOrBuilder() { - return getBatch(); - } - - public static final int BATCH_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object batchId_; - /** - * - * - *
-   * Optional. The ID to use for the batch, which will become the final component of
-   * the batch's resource name.
-   * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-   * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The batchId. - */ - @java.lang.Override - public java.lang.String getBatchId() { - java.lang.Object ref = batchId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batchId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The ID to use for the batch, which will become the final component of
-   * the batch's resource name.
-   * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-   * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for batchId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBatchIdBytes() { - java.lang.Object ref = batchId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batchId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the service
-   * receives two
-   * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-   * with the same request_id, the second request is ignored and the
-   * Operation that corresponds to the first Batch created and stored
-   * in the backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The value must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the service
-   * receives two
-   * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-   * with the same request_id, the second request is ignored and the
-   * Operation that corresponds to the first Batch created and stored
-   * in the backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The value must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (batch_ != null) { - output.writeMessage(2, getBatch()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, batchId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (batch_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBatch()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, batchId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - 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.dataproc.v1.CreateBatchRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.CreateBatchRequest other = - (com.google.cloud.dataproc.v1.CreateBatchRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasBatch() != other.hasBatch()) return false; - if (hasBatch()) { - if (!getBatch().equals(other.getBatch())) return false; - } - if (!getBatchId().equals(other.getBatchId())) return false; - if (!getRequestId().equals(other.getRequestId())) 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 (hasBatch()) { - hash = (37 * hash) + BATCH_FIELD_NUMBER; - hash = (53 * hash) + getBatch().hashCode(); - } - hash = (37 * hash) + BATCH_ID_FIELD_NUMBER; - hash = (53 * hash) + getBatchId().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest 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.dataproc.v1.CreateBatchRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest parseFrom( - 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.dataproc.v1.CreateBatchRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest 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.dataproc.v1.CreateBatchRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest 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.dataproc.v1.CreateBatchRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest 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.dataproc.v1.CreateBatchRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to create a batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateBatchRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CreateBatchRequest) - com.google.cloud.dataproc.v1.CreateBatchRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_CreateBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_CreateBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateBatchRequest.class, - com.google.cloud.dataproc.v1.CreateBatchRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.CreateBatchRequest.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 (batchBuilder_ == null) { - batch_ = null; - } else { - batch_ = null; - batchBuilder_ = null; - } - batchId_ = ""; - - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_CreateBatchRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateBatchRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.CreateBatchRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateBatchRequest build() { - com.google.cloud.dataproc.v1.CreateBatchRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateBatchRequest buildPartial() { - com.google.cloud.dataproc.v1.CreateBatchRequest result = - new com.google.cloud.dataproc.v1.CreateBatchRequest(this); - result.parent_ = parent_; - if (batchBuilder_ == null) { - result.batch_ = batch_; - } else { - result.batch_ = batchBuilder_.build(); - } - result.batchId_ = batchId_; - result.requestId_ = requestId_; - 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.dataproc.v1.CreateBatchRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.CreateBatchRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.CreateBatchRequest other) { - if (other == com.google.cloud.dataproc.v1.CreateBatchRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasBatch()) { - mergeBatch(other.getBatch()); - } - if (!other.getBatchId().isEmpty()) { - batchId_ = other.batchId_; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.CreateBatchRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.CreateBatchRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent resource where this batch will be created.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The parent resource where this batch will be created.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The parent resource where this batch will be created.
-     * 
- * - * - * 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 parent resource where this batch will be created.
-     * 
- * - * - * 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 parent resource where this batch will be created.
-     * 
- * - * - * 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 com.google.cloud.dataproc.v1.Batch batch_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder> - batchBuilder_; - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the batch field is set. - */ - public boolean hasBatch() { - return batchBuilder_ != null || batch_ != null; - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The batch. - */ - public com.google.cloud.dataproc.v1.Batch getBatch() { - if (batchBuilder_ == null) { - return batch_ == null ? com.google.cloud.dataproc.v1.Batch.getDefaultInstance() : batch_; - } else { - return batchBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBatch(com.google.cloud.dataproc.v1.Batch value) { - if (batchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - batch_ = value; - onChanged(); - } else { - batchBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setBatch(com.google.cloud.dataproc.v1.Batch.Builder builderForValue) { - if (batchBuilder_ == null) { - batch_ = builderForValue.build(); - onChanged(); - } else { - batchBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeBatch(com.google.cloud.dataproc.v1.Batch value) { - if (batchBuilder_ == null) { - if (batch_ != null) { - batch_ = - com.google.cloud.dataproc.v1.Batch.newBuilder(batch_).mergeFrom(value).buildPartial(); - } else { - batch_ = value; - } - onChanged(); - } else { - batchBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearBatch() { - if (batchBuilder_ == null) { - batch_ = null; - onChanged(); - } else { - batch_ = null; - batchBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.Batch.Builder getBatchBuilder() { - - onChanged(); - return getBatchFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.BatchOrBuilder getBatchOrBuilder() { - if (batchBuilder_ != null) { - return batchBuilder_.getMessageOrBuilder(); - } else { - return batch_ == null ? com.google.cloud.dataproc.v1.Batch.getDefaultInstance() : batch_; - } - } - /** - * - * - *
-     * Required. The batch to create.
-     * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder> - getBatchFieldBuilder() { - if (batchBuilder_ == null) { - batchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder>( - getBatch(), getParentForChildren(), isClean()); - batch_ = null; - } - return batchBuilder_; - } - - private java.lang.Object batchId_ = ""; - /** - * - * - *
-     * Optional. The ID to use for the batch, which will become the final component of
-     * the batch's resource name.
-     * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-     * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The batchId. - */ - public java.lang.String getBatchId() { - java.lang.Object ref = batchId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - batchId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The ID to use for the batch, which will become the final component of
-     * the batch's resource name.
-     * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-     * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for batchId. - */ - public com.google.protobuf.ByteString getBatchIdBytes() { - java.lang.Object ref = batchId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - batchId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The ID to use for the batch, which will become the final component of
-     * the batch's resource name.
-     * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-     * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The batchId to set. - * @return This builder for chaining. - */ - public Builder setBatchId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - batchId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The ID to use for the batch, which will become the final component of
-     * the batch's resource name.
-     * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-     * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearBatchId() { - - batchId_ = getDefaultInstance().getBatchId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The ID to use for the batch, which will become the final component of
-     * the batch's resource name.
-     * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-     * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for batchId to set. - * @return This builder for chaining. - */ - public Builder setBatchIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - batchId_ = value; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the service
-     * receives two
-     * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-     * with the same request_id, the second request is ignored and the
-     * Operation that corresponds to the first Batch created and stored
-     * in the backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The value must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the service
-     * receives two
-     * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-     * with the same request_id, the second request is ignored and the
-     * Operation that corresponds to the first Batch created and stored
-     * in the backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The value must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the service
-     * receives two
-     * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-     * with the same request_id, the second request is ignored and the
-     * Operation that corresponds to the first Batch created and stored
-     * in the backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The value must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the service
-     * receives two
-     * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-     * with the same request_id, the second request is ignored and the
-     * Operation that corresponds to the first Batch created and stored
-     * in the backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The value must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the service
-     * receives two
-     * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-     * with the same request_id, the second request is ignored and the
-     * Operation that corresponds to the first Batch created and stored
-     * in the backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The value must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.CreateBatchRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CreateBatchRequest) - private static final com.google.cloud.dataproc.v1.CreateBatchRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CreateBatchRequest(); - } - - public static com.google.cloud.dataproc.v1.CreateBatchRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateBatchRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBatchRequest(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.dataproc.v1.CreateBatchRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequestOrBuilder.java deleted file mode 100644 index 0ea10ac4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateBatchRequestOrBuilder.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface CreateBatchRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CreateBatchRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent resource where this batch will be created.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent resource where this batch will be created.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the batch field is set. - */ - boolean hasBatch(); - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The batch. - */ - com.google.cloud.dataproc.v1.Batch getBatch(); - /** - * - * - *
-   * Required. The batch to create.
-   * 
- * - * .google.cloud.dataproc.v1.Batch batch = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.BatchOrBuilder getBatchOrBuilder(); - - /** - * - * - *
-   * Optional. The ID to use for the batch, which will become the final component of
-   * the batch's resource name.
-   * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-   * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The batchId. - */ - java.lang.String getBatchId(); - /** - * - * - *
-   * Optional. The ID to use for the batch, which will become the final component of
-   * the batch's resource name.
-   * This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`.
-   * 
- * - * string batch_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for batchId. - */ - com.google.protobuf.ByteString getBatchIdBytes(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the service
-   * receives two
-   * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-   * with the same request_id, the second request is ignored and the
-   * Operation that corresponds to the first Batch created and stored
-   * in the backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The value must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the service
-   * receives two
-   * [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s
-   * with the same request_id, the second request is ignored and the
-   * Operation that corresponds to the first Batch created and stored
-   * in the backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The value must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java deleted file mode 100644 index 1297095d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java +++ /dev/null @@ -1,1521 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to create a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateClusterRequest} - */ -public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CreateClusterRequest) - CreateClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateClusterRequest.newBuilder() to construct. - private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateClusterRequest() { - projectId_ = ""; - region_ = ""; - requestId_ = ""; - actionOnFailedPrimaryWorkers_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.cloud.dataproc.v1.Cluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cluster_); - cluster_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - actionOnFailedPrimaryWorkers_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_CreateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateClusterRequest.class, - com.google.cloud.dataproc.v1.CreateClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.Cluster cluster_; - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - @java.lang.Override - public boolean hasCluster() { - return cluster_ != null; - } - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster getCluster() { - return cluster_ == null ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() : cluster_; - } - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() { - return getCluster(); - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server receives two
-   * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server receives two
-   * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTION_ON_FAILED_PRIMARY_WORKERS_FIELD_NUMBER = 5; - private int actionOnFailedPrimaryWorkers_; - /** - * - * - *
-   * Optional. Failure action when primary worker creation fails.
-   * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for actionOnFailedPrimaryWorkers. - */ - @java.lang.Override - public int getActionOnFailedPrimaryWorkersValue() { - return actionOnFailedPrimaryWorkers_; - } - /** - * - * - *
-   * Optional. Failure action when primary worker creation fails.
-   * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The actionOnFailedPrimaryWorkers. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.FailureAction getActionOnFailedPrimaryWorkers() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.FailureAction result = - com.google.cloud.dataproc.v1.FailureAction.valueOf(actionOnFailedPrimaryWorkers_); - return result == null ? com.google.cloud.dataproc.v1.FailureAction.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (cluster_ != null) { - output.writeMessage(2, getCluster()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - if (actionOnFailedPrimaryWorkers_ - != com.google.cloud.dataproc.v1.FailureAction.FAILURE_ACTION_UNSPECIFIED.getNumber()) { - output.writeEnum(5, actionOnFailedPrimaryWorkers_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (cluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCluster()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - if (actionOnFailedPrimaryWorkers_ - != com.google.cloud.dataproc.v1.FailureAction.FAILURE_ACTION_UNSPECIFIED.getNumber()) { - size += - com.google.protobuf.CodedOutputStream.computeEnumSize(5, actionOnFailedPrimaryWorkers_); - } - 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.dataproc.v1.CreateClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.CreateClusterRequest other = - (com.google.cloud.dataproc.v1.CreateClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (hasCluster() != other.hasCluster()) return false; - if (hasCluster()) { - if (!getCluster().equals(other.getCluster())) return false; - } - if (!getRequestId().equals(other.getRequestId())) return false; - if (actionOnFailedPrimaryWorkers_ != other.actionOnFailedPrimaryWorkers_) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - if (hasCluster()) { - hash = (37 * hash) + CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getCluster().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (37 * hash) + ACTION_ON_FAILED_PRIMARY_WORKERS_FIELD_NUMBER; - hash = (53 * hash) + actionOnFailedPrimaryWorkers_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest 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.dataproc.v1.CreateClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest parseFrom( - 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.dataproc.v1.CreateClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest 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.dataproc.v1.CreateClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest 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.dataproc.v1.CreateClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest 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.dataproc.v1.CreateClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to create a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CreateClusterRequest) - com.google.cloud.dataproc.v1.CreateClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_CreateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateClusterRequest.class, - com.google.cloud.dataproc.v1.CreateClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.CreateClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - if (clusterBuilder_ == null) { - cluster_ = null; - } else { - cluster_ = null; - clusterBuilder_ = null; - } - requestId_ = ""; - - actionOnFailedPrimaryWorkers_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_CreateClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.CreateClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateClusterRequest build() { - com.google.cloud.dataproc.v1.CreateClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.CreateClusterRequest result = - new com.google.cloud.dataproc.v1.CreateClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - if (clusterBuilder_ == null) { - result.cluster_ = cluster_; - } else { - result.cluster_ = clusterBuilder_.build(); - } - result.requestId_ = requestId_; - result.actionOnFailedPrimaryWorkers_ = actionOnFailedPrimaryWorkers_; - 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.dataproc.v1.CreateClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.CreateClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.CreateClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.CreateClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (other.hasCluster()) { - mergeCluster(other.getCluster()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - onChanged(); - } - if (other.actionOnFailedPrimaryWorkers_ != 0) { - setActionOnFailedPrimaryWorkersValue(other.getActionOnFailedPrimaryWorkersValue()); - } - 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.dataproc.v1.CreateClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.CreateClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - clusterBuilder_; - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - public boolean hasCluster() { - return clusterBuilder_ != null || cluster_ != null; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - public com.google.cloud.dataproc.v1.Cluster getCluster() { - if (clusterBuilder_ == null) { - return cluster_ == null - ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() - : cluster_; - } else { - return clusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1.Cluster value) { - if (clusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cluster_ = value; - onChanged(); - } else { - clusterBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1.Cluster.Builder builderForValue) { - if (clusterBuilder_ == null) { - cluster_ = builderForValue.build(); - onChanged(); - } else { - clusterBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeCluster(com.google.cloud.dataproc.v1.Cluster value) { - if (clusterBuilder_ == null) { - if (cluster_ != null) { - cluster_ = - com.google.cloud.dataproc.v1.Cluster.newBuilder(cluster_) - .mergeFrom(value) - .buildPartial(); - } else { - cluster_ = value; - } - onChanged(); - } else { - clusterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearCluster() { - if (clusterBuilder_ == null) { - cluster_ = null; - onChanged(); - } else { - cluster_ = null; - clusterBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.Cluster.Builder getClusterBuilder() { - - onChanged(); - return getClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() { - if (clusterBuilder_ != null) { - return clusterBuilder_.getMessageOrBuilder(); - } else { - return cluster_ == null - ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() - : cluster_; - } - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - getClusterFieldBuilder() { - if (clusterBuilder_ == null) { - clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder>( - getCluster(), getParentForChildren(), isClean()); - cluster_ = null; - } - return clusterBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server receives two
-     * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server receives two
-     * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server receives two
-     * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server receives two
-     * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server receives two
-     * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = value; - onChanged(); - return this; - } - - private int actionOnFailedPrimaryWorkers_ = 0; - /** - * - * - *
-     * Optional. Failure action when primary worker creation fails.
-     * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for actionOnFailedPrimaryWorkers. - */ - @java.lang.Override - public int getActionOnFailedPrimaryWorkersValue() { - return actionOnFailedPrimaryWorkers_; - } - /** - * - * - *
-     * Optional. Failure action when primary worker creation fails.
-     * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for actionOnFailedPrimaryWorkers to set. - * @return This builder for chaining. - */ - public Builder setActionOnFailedPrimaryWorkersValue(int value) { - - actionOnFailedPrimaryWorkers_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Failure action when primary worker creation fails.
-     * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The actionOnFailedPrimaryWorkers. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.FailureAction getActionOnFailedPrimaryWorkers() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.FailureAction result = - com.google.cloud.dataproc.v1.FailureAction.valueOf(actionOnFailedPrimaryWorkers_); - return result == null ? com.google.cloud.dataproc.v1.FailureAction.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Optional. Failure action when primary worker creation fails.
-     * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The actionOnFailedPrimaryWorkers to set. - * @return This builder for chaining. - */ - public Builder setActionOnFailedPrimaryWorkers( - com.google.cloud.dataproc.v1.FailureAction value) { - if (value == null) { - throw new NullPointerException(); - } - - actionOnFailedPrimaryWorkers_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Failure action when primary worker creation fails.
-     * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearActionOnFailedPrimaryWorkers() { - - actionOnFailedPrimaryWorkers_ = 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.dataproc.v1.CreateClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CreateClusterRequest) - private static final com.google.cloud.dataproc.v1.CreateClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CreateClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.CreateClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateClusterRequest(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.dataproc.v1.CreateClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java deleted file mode 100644 index 0903a768..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface CreateClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CreateClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - boolean hasCluster(); - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - com.google.cloud.dataproc.v1.Cluster getCluster(); - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server receives two
-   * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server receives two
-   * [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); - - /** - * - * - *
-   * Optional. Failure action when primary worker creation fails.
-   * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for actionOnFailedPrimaryWorkers. - */ - int getActionOnFailedPrimaryWorkersValue(); - /** - * - * - *
-   * Optional. Failure action when primary worker creation fails.
-   * 
- * - * - * .google.cloud.dataproc.v1.FailureAction action_on_failed_primary_workers = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The actionOnFailedPrimaryWorkers. - */ - com.google.cloud.dataproc.v1.FailureAction getActionOnFailedPrimaryWorkers(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequest.java deleted file mode 100644 index 0ba83f6e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequest.java +++ /dev/null @@ -1,1002 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to create a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateWorkflowTemplateRequest} - */ -public final class CreateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) - CreateWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateWorkflowTemplateRequest.newBuilder() to construct. - private CreateWorkflowTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateWorkflowTemplateRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateWorkflowTemplateRequest( - 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.dataproc.v1.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(template_); - template_ = 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.create`, the resource name of the
-   *   region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.create`, the resource name of
-   *   the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.create`, the resource name of the
-   *   region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.create`, the resource name of
-   *   the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 TEMPLATE_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - @java.lang.Override - public boolean hasTemplate() { - return template_ != null; - } - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - return getTemplate(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (template_ != null) { - output.writeMessage(2, getTemplate()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (template_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemplate()); - } - 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.dataproc.v1.CreateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasTemplate() != other.hasTemplate()) return false; - if (hasTemplate()) { - if (!getTemplate().equals(other.getTemplate())) 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 (hasTemplate()) { - hash = (37 * hash) + TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getTemplate().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest 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.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.CreateWorkflowTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest 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.dataproc.v1.CreateWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest 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.dataproc.v1.CreateWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest 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.dataproc.v1.CreateWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to create a workflow template.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.CreateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.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 (templateBuilder_ == null) { - template_ = null; - } else { - template_ = null; - templateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest(this); - result.parent_ = parent_; - if (templateBuilder_ == null) { - result.template_ = template_; - } else { - result.template_ = templateBuilder_.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.dataproc.v1.CreateWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest other) { - if (other == com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasTemplate()) { - mergeTemplate(other.getTemplate()); - } - 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.dataproc.v1.CreateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.create`, the resource name of the
-     *   region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.create`, the resource name of
-     *   the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.create`, the resource name of the
-     *   region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.create`, the resource name of
-     *   the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.create`, the resource name of the
-     *   region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.create`, the resource name of
-     *   the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.create`, the resource name of the
-     *   region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.create`, the resource name of
-     *   the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.create`, the resource name of the
-     *   region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.create`, the resource name of
-     *   the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 com.google.cloud.dataproc.v1.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - public boolean hasTemplate() { - return templateBuilder_ != null || template_ != null; - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - template_ = value; - onChanged(); - } else { - templateBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templateBuilder_ == null) { - template_ = builderForValue.build(); - onChanged(); - } else { - templateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1.WorkflowTemplate.newBuilder(template_) - .mergeFrom(value) - .buildPartial(); - } else { - template_ = value; - } - onChanged(); - } else { - templateBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearTemplate() { - if (templateBuilder_ == null) { - template_ = null; - onChanged(); - } else { - template_ = null; - templateBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder>( - getTemplate(), getParentForChildren(), isClean()); - template_ = null; - } - return templateBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.CreateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateWorkflowTemplateRequest(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.dataproc.v1.CreateWorkflowTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 0c4883bb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface CreateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.CreateWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.create`, the resource name of the
-   *   region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.create`, the resource name of
-   *   the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.create`, the resource name of the
-   *   region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.create`, the resource name of
-   *   the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - boolean hasTemplate(); - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequest.java deleted file mode 100644 index 080c604e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequest.java +++ /dev/null @@ -1,703 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to delete an autoscaling policy.
- * Autoscaling policies in use by one or more clusters will not be deleted.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest} - */ -public final class DeleteAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) - DeleteAutoscalingPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteAutoscalingPolicyRequest.newBuilder() to construct. - private DeleteAutoscalingPolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteAutoscalingPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteAutoscalingPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteAutoscalingPolicyRequest( - 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += 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.dataproc.v1.DeleteAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) 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.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest 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.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - 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.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest 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.dataproc.v1.DeleteAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest 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.dataproc.v1.DeleteAutoscalingPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest 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.dataproc.v1.DeleteAutoscalingPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to delete an autoscaling policy.
-   * Autoscaling policies in use by one or more clusters will not be deleted.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest(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.dataproc.v1.DeleteAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest other) { - if (other == com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest.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.dataproc.v1.DeleteAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - 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.dataproc.v1.DeleteAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteAutoscalingPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAutoscalingPolicyRequest(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.dataproc.v1.DeleteAutoscalingPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index 9d97b3f9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequestOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface DeleteAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DeleteAutoscalingPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.delete`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequest.java deleted file mode 100644 index 7efd27a9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequest.java +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to delete a batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteBatchRequest} - */ -public final class DeleteBatchRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DeleteBatchRequest) - DeleteBatchRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteBatchRequest.newBuilder() to construct. - private DeleteBatchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteBatchRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBatchRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteBatchRequest( - 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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteBatchRequest.class, - com.google.cloud.dataproc.v1.DeleteBatchRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the batch resource to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the batch resource to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += 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.dataproc.v1.DeleteBatchRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DeleteBatchRequest other = - (com.google.cloud.dataproc.v1.DeleteBatchRequest) 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.dataproc.v1.DeleteBatchRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest 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.dataproc.v1.DeleteBatchRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest parseFrom( - 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.dataproc.v1.DeleteBatchRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest 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.dataproc.v1.DeleteBatchRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest 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.dataproc.v1.DeleteBatchRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest 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.dataproc.v1.DeleteBatchRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to delete a batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteBatchRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DeleteBatchRequest) - com.google.cloud.dataproc.v1.DeleteBatchRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteBatchRequest.class, - com.google.cloud.dataproc.v1.DeleteBatchRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DeleteBatchRequest.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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_DeleteBatchRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteBatchRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DeleteBatchRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteBatchRequest build() { - com.google.cloud.dataproc.v1.DeleteBatchRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteBatchRequest buildPartial() { - com.google.cloud.dataproc.v1.DeleteBatchRequest result = - new com.google.cloud.dataproc.v1.DeleteBatchRequest(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.dataproc.v1.DeleteBatchRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DeleteBatchRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DeleteBatchRequest other) { - if (other == com.google.cloud.dataproc.v1.DeleteBatchRequest.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.dataproc.v1.DeleteBatchRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.DeleteBatchRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the batch resource to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the batch resource to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the batch resource to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the batch resource to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the batch resource to delete.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - 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.dataproc.v1.DeleteBatchRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DeleteBatchRequest) - private static final com.google.cloud.dataproc.v1.DeleteBatchRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DeleteBatchRequest(); - } - - public static com.google.cloud.dataproc.v1.DeleteBatchRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteBatchRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBatchRequest(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.dataproc.v1.DeleteBatchRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequestOrBuilder.java deleted file mode 100644 index 55c734ca..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteBatchRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface DeleteBatchRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DeleteBatchRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the batch resource to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The name of the batch resource to delete.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java deleted file mode 100644 index 0069a512..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java +++ /dev/null @@ -1,1429 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to delete a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteClusterRequest} - */ -public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DeleteClusterRequest) - DeleteClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteClusterRequest.newBuilder() to construct. - private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - clusterUuid_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteClusterRequest.class, - com.google.cloud.dataproc.v1.DeleteClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 4; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC should fail
-   * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC should fail
-   * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); - } - 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.dataproc.v1.DeleteClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DeleteClusterRequest other = - (com.google.cloud.dataproc.v1.DeleteClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (!getRequestId().equals(other.getRequestId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest 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.dataproc.v1.DeleteClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest parseFrom( - 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.dataproc.v1.DeleteClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest 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.dataproc.v1.DeleteClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest 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.dataproc.v1.DeleteClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest 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.dataproc.v1.DeleteClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to delete a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DeleteClusterRequest) - com.google.cloud.dataproc.v1.DeleteClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteClusterRequest.class, - com.google.cloud.dataproc.v1.DeleteClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DeleteClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - clusterUuid_ = ""; - - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DeleteClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteClusterRequest build() { - com.google.cloud.dataproc.v1.DeleteClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.DeleteClusterRequest result = - new com.google.cloud.dataproc.v1.DeleteClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - result.requestId_ = requestId_; - 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.dataproc.v1.DeleteClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DeleteClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DeleteClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.DeleteClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.DeleteClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.DeleteClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC should fail
-     * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC should fail
-     * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC should fail
-     * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC should fail
-     * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC should fail
-     * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.DeleteClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DeleteClusterRequest) - private static final com.google.cloud.dataproc.v1.DeleteClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DeleteClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.DeleteClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteClusterRequest(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.dataproc.v1.DeleteClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java deleted file mode 100644 index 32f0dd6a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface DeleteClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DeleteClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC should fail
-   * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC should fail
-   * (with error NOT_FOUND) if cluster with specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequest.java deleted file mode 100644 index 99c4e88a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequest.java +++ /dev/null @@ -1,999 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to delete a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteJobRequest} - */ -public final class DeleteJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DeleteJobRequest) - DeleteJobRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteJobRequest.newBuilder() to construct. - private DeleteJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteJobRequest() { - projectId_ = ""; - region_ = ""; - jobId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteJobRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_DeleteJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteJobRequest.class, - com.google.cloud.dataproc.v1.DeleteJobRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - 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.dataproc.v1.DeleteJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DeleteJobRequest other = - (com.google.cloud.dataproc.v1.DeleteJobRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getJobId().equals(other.getJobId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest 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.dataproc.v1.DeleteJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest parseFrom( - 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.dataproc.v1.DeleteJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest 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.dataproc.v1.DeleteJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest 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.dataproc.v1.DeleteJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest 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.dataproc.v1.DeleteJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to delete a job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DeleteJobRequest) - com.google.cloud.dataproc.v1.DeleteJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_DeleteJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteJobRequest.class, - com.google.cloud.dataproc.v1.DeleteJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DeleteJobRequest.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(); - projectId_ = ""; - - region_ = ""; - - jobId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DeleteJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteJobRequest build() { - com.google.cloud.dataproc.v1.DeleteJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteJobRequest buildPartial() { - com.google.cloud.dataproc.v1.DeleteJobRequest result = - new com.google.cloud.dataproc.v1.DeleteJobRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.jobId_ = jobId_; - 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.dataproc.v1.DeleteJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DeleteJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DeleteJobRequest other) { - if (other == com.google.cloud.dataproc.v1.DeleteJobRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - 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.dataproc.v1.DeleteJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.DeleteJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = 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.dataproc.v1.DeleteJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DeleteJobRequest) - private static final com.google.cloud.dataproc.v1.DeleteJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DeleteJobRequest(); - } - - public static com.google.cloud.dataproc.v1.DeleteJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteJobRequest(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.dataproc.v1.DeleteJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequestOrBuilder.java deleted file mode 100644 index 6fb9ce0e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface DeleteJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DeleteJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequest.java deleted file mode 100644 index 5e2b10b7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequest.java +++ /dev/null @@ -1,800 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to delete a workflow template.
- * Currently started workflows will remain running.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest} - */ -public final class DeleteWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) - DeleteWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteWorkflowTemplateRequest.newBuilder() to construct. - private DeleteWorkflowTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteWorkflowTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeleteWorkflowTemplateRequest( - 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 16: - { - version_ = input.readInt32(); - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.delete`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.delete`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private int version_; - /** - * - * - *
-   * Optional. The version of workflow template to delete. If specified,
-   * will only delete the template if the current server version matches
-   * specified version.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - 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.dataproc.v1.DeleteWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (getVersion() != other.getVersion()) 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) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest 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.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest 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.dataproc.v1.DeleteWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest 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.dataproc.v1.DeleteWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest 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.dataproc.v1.DeleteWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to delete a workflow template.
-   * Currently started workflows will remain running.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.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_ = ""; - - version_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest(this); - result.name_ = name_; - result.version_ = version_; - 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.dataproc.v1.DeleteWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest other) { - if (other == com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - 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.dataproc.v1.DeleteWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.delete`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.delete`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.delete`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.delete`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.delete`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int version_; - /** - * - * - *
-     * Optional. The version of workflow template to delete. If specified,
-     * will only delete the template if the current server version matches
-     * specified version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - * - * - *
-     * Optional. The version of workflow template to delete. If specified,
-     * will only delete the template if the current server version matches
-     * specified version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The version of workflow template to delete. If specified,
-     * will only delete the template if the current server version matches
-     * specified version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 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.dataproc.v1.DeleteWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteWorkflowTemplateRequest(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.dataproc.v1.DeleteWorkflowTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 70f037aa..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface DeleteWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DeleteWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.delete`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.delete`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The version of workflow template to delete. If specified,
-   * will only delete the template if the current server version matches
-   * specified version.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - int getVersion(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequest.java deleted file mode 100644 index 7ef1d4f7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequest.java +++ /dev/null @@ -1,1001 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to collect cluster diagnostic information.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiagnoseClusterRequest} - */ -public final class DiagnoseClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DiagnoseClusterRequest) - DiagnoseClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DiagnoseClusterRequest.newBuilder() to construct. - private DiagnoseClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DiagnoseClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DiagnoseClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DiagnoseClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest.class, - com.google.cloud.dataproc.v1.DiagnoseClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - 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.dataproc.v1.DiagnoseClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DiagnoseClusterRequest other = - (com.google.cloud.dataproc.v1.DiagnoseClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest 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.dataproc.v1.DiagnoseClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest parseFrom( - 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.dataproc.v1.DiagnoseClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest 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.dataproc.v1.DiagnoseClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest 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.dataproc.v1.DiagnoseClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest 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.dataproc.v1.DiagnoseClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to collect cluster diagnostic information.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiagnoseClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DiagnoseClusterRequest) - com.google.cloud.dataproc.v1.DiagnoseClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiagnoseClusterRequest.class, - com.google.cloud.dataproc.v1.DiagnoseClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DiagnoseClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DiagnoseClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterRequest build() { - com.google.cloud.dataproc.v1.DiagnoseClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.DiagnoseClusterRequest result = - new com.google.cloud.dataproc.v1.DiagnoseClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - 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.dataproc.v1.DiagnoseClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.DiagnoseClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DiagnoseClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.DiagnoseClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - 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.dataproc.v1.DiagnoseClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.DiagnoseClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = 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.dataproc.v1.DiagnoseClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DiagnoseClusterRequest) - private static final com.google.cloud.dataproc.v1.DiagnoseClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DiagnoseClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiagnoseClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnoseClusterRequest(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.dataproc.v1.DiagnoseClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequestOrBuilder.java deleted file mode 100644 index 52409f34..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface DiagnoseClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DiagnoseClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResults.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResults.java deleted file mode 100644 index ba86b5e5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResults.java +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The location of diagnostic output.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiagnoseClusterResults} - */ -public final class DiagnoseClusterResults extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DiagnoseClusterResults) - DiagnoseClusterResultsOrBuilder { - private static final long serialVersionUID = 0L; - // Use DiagnoseClusterResults.newBuilder() to construct. - private DiagnoseClusterResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DiagnoseClusterResults() { - outputUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DiagnoseClusterResults(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DiagnoseClusterResults( - 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(); - - outputUri_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiagnoseClusterResults.class, - com.google.cloud.dataproc.v1.DiagnoseClusterResults.Builder.class); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object outputUri_; - /** - * - * - *
-   * Output only. The Cloud Storage URI of the diagnostic output.
-   * The output report is a plain text file with a summary of collected
-   * diagnostics.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - @java.lang.Override - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The Cloud Storage URI of the diagnostic output.
-   * The output report is a plain text file with a summary of collected
-   * diagnostics.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUri_); - } - 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.dataproc.v1.DiagnoseClusterResults)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DiagnoseClusterResults other = - (com.google.cloud.dataproc.v1.DiagnoseClusterResults) obj; - - if (!getOutputUri().equals(other.getOutputUri())) 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) + OUTPUT_URI_FIELD_NUMBER; - hash = (53 * hash) + getOutputUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults 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.dataproc.v1.DiagnoseClusterResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults parseFrom( - 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.dataproc.v1.DiagnoseClusterResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults 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.dataproc.v1.DiagnoseClusterResults parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults 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.dataproc.v1.DiagnoseClusterResults parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults 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.dataproc.v1.DiagnoseClusterResults prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 location of diagnostic output.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiagnoseClusterResults} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DiagnoseClusterResults) - com.google.cloud.dataproc.v1.DiagnoseClusterResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiagnoseClusterResults.class, - com.google.cloud.dataproc.v1.DiagnoseClusterResults.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DiagnoseClusterResults.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(); - outputUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterResults getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DiagnoseClusterResults.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterResults build() { - com.google.cloud.dataproc.v1.DiagnoseClusterResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiagnoseClusterResults buildPartial() { - com.google.cloud.dataproc.v1.DiagnoseClusterResults result = - new com.google.cloud.dataproc.v1.DiagnoseClusterResults(this); - result.outputUri_ = outputUri_; - 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.dataproc.v1.DiagnoseClusterResults) { - return mergeFrom((com.google.cloud.dataproc.v1.DiagnoseClusterResults) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DiagnoseClusterResults other) { - if (other == com.google.cloud.dataproc.v1.DiagnoseClusterResults.getDefaultInstance()) - return this; - if (!other.getOutputUri().isEmpty()) { - outputUri_ = other.outputUri_; - 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.dataproc.v1.DiagnoseClusterResults parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.DiagnoseClusterResults) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object outputUri_ = ""; - /** - * - * - *
-     * Output only. The Cloud Storage URI of the diagnostic output.
-     * The output report is a plain text file with a summary of collected
-     * diagnostics.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The Cloud Storage URI of the diagnostic output.
-     * The output report is a plain text file with a summary of collected
-     * diagnostics.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The Cloud Storage URI of the diagnostic output.
-     * The output report is a plain text file with a summary of collected
-     * diagnostics.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - outputUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The Cloud Storage URI of the diagnostic output.
-     * The output report is a plain text file with a summary of collected
-     * diagnostics.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - - outputUri_ = getDefaultInstance().getOutputUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The Cloud Storage URI of the diagnostic output.
-     * The output report is a plain text file with a summary of collected
-     * diagnostics.
-     * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - outputUri_ = 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.dataproc.v1.DiagnoseClusterResults) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DiagnoseClusterResults) - private static final com.google.cloud.dataproc.v1.DiagnoseClusterResults DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DiagnoseClusterResults(); - } - - public static com.google.cloud.dataproc.v1.DiagnoseClusterResults getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiagnoseClusterResults parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiagnoseClusterResults(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.dataproc.v1.DiagnoseClusterResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResultsOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResultsOrBuilder.java deleted file mode 100644 index a377eeed..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResultsOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface DiagnoseClusterResultsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DiagnoseClusterResults) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The Cloud Storage URI of the diagnostic output.
-   * The output report is a plain text file with a summary of collected
-   * diagnostics.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - /** - * - * - *
-   * Output only. The Cloud Storage URI of the diagnostic output.
-   * The output report is a plain text file with a summary of collected
-   * diagnostics.
-   * 
- * - * string output_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java deleted file mode 100644 index 756752ac..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java +++ /dev/null @@ -1,1068 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies the config of disk options for a group of VM instances.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiskConfig} - */ -public final class DiskConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.DiskConfig) - DiskConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DiskConfig.newBuilder() to construct. - private DiskConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DiskConfig() { - bootDiskType_ = ""; - localSsdInterface_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DiskConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DiskConfig( - 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: - { - bootDiskSizeGb_ = input.readInt32(); - break; - } - case 16: - { - numLocalSsds_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - bootDiskType_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - localSsdInterface_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiskConfig.class, - com.google.cloud.dataproc.v1.DiskConfig.Builder.class); - } - - public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object bootDiskType_; - /** - * - * - *
-   * Optional. Type of the boot disk (default is "pd-standard").
-   * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-   * "pd-ssd" (Persistent Disk Solid State Drive),
-   * or "pd-standard" (Persistent Disk Hard Disk Drive).
-   * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-   * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskType. - */ - @java.lang.Override - public java.lang.String getBootDiskType() { - java.lang.Object ref = bootDiskType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bootDiskType_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Type of the boot disk (default is "pd-standard").
-   * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-   * "pd-ssd" (Persistent Disk Solid State Drive),
-   * or "pd-standard" (Persistent Disk Hard Disk Drive).
-   * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-   * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for bootDiskType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBootDiskTypeBytes() { - java.lang.Object ref = bootDiskType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bootDiskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 1; - private int bootDiskSizeGb_; - /** - * - * - *
-   * Optional. Size in GB of the boot disk (default is 500GB).
-   * 
- * - * int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskSizeGb. - */ - @java.lang.Override - public int getBootDiskSizeGb() { - return bootDiskSizeGb_; - } - - public static final int NUM_LOCAL_SSDS_FIELD_NUMBER = 2; - private int numLocalSsds_; - /** - * - * - *
-   * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
-   * If SSDs are not attached, the boot disk is used to store runtime logs and
-   * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
-   * If one or more SSDs are attached, this runtime bulk
-   * data is spread across them, and the boot disk contains only basic
-   * config and installed binaries.
-   * 
- * - * int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numLocalSsds. - */ - @java.lang.Override - public int getNumLocalSsds() { - return numLocalSsds_; - } - - public static final int LOCAL_SSD_INTERFACE_FIELD_NUMBER = 4; - private volatile java.lang.Object localSsdInterface_; - /** - * - * - *
-   * Optional. Interface type of local SSDs (default is "scsi").
-   * Valid values: "scsi" (Small Computer System Interface),
-   * "nvme" (Non-Volatile Memory Express).
-   * See [local SSD
-   * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-   * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdInterface. - */ - @java.lang.Override - public java.lang.String getLocalSsdInterface() { - java.lang.Object ref = localSsdInterface_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - localSsdInterface_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Interface type of local SSDs (default is "scsi").
-   * Valid values: "scsi" (Small Computer System Interface),
-   * "nvme" (Non-Volatile Memory Express).
-   * See [local SSD
-   * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-   * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for localSsdInterface. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLocalSsdInterfaceBytes() { - java.lang.Object ref = localSsdInterface_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - localSsdInterface_ = 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 (bootDiskSizeGb_ != 0) { - output.writeInt32(1, bootDiskSizeGb_); - } - if (numLocalSsds_ != 0) { - output.writeInt32(2, numLocalSsds_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bootDiskType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bootDiskType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localSsdInterface_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, localSsdInterface_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (bootDiskSizeGb_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, bootDiskSizeGb_); - } - if (numLocalSsds_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, numLocalSsds_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bootDiskType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bootDiskType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localSsdInterface_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, localSsdInterface_); - } - 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.dataproc.v1.DiskConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.DiskConfig other = (com.google.cloud.dataproc.v1.DiskConfig) obj; - - if (!getBootDiskType().equals(other.getBootDiskType())) return false; - if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; - if (getNumLocalSsds() != other.getNumLocalSsds()) return false; - if (!getLocalSsdInterface().equals(other.getLocalSsdInterface())) 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) + BOOT_DISK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getBootDiskType().hashCode(); - hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; - hash = (53 * hash) + getBootDiskSizeGb(); - hash = (37 * hash) + NUM_LOCAL_SSDS_FIELD_NUMBER; - hash = (53 * hash) + getNumLocalSsds(); - hash = (37 * hash) + LOCAL_SSD_INTERFACE_FIELD_NUMBER; - hash = (53 * hash) + getLocalSsdInterface().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.DiskConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiskConfig 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.dataproc.v1.DiskConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiskConfig parseFrom( - 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.dataproc.v1.DiskConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.DiskConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.DiskConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiskConfig 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.dataproc.v1.DiskConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiskConfig 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.dataproc.v1.DiskConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.DiskConfig 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.dataproc.v1.DiskConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies the config of disk options for a group of VM instances.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.DiskConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.DiskConfig) - com.google.cloud.dataproc.v1.DiskConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.DiskConfig.class, - com.google.cloud.dataproc.v1.DiskConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.DiskConfig.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(); - bootDiskType_ = ""; - - bootDiskSizeGb_ = 0; - - numLocalSsds_ = 0; - - localSsdInterface_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_DiskConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiskConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiskConfig build() { - com.google.cloud.dataproc.v1.DiskConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.DiskConfig buildPartial() { - com.google.cloud.dataproc.v1.DiskConfig result = - new com.google.cloud.dataproc.v1.DiskConfig(this); - result.bootDiskType_ = bootDiskType_; - result.bootDiskSizeGb_ = bootDiskSizeGb_; - result.numLocalSsds_ = numLocalSsds_; - result.localSsdInterface_ = localSsdInterface_; - 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.dataproc.v1.DiskConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.DiskConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.DiskConfig other) { - if (other == com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()) return this; - if (!other.getBootDiskType().isEmpty()) { - bootDiskType_ = other.bootDiskType_; - onChanged(); - } - if (other.getBootDiskSizeGb() != 0) { - setBootDiskSizeGb(other.getBootDiskSizeGb()); - } - if (other.getNumLocalSsds() != 0) { - setNumLocalSsds(other.getNumLocalSsds()); - } - if (!other.getLocalSsdInterface().isEmpty()) { - localSsdInterface_ = other.localSsdInterface_; - 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.dataproc.v1.DiskConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.DiskConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object bootDiskType_ = ""; - /** - * - * - *
-     * Optional. Type of the boot disk (default is "pd-standard").
-     * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-     * "pd-ssd" (Persistent Disk Solid State Drive),
-     * or "pd-standard" (Persistent Disk Hard Disk Drive).
-     * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-     * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskType. - */ - public java.lang.String getBootDiskType() { - java.lang.Object ref = bootDiskType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bootDiskType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Type of the boot disk (default is "pd-standard").
-     * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-     * "pd-ssd" (Persistent Disk Solid State Drive),
-     * or "pd-standard" (Persistent Disk Hard Disk Drive).
-     * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-     * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for bootDiskType. - */ - public com.google.protobuf.ByteString getBootDiskTypeBytes() { - java.lang.Object ref = bootDiskType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bootDiskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Type of the boot disk (default is "pd-standard").
-     * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-     * "pd-ssd" (Persistent Disk Solid State Drive),
-     * or "pd-standard" (Persistent Disk Hard Disk Drive).
-     * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-     * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bootDiskType to set. - * @return This builder for chaining. - */ - public Builder setBootDiskType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - bootDiskType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the boot disk (default is "pd-standard").
-     * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-     * "pd-ssd" (Persistent Disk Solid State Drive),
-     * or "pd-standard" (Persistent Disk Hard Disk Drive).
-     * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-     * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearBootDiskType() { - - bootDiskType_ = getDefaultInstance().getBootDiskType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the boot disk (default is "pd-standard").
-     * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-     * "pd-ssd" (Persistent Disk Solid State Drive),
-     * or "pd-standard" (Persistent Disk Hard Disk Drive).
-     * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-     * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for bootDiskType to set. - * @return This builder for chaining. - */ - public Builder setBootDiskTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - bootDiskType_ = value; - onChanged(); - return this; - } - - private int bootDiskSizeGb_; - /** - * - * - *
-     * Optional. Size in GB of the boot disk (default is 500GB).
-     * 
- * - * int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskSizeGb. - */ - @java.lang.Override - public int getBootDiskSizeGb() { - return bootDiskSizeGb_; - } - /** - * - * - *
-     * Optional. Size in GB of the boot disk (default is 500GB).
-     * 
- * - * int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bootDiskSizeGb to set. - * @return This builder for chaining. - */ - public Builder setBootDiskSizeGb(int value) { - - bootDiskSizeGb_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Size in GB of the boot disk (default is 500GB).
-     * 
- * - * int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearBootDiskSizeGb() { - - bootDiskSizeGb_ = 0; - onChanged(); - return this; - } - - private int numLocalSsds_; - /** - * - * - *
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
-     * If SSDs are not attached, the boot disk is used to store runtime logs and
-     * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
-     * If one or more SSDs are attached, this runtime bulk
-     * data is spread across them, and the boot disk contains only basic
-     * config and installed binaries.
-     * 
- * - * int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numLocalSsds. - */ - @java.lang.Override - public int getNumLocalSsds() { - return numLocalSsds_; - } - /** - * - * - *
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
-     * If SSDs are not attached, the boot disk is used to store runtime logs and
-     * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
-     * If one or more SSDs are attached, this runtime bulk
-     * data is spread across them, and the boot disk contains only basic
-     * config and installed binaries.
-     * 
- * - * int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The numLocalSsds to set. - * @return This builder for chaining. - */ - public Builder setNumLocalSsds(int value) { - - numLocalSsds_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
-     * If SSDs are not attached, the boot disk is used to store runtime logs and
-     * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
-     * If one or more SSDs are attached, this runtime bulk
-     * data is spread across them, and the boot disk contains only basic
-     * config and installed binaries.
-     * 
- * - * int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNumLocalSsds() { - - numLocalSsds_ = 0; - onChanged(); - return this; - } - - private java.lang.Object localSsdInterface_ = ""; - /** - * - * - *
-     * Optional. Interface type of local SSDs (default is "scsi").
-     * Valid values: "scsi" (Small Computer System Interface),
-     * "nvme" (Non-Volatile Memory Express).
-     * See [local SSD
-     * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-     * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdInterface. - */ - public java.lang.String getLocalSsdInterface() { - java.lang.Object ref = localSsdInterface_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - localSsdInterface_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Interface type of local SSDs (default is "scsi").
-     * Valid values: "scsi" (Small Computer System Interface),
-     * "nvme" (Non-Volatile Memory Express).
-     * See [local SSD
-     * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-     * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for localSsdInterface. - */ - public com.google.protobuf.ByteString getLocalSsdInterfaceBytes() { - java.lang.Object ref = localSsdInterface_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - localSsdInterface_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Interface type of local SSDs (default is "scsi").
-     * Valid values: "scsi" (Small Computer System Interface),
-     * "nvme" (Non-Volatile Memory Express).
-     * See [local SSD
-     * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-     * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The localSsdInterface to set. - * @return This builder for chaining. - */ - public Builder setLocalSsdInterface(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - localSsdInterface_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Interface type of local SSDs (default is "scsi").
-     * Valid values: "scsi" (Small Computer System Interface),
-     * "nvme" (Non-Volatile Memory Express).
-     * See [local SSD
-     * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-     * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLocalSsdInterface() { - - localSsdInterface_ = getDefaultInstance().getLocalSsdInterface(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Interface type of local SSDs (default is "scsi").
-     * Valid values: "scsi" (Small Computer System Interface),
-     * "nvme" (Non-Volatile Memory Express).
-     * See [local SSD
-     * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-     * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for localSsdInterface to set. - * @return This builder for chaining. - */ - public Builder setLocalSsdInterfaceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - localSsdInterface_ = 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.dataproc.v1.DiskConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.DiskConfig) - private static final com.google.cloud.dataproc.v1.DiskConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.DiskConfig(); - } - - public static com.google.cloud.dataproc.v1.DiskConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DiskConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskConfig(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.dataproc.v1.DiskConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java deleted file mode 100644 index 050b28c8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface DiskConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.DiskConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Type of the boot disk (default is "pd-standard").
-   * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-   * "pd-ssd" (Persistent Disk Solid State Drive),
-   * or "pd-standard" (Persistent Disk Hard Disk Drive).
-   * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-   * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskType. - */ - java.lang.String getBootDiskType(); - /** - * - * - *
-   * Optional. Type of the boot disk (default is "pd-standard").
-   * Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive),
-   * "pd-ssd" (Persistent Disk Solid State Drive),
-   * or "pd-standard" (Persistent Disk Hard Disk Drive).
-   * See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types).
-   * 
- * - * string boot_disk_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for bootDiskType. - */ - com.google.protobuf.ByteString getBootDiskTypeBytes(); - - /** - * - * - *
-   * Optional. Size in GB of the boot disk (default is 500GB).
-   * 
- * - * int32 boot_disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bootDiskSizeGb. - */ - int getBootDiskSizeGb(); - - /** - * - * - *
-   * Optional. Number of attached SSDs, from 0 to 4 (default is 0).
-   * If SSDs are not attached, the boot disk is used to store runtime logs and
-   * [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data.
-   * If one or more SSDs are attached, this runtime bulk
-   * data is spread across them, and the boot disk contains only basic
-   * config and installed binaries.
-   * 
- * - * int32 num_local_ssds = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numLocalSsds. - */ - int getNumLocalSsds(); - - /** - * - * - *
-   * Optional. Interface type of local SSDs (default is "scsi").
-   * Valid values: "scsi" (Small Computer System Interface),
-   * "nvme" (Non-Volatile Memory Express).
-   * See [local SSD
-   * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-   * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdInterface. - */ - java.lang.String getLocalSsdInterface(); - /** - * - * - *
-   * Optional. Interface type of local SSDs (default is "scsi").
-   * Valid values: "scsi" (Small Computer System Interface),
-   * "nvme" (Non-Volatile Memory Express).
-   * See [local SSD
-   * performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance).
-   * 
- * - * string local_ssd_interface = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for localSsdInterface. - */ - com.google.protobuf.ByteString getLocalSsdInterfaceBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfig.java deleted file mode 100644 index 08ea3971..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfig.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Encryption settings for the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EncryptionConfig} - */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.EncryptionConfig) - EncryptionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EncryptionConfig.newBuilder() to construct. - private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EncryptionConfig() { - gcePdKmsKeyName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EncryptionConfig( - 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(); - - gcePdKmsKeyName_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EncryptionConfig.class, - com.google.cloud.dataproc.v1.EncryptionConfig.Builder.class); - } - - public static final int GCE_PD_KMS_KEY_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object gcePdKmsKeyName_; - /** - * - * - *
-   * Optional. The Cloud KMS key name to use for PD disk encryption for all
-   * instances in the cluster.
-   * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gcePdKmsKeyName. - */ - @java.lang.Override - public java.lang.String getGcePdKmsKeyName() { - java.lang.Object ref = gcePdKmsKeyName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcePdKmsKeyName_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud KMS key name to use for PD disk encryption for all
-   * instances in the cluster.
-   * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gcePdKmsKeyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGcePdKmsKeyNameBytes() { - java.lang.Object ref = gcePdKmsKeyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcePdKmsKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcePdKmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcePdKmsKeyName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcePdKmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcePdKmsKeyName_); - } - 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.dataproc.v1.EncryptionConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.EncryptionConfig other = - (com.google.cloud.dataproc.v1.EncryptionConfig) obj; - - if (!getGcePdKmsKeyName().equals(other.getGcePdKmsKeyName())) 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) + GCE_PD_KMS_KEY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getGcePdKmsKeyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig 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.dataproc.v1.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig parseFrom( - 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.dataproc.v1.EncryptionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig 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.dataproc.v1.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig 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.dataproc.v1.EncryptionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig 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.dataproc.v1.EncryptionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Encryption settings for the cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EncryptionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.EncryptionConfig) - com.google.cloud.dataproc.v1.EncryptionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EncryptionConfig.class, - com.google.cloud.dataproc.v1.EncryptionConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.EncryptionConfig.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(); - gcePdKmsKeyName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EncryptionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EncryptionConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.EncryptionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EncryptionConfig build() { - com.google.cloud.dataproc.v1.EncryptionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EncryptionConfig buildPartial() { - com.google.cloud.dataproc.v1.EncryptionConfig result = - new com.google.cloud.dataproc.v1.EncryptionConfig(this); - result.gcePdKmsKeyName_ = gcePdKmsKeyName_; - 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.dataproc.v1.EncryptionConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.EncryptionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.EncryptionConfig other) { - if (other == com.google.cloud.dataproc.v1.EncryptionConfig.getDefaultInstance()) return this; - if (!other.getGcePdKmsKeyName().isEmpty()) { - gcePdKmsKeyName_ = other.gcePdKmsKeyName_; - 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.dataproc.v1.EncryptionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.EncryptionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcePdKmsKeyName_ = ""; - /** - * - * - *
-     * Optional. The Cloud KMS key name to use for PD disk encryption for all
-     * instances in the cluster.
-     * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gcePdKmsKeyName. - */ - public java.lang.String getGcePdKmsKeyName() { - java.lang.Object ref = gcePdKmsKeyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gcePdKmsKeyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud KMS key name to use for PD disk encryption for all
-     * instances in the cluster.
-     * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gcePdKmsKeyName. - */ - public com.google.protobuf.ByteString getGcePdKmsKeyNameBytes() { - java.lang.Object ref = gcePdKmsKeyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gcePdKmsKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud KMS key name to use for PD disk encryption for all
-     * instances in the cluster.
-     * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The gcePdKmsKeyName to set. - * @return This builder for chaining. - */ - public Builder setGcePdKmsKeyName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gcePdKmsKeyName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud KMS key name to use for PD disk encryption for all
-     * instances in the cluster.
-     * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearGcePdKmsKeyName() { - - gcePdKmsKeyName_ = getDefaultInstance().getGcePdKmsKeyName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud KMS key name to use for PD disk encryption for all
-     * instances in the cluster.
-     * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for gcePdKmsKeyName to set. - * @return This builder for chaining. - */ - public Builder setGcePdKmsKeyNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gcePdKmsKeyName_ = 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.dataproc.v1.EncryptionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.EncryptionConfig) - private static final com.google.cloud.dataproc.v1.EncryptionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.EncryptionConfig(); - } - - public static com.google.cloud.dataproc.v1.EncryptionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EncryptionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EncryptionConfig(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.dataproc.v1.EncryptionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfigOrBuilder.java deleted file mode 100644 index 151b7c7e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfigOrBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface EncryptionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.EncryptionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The Cloud KMS key name to use for PD disk encryption for all
-   * instances in the cluster.
-   * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gcePdKmsKeyName. - */ - java.lang.String getGcePdKmsKeyName(); - /** - * - * - *
-   * Optional. The Cloud KMS key name to use for PD disk encryption for all
-   * instances in the cluster.
-   * 
- * - * string gce_pd_kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gcePdKmsKeyName. - */ - com.google.protobuf.ByteString getGcePdKmsKeyNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfig.java deleted file mode 100644 index da50cb51..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfig.java +++ /dev/null @@ -1,899 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Endpoint config for this cluster
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EndpointConfig} - */ -public final class EndpointConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.EndpointConfig) - EndpointConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndpointConfig.newBuilder() to construct. - private EndpointConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EndpointConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EndpointConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndpointConfig( - 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)) { - httpPorts_ = - com.google.protobuf.MapField.newMapField( - HttpPortsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry httpPorts__ = - input.readMessage( - HttpPortsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - httpPorts_.getMutableMap().put(httpPorts__.getKey(), httpPorts__.getValue()); - break; - } - case 16: - { - enableHttpPortAccess_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetHttpPorts(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EndpointConfig.class, - com.google.cloud.dataproc.v1.EndpointConfig.Builder.class); - } - - public static final int HTTP_PORTS_FIELD_NUMBER = 1; - - private static final class HttpPortsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_HttpPortsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField httpPorts_; - - private com.google.protobuf.MapField internalGetHttpPorts() { - if (httpPorts_ == null) { - return com.google.protobuf.MapField.emptyMapField(HttpPortsDefaultEntryHolder.defaultEntry); - } - return httpPorts_; - } - - public int getHttpPortsCount() { - return internalGetHttpPorts().getMap().size(); - } - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public boolean containsHttpPorts(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetHttpPorts().getMap().containsKey(key); - } - /** Use {@link #getHttpPortsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHttpPorts() { - return getHttpPortsMap(); - } - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getHttpPortsMap() { - return internalGetHttpPorts().getMap(); - } - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getHttpPortsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHttpPorts().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getHttpPortsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHttpPorts().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ENABLE_HTTP_PORT_ACCESS_FIELD_NUMBER = 2; - private boolean enableHttpPortAccess_; - /** - * - * - *
-   * Optional. If true, enable http access to specific ports on the cluster
-   * from external sources. Defaults to false.
-   * 
- * - * bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableHttpPortAccess. - */ - @java.lang.Override - public boolean getEnableHttpPortAccess() { - return enableHttpPortAccess_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetHttpPorts(), HttpPortsDefaultEntryHolder.defaultEntry, 1); - if (enableHttpPortAccess_ != false) { - output.writeBool(2, enableHttpPortAccess_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetHttpPorts().getMap().entrySet()) { - com.google.protobuf.MapEntry httpPorts__ = - HttpPortsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, httpPorts__); - } - if (enableHttpPortAccess_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableHttpPortAccess_); - } - 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.dataproc.v1.EndpointConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.EndpointConfig other = - (com.google.cloud.dataproc.v1.EndpointConfig) obj; - - if (!internalGetHttpPorts().equals(other.internalGetHttpPorts())) return false; - if (getEnableHttpPortAccess() != other.getEnableHttpPortAccess()) 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 (!internalGetHttpPorts().getMap().isEmpty()) { - hash = (37 * hash) + HTTP_PORTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetHttpPorts().hashCode(); - } - hash = (37 * hash) + ENABLE_HTTP_PORT_ACCESS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHttpPortAccess()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.EndpointConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig 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.dataproc.v1.EndpointConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig parseFrom( - 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.dataproc.v1.EndpointConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig 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.dataproc.v1.EndpointConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig 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.dataproc.v1.EndpointConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig 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.dataproc.v1.EndpointConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Endpoint config for this cluster
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EndpointConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.EndpointConfig) - com.google.cloud.dataproc.v1.EndpointConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetHttpPorts(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableHttpPorts(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EndpointConfig.class, - com.google.cloud.dataproc.v1.EndpointConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.EndpointConfig.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(); - internalGetMutableHttpPorts().clear(); - enableHttpPortAccess_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EndpointConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.EndpointConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EndpointConfig build() { - com.google.cloud.dataproc.v1.EndpointConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EndpointConfig buildPartial() { - com.google.cloud.dataproc.v1.EndpointConfig result = - new com.google.cloud.dataproc.v1.EndpointConfig(this); - int from_bitField0_ = bitField0_; - result.httpPorts_ = internalGetHttpPorts(); - result.httpPorts_.makeImmutable(); - result.enableHttpPortAccess_ = enableHttpPortAccess_; - 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.dataproc.v1.EndpointConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.EndpointConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.EndpointConfig other) { - if (other == com.google.cloud.dataproc.v1.EndpointConfig.getDefaultInstance()) return this; - internalGetMutableHttpPorts().mergeFrom(other.internalGetHttpPorts()); - if (other.getEnableHttpPortAccess() != false) { - setEnableHttpPortAccess(other.getEnableHttpPortAccess()); - } - 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.dataproc.v1.EndpointConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.EndpointConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField httpPorts_; - - private com.google.protobuf.MapField - internalGetHttpPorts() { - if (httpPorts_ == null) { - return com.google.protobuf.MapField.emptyMapField(HttpPortsDefaultEntryHolder.defaultEntry); - } - return httpPorts_; - } - - private com.google.protobuf.MapField - internalGetMutableHttpPorts() { - onChanged(); - ; - if (httpPorts_ == null) { - httpPorts_ = - com.google.protobuf.MapField.newMapField(HttpPortsDefaultEntryHolder.defaultEntry); - } - if (!httpPorts_.isMutable()) { - httpPorts_ = httpPorts_.copy(); - } - return httpPorts_; - } - - public int getHttpPortsCount() { - return internalGetHttpPorts().getMap().size(); - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public boolean containsHttpPorts(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetHttpPorts().getMap().containsKey(key); - } - /** Use {@link #getHttpPortsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getHttpPorts() { - return getHttpPortsMap(); - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getHttpPortsMap() { - return internalGetHttpPorts().getMap(); - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getHttpPortsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHttpPorts().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getHttpPortsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetHttpPorts().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearHttpPorts() { - internalGetMutableHttpPorts().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeHttpPorts(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableHttpPorts().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableHttpPorts() { - return internalGetMutableHttpPorts().getMutableMap(); - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder putHttpPorts(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableHttpPorts().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Output only. The map of port descriptions to URLs. Will only be populated
-     * if enable_http_port_access is true.
-     * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder putAllHttpPorts(java.util.Map values) { - internalGetMutableHttpPorts().getMutableMap().putAll(values); - return this; - } - - private boolean enableHttpPortAccess_; - /** - * - * - *
-     * Optional. If true, enable http access to specific ports on the cluster
-     * from external sources. Defaults to false.
-     * 
- * - * bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableHttpPortAccess. - */ - @java.lang.Override - public boolean getEnableHttpPortAccess() { - return enableHttpPortAccess_; - } - /** - * - * - *
-     * Optional. If true, enable http access to specific ports on the cluster
-     * from external sources. Defaults to false.
-     * 
- * - * bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableHttpPortAccess to set. - * @return This builder for chaining. - */ - public Builder setEnableHttpPortAccess(boolean value) { - - enableHttpPortAccess_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If true, enable http access to specific ports on the cluster
-     * from external sources. Defaults to false.
-     * 
- * - * bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableHttpPortAccess() { - - enableHttpPortAccess_ = 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.dataproc.v1.EndpointConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.EndpointConfig) - private static final com.google.cloud.dataproc.v1.EndpointConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.EndpointConfig(); - } - - public static com.google.cloud.dataproc.v1.EndpointConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EndpointConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EndpointConfig(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.dataproc.v1.EndpointConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfigOrBuilder.java deleted file mode 100644 index 8e8f93fc..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfigOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface EndpointConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.EndpointConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getHttpPortsCount(); - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - boolean containsHttpPorts(java.lang.String key); - /** Use {@link #getHttpPortsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getHttpPorts(); - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.Map getHttpPortsMap(); - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getHttpPortsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Output only. The map of port descriptions to URLs. Will only be populated
-   * if enable_http_port_access is true.
-   * 
- * - * map<string, string> http_ports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getHttpPortsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. If true, enable http access to specific ports on the cluster
-   * from external sources. Defaults to false.
-   * 
- * - * bool enable_http_port_access = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableHttpPortAccess. - */ - boolean getEnableHttpPortAccess(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfig.java deleted file mode 100644 index 3c01d524..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfig.java +++ /dev/null @@ -1,1058 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Environment configuration for a workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EnvironmentConfig} - */ -public final class EnvironmentConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.EnvironmentConfig) - EnvironmentConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use EnvironmentConfig.newBuilder() to construct. - private EnvironmentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private EnvironmentConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EnvironmentConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EnvironmentConfig( - 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.dataproc.v1.ExecutionConfig.Builder subBuilder = null; - if (executionConfig_ != null) { - subBuilder = executionConfig_.toBuilder(); - } - executionConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.ExecutionConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionConfig_); - executionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder subBuilder = null; - if (peripheralsConfig_ != null) { - subBuilder = peripheralsConfig_.toBuilder(); - } - peripheralsConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.PeripheralsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(peripheralsConfig_); - peripheralsConfig_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_EnvironmentConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EnvironmentConfig.class, - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder.class); - } - - public static final int EXECUTION_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.ExecutionConfig executionConfig_; - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionConfig field is set. - */ - @java.lang.Override - public boolean hasExecutionConfig() { - return executionConfig_ != null; - } - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ExecutionConfig getExecutionConfig() { - return executionConfig_ == null - ? com.google.cloud.dataproc.v1.ExecutionConfig.getDefaultInstance() - : executionConfig_; - } - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder getExecutionConfigOrBuilder() { - return getExecutionConfig(); - } - - public static final int PERIPHERALS_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.PeripheralsConfig peripheralsConfig_; - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the peripheralsConfig field is set. - */ - @java.lang.Override - public boolean hasPeripheralsConfig() { - return peripheralsConfig_ != null; - } - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The peripheralsConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PeripheralsConfig getPeripheralsConfig() { - return peripheralsConfig_ == null - ? com.google.cloud.dataproc.v1.PeripheralsConfig.getDefaultInstance() - : peripheralsConfig_; - } - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder getPeripheralsConfigOrBuilder() { - return getPeripheralsConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (executionConfig_ != null) { - output.writeMessage(1, getExecutionConfig()); - } - if (peripheralsConfig_ != null) { - output.writeMessage(2, getPeripheralsConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (executionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExecutionConfig()); - } - if (peripheralsConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPeripheralsConfig()); - } - 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.dataproc.v1.EnvironmentConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.EnvironmentConfig other = - (com.google.cloud.dataproc.v1.EnvironmentConfig) obj; - - if (hasExecutionConfig() != other.hasExecutionConfig()) return false; - if (hasExecutionConfig()) { - if (!getExecutionConfig().equals(other.getExecutionConfig())) return false; - } - if (hasPeripheralsConfig() != other.hasPeripheralsConfig()) return false; - if (hasPeripheralsConfig()) { - if (!getPeripheralsConfig().equals(other.getPeripheralsConfig())) 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 (hasExecutionConfig()) { - hash = (37 * hash) + EXECUTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getExecutionConfig().hashCode(); - } - if (hasPeripheralsConfig()) { - hash = (37 * hash) + PERIPHERALS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getPeripheralsConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig 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.dataproc.v1.EnvironmentConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig parseFrom( - 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.dataproc.v1.EnvironmentConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig 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.dataproc.v1.EnvironmentConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig 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.dataproc.v1.EnvironmentConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig 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.dataproc.v1.EnvironmentConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Environment configuration for a workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.EnvironmentConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.EnvironmentConfig) - com.google.cloud.dataproc.v1.EnvironmentConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_EnvironmentConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.EnvironmentConfig.class, - com.google.cloud.dataproc.v1.EnvironmentConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.EnvironmentConfig.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 (executionConfigBuilder_ == null) { - executionConfig_ = null; - } else { - executionConfig_ = null; - executionConfigBuilder_ = null; - } - if (peripheralsConfigBuilder_ == null) { - peripheralsConfig_ = null; - } else { - peripheralsConfig_ = null; - peripheralsConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EnvironmentConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.EnvironmentConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EnvironmentConfig build() { - com.google.cloud.dataproc.v1.EnvironmentConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.EnvironmentConfig buildPartial() { - com.google.cloud.dataproc.v1.EnvironmentConfig result = - new com.google.cloud.dataproc.v1.EnvironmentConfig(this); - if (executionConfigBuilder_ == null) { - result.executionConfig_ = executionConfig_; - } else { - result.executionConfig_ = executionConfigBuilder_.build(); - } - if (peripheralsConfigBuilder_ == null) { - result.peripheralsConfig_ = peripheralsConfig_; - } else { - result.peripheralsConfig_ = peripheralsConfigBuilder_.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.dataproc.v1.EnvironmentConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.EnvironmentConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.EnvironmentConfig other) { - if (other == com.google.cloud.dataproc.v1.EnvironmentConfig.getDefaultInstance()) return this; - if (other.hasExecutionConfig()) { - mergeExecutionConfig(other.getExecutionConfig()); - } - if (other.hasPeripheralsConfig()) { - mergePeripheralsConfig(other.getPeripheralsConfig()); - } - 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.dataproc.v1.EnvironmentConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.EnvironmentConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.ExecutionConfig executionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ExecutionConfig, - com.google.cloud.dataproc.v1.ExecutionConfig.Builder, - com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder> - executionConfigBuilder_; - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionConfig field is set. - */ - public boolean hasExecutionConfig() { - return executionConfigBuilder_ != null || executionConfig_ != null; - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionConfig. - */ - public com.google.cloud.dataproc.v1.ExecutionConfig getExecutionConfig() { - if (executionConfigBuilder_ == null) { - return executionConfig_ == null - ? com.google.cloud.dataproc.v1.ExecutionConfig.getDefaultInstance() - : executionConfig_; - } else { - return executionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutionConfig(com.google.cloud.dataproc.v1.ExecutionConfig value) { - if (executionConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - executionConfig_ = value; - onChanged(); - } else { - executionConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutionConfig( - com.google.cloud.dataproc.v1.ExecutionConfig.Builder builderForValue) { - if (executionConfigBuilder_ == null) { - executionConfig_ = builderForValue.build(); - onChanged(); - } else { - executionConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeExecutionConfig(com.google.cloud.dataproc.v1.ExecutionConfig value) { - if (executionConfigBuilder_ == null) { - if (executionConfig_ != null) { - executionConfig_ = - com.google.cloud.dataproc.v1.ExecutionConfig.newBuilder(executionConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - executionConfig_ = value; - } - onChanged(); - } else { - executionConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearExecutionConfig() { - if (executionConfigBuilder_ == null) { - executionConfig_ = null; - onChanged(); - } else { - executionConfig_ = null; - executionConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ExecutionConfig.Builder getExecutionConfigBuilder() { - - onChanged(); - return getExecutionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder getExecutionConfigOrBuilder() { - if (executionConfigBuilder_ != null) { - return executionConfigBuilder_.getMessageOrBuilder(); - } else { - return executionConfig_ == null - ? com.google.cloud.dataproc.v1.ExecutionConfig.getDefaultInstance() - : executionConfig_; - } - } - /** - * - * - *
-     * Optional. Execution configuration for a workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ExecutionConfig, - com.google.cloud.dataproc.v1.ExecutionConfig.Builder, - com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder> - getExecutionConfigFieldBuilder() { - if (executionConfigBuilder_ == null) { - executionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ExecutionConfig, - com.google.cloud.dataproc.v1.ExecutionConfig.Builder, - com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder>( - getExecutionConfig(), getParentForChildren(), isClean()); - executionConfig_ = null; - } - return executionConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.PeripheralsConfig peripheralsConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PeripheralsConfig, - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder, - com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder> - peripheralsConfigBuilder_; - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the peripheralsConfig field is set. - */ - public boolean hasPeripheralsConfig() { - return peripheralsConfigBuilder_ != null || peripheralsConfig_ != null; - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The peripheralsConfig. - */ - public com.google.cloud.dataproc.v1.PeripheralsConfig getPeripheralsConfig() { - if (peripheralsConfigBuilder_ == null) { - return peripheralsConfig_ == null - ? com.google.cloud.dataproc.v1.PeripheralsConfig.getDefaultInstance() - : peripheralsConfig_; - } else { - return peripheralsConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPeripheralsConfig(com.google.cloud.dataproc.v1.PeripheralsConfig value) { - if (peripheralsConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - peripheralsConfig_ = value; - onChanged(); - } else { - peripheralsConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPeripheralsConfig( - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder builderForValue) { - if (peripheralsConfigBuilder_ == null) { - peripheralsConfig_ = builderForValue.build(); - onChanged(); - } else { - peripheralsConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePeripheralsConfig(com.google.cloud.dataproc.v1.PeripheralsConfig value) { - if (peripheralsConfigBuilder_ == null) { - if (peripheralsConfig_ != null) { - peripheralsConfig_ = - com.google.cloud.dataproc.v1.PeripheralsConfig.newBuilder(peripheralsConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - peripheralsConfig_ = value; - } - onChanged(); - } else { - peripheralsConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPeripheralsConfig() { - if (peripheralsConfigBuilder_ == null) { - peripheralsConfig_ = null; - onChanged(); - } else { - peripheralsConfig_ = null; - peripheralsConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PeripheralsConfig.Builder getPeripheralsConfigBuilder() { - - onChanged(); - return getPeripheralsConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder getPeripheralsConfigOrBuilder() { - if (peripheralsConfigBuilder_ != null) { - return peripheralsConfigBuilder_.getMessageOrBuilder(); - } else { - return peripheralsConfig_ == null - ? com.google.cloud.dataproc.v1.PeripheralsConfig.getDefaultInstance() - : peripheralsConfig_; - } - } - /** - * - * - *
-     * Optional. Peripherals configuration that workload has access to.
-     * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PeripheralsConfig, - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder, - com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder> - getPeripheralsConfigFieldBuilder() { - if (peripheralsConfigBuilder_ == null) { - peripheralsConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PeripheralsConfig, - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder, - com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder>( - getPeripheralsConfig(), getParentForChildren(), isClean()); - peripheralsConfig_ = null; - } - return peripheralsConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.EnvironmentConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.EnvironmentConfig) - private static final com.google.cloud.dataproc.v1.EnvironmentConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.EnvironmentConfig(); - } - - public static com.google.cloud.dataproc.v1.EnvironmentConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EnvironmentConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EnvironmentConfig(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.dataproc.v1.EnvironmentConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfigOrBuilder.java deleted file mode 100644 index 3ffbd5d8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EnvironmentConfigOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface EnvironmentConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.EnvironmentConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionConfig field is set. - */ - boolean hasExecutionConfig(); - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionConfig. - */ - com.google.cloud.dataproc.v1.ExecutionConfig getExecutionConfig(); - /** - * - * - *
-   * Optional. Execution configuration for a workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.ExecutionConfig execution_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder getExecutionConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the peripheralsConfig field is set. - */ - boolean hasPeripheralsConfig(); - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The peripheralsConfig. - */ - com.google.cloud.dataproc.v1.PeripheralsConfig getPeripheralsConfig(); - /** - * - * - *
-   * Optional. Peripherals configuration that workload has access to.
-   * 
- * - * - * .google.cloud.dataproc.v1.PeripheralsConfig peripherals_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder getPeripheralsConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfig.java deleted file mode 100644 index 3e17a568..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfig.java +++ /dev/null @@ -1,1640 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Execution configuration for a workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ExecutionConfig} - */ -public final class ExecutionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ExecutionConfig) - ExecutionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExecutionConfig.newBuilder() to construct. - private ExecutionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExecutionConfig() { - serviceAccount_ = ""; - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - kmsKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecutionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExecutionConfig( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - networkCase_ = 4; - network_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - networkCase_ = 5; - network_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkTags_.add(s); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKey_ = 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)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_ExecutionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ExecutionConfig.class, - com.google.cloud.dataproc.v1.ExecutionConfig.Builder.class); - } - - private int networkCase_ = 0; - private java.lang.Object network_; - - public enum NetworkCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NETWORK_URI(4), - SUBNETWORK_URI(5), - NETWORK_NOT_SET(0); - private final int value; - - private NetworkCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NetworkCase valueOf(int value) { - return forNumber(value); - } - - public static NetworkCase forNumber(int value) { - switch (value) { - case 4: - return NETWORK_URI; - case 5: - return SUBNETWORK_URI; - case 0: - return NETWORK_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public NetworkCase getNetworkCase() { - return NetworkCase.forNumber(networkCase_); - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 2; - private volatile java.lang.Object serviceAccount_; - /** - * - * - *
-   * Optional. Service account that used to execute workload.
-   * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - @java.lang.Override - 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; - } - } - /** - * - * - *
-   * Optional. Service account that used to execute workload.
-   * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - @java.lang.Override - 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 NETWORK_URI_FIELD_NUMBER = 4; - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the networkUri field is set. - */ - public boolean hasNetworkUri() { - return networkCase_ == 4; - } - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - public java.lang.String getNetworkUri() { - java.lang.Object ref = ""; - if (networkCase_ == 4) { - 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(); - if (networkCase_ == 4) { - network_ = s; - } - return s; - } - } - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - public com.google.protobuf.ByteString getNetworkUriBytes() { - java.lang.Object ref = ""; - if (networkCase_ == 4) { - ref = network_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (networkCase_ == 4) { - network_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBNETWORK_URI_FIELD_NUMBER = 5; - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the subnetworkUri field is set. - */ - public boolean hasSubnetworkUri() { - return networkCase_ == 5; - } - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - public java.lang.String getSubnetworkUri() { - java.lang.Object ref = ""; - if (networkCase_ == 5) { - 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(); - if (networkCase_ == 5) { - network_ = s; - } - return s; - } - } - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - public com.google.protobuf.ByteString getSubnetworkUriBytes() { - java.lang.Object ref = ""; - if (networkCase_ == 5) { - ref = network_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (networkCase_ == 5) { - network_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NETWORK_TAGS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList networkTags_; - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList getNetworkTagsList() { - return networkTags_; - } - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - - public static final int KMS_KEY_FIELD_NUMBER = 7; - private volatile java.lang.Object kmsKey_; - /** - * - * - *
-   * Optional. The Cloud KMS key to use for encryption.
-   * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKey. - */ - @java.lang.Override - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud KMS key to use for encryption.
-   * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccount_); - } - if (networkCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, network_); - } - if (networkCase_ == 5) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, network_); - } - for (int i = 0; i < networkTags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, networkTags_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, kmsKey_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccount_); - } - if (networkCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, network_); - } - if (networkCase_ == 5) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, network_); - } - { - int dataSize = 0; - for (int i = 0; i < networkTags_.size(); i++) { - dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); - } - size += dataSize; - size += 1 * getNetworkTagsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, kmsKey_); - } - 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.dataproc.v1.ExecutionConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ExecutionConfig other = - (com.google.cloud.dataproc.v1.ExecutionConfig) obj; - - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; - if (!getKmsKey().equals(other.getKmsKey())) return false; - if (!getNetworkCase().equals(other.getNetworkCase())) return false; - switch (networkCase_) { - case 4: - if (!getNetworkUri().equals(other.getNetworkUri())) return false; - break; - case 5: - if (!getSubnetworkUri().equals(other.getSubnetworkUri())) return false; - break; - case 0: - default: - } - 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) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - if (getNetworkTagsCount() > 0) { - hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; - hash = (53 * hash) + getNetworkTagsList().hashCode(); - } - hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; - hash = (53 * hash) + getKmsKey().hashCode(); - switch (networkCase_) { - case 4: - hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; - hash = (53 * hash) + getNetworkUri().hashCode(); - break; - case 5: - hash = (37 * hash) + SUBNETWORK_URI_FIELD_NUMBER; - hash = (53 * hash) + getSubnetworkUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig 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.dataproc.v1.ExecutionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig parseFrom( - 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.dataproc.v1.ExecutionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig 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.dataproc.v1.ExecutionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig 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.dataproc.v1.ExecutionConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig 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.dataproc.v1.ExecutionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Execution configuration for a workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ExecutionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ExecutionConfig) - com.google.cloud.dataproc.v1.ExecutionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_ExecutionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ExecutionConfig.class, - com.google.cloud.dataproc.v1.ExecutionConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ExecutionConfig.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(); - serviceAccount_ = ""; - - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - kmsKey_ = ""; - - networkCase_ = 0; - network_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ExecutionConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ExecutionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ExecutionConfig build() { - com.google.cloud.dataproc.v1.ExecutionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ExecutionConfig buildPartial() { - com.google.cloud.dataproc.v1.ExecutionConfig result = - new com.google.cloud.dataproc.v1.ExecutionConfig(this); - int from_bitField0_ = bitField0_; - result.serviceAccount_ = serviceAccount_; - if (networkCase_ == 4) { - result.network_ = network_; - } - if (networkCase_ == 5) { - result.network_ = network_; - } - if (((bitField0_ & 0x00000001) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.networkTags_ = networkTags_; - result.kmsKey_ = kmsKey_; - result.networkCase_ = networkCase_; - 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.dataproc.v1.ExecutionConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.ExecutionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ExecutionConfig other) { - if (other == com.google.cloud.dataproc.v1.ExecutionConfig.getDefaultInstance()) return this; - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - onChanged(); - } - if (!other.networkTags_.isEmpty()) { - if (networkTags_.isEmpty()) { - networkTags_ = other.networkTags_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNetworkTagsIsMutable(); - networkTags_.addAll(other.networkTags_); - } - onChanged(); - } - if (!other.getKmsKey().isEmpty()) { - kmsKey_ = other.kmsKey_; - onChanged(); - } - switch (other.getNetworkCase()) { - case NETWORK_URI: - { - networkCase_ = 4; - network_ = other.network_; - onChanged(); - break; - } - case SUBNETWORK_URI: - { - networkCase_ = 5; - network_ = other.network_; - onChanged(); - break; - } - case NETWORK_NOT_SET: - { - break; - } - } - 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.dataproc.v1.ExecutionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ExecutionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int networkCase_ = 0; - private java.lang.Object network_; - - public NetworkCase getNetworkCase() { - return NetworkCase.forNumber(networkCase_); - } - - public Builder clearNetwork() { - networkCase_ = 0; - network_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * Optional. Service account that used to execute workload.
-     * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - 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; - } - } - /** - * - * - *
-     * Optional. Service account that used to execute workload.
-     * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - 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; - } - } - /** - * - * - *
-     * Optional. Service account that used to execute workload.
-     * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccount(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceAccount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Service account that used to execute workload.
-     * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccount() { - - serviceAccount_ = getDefaultInstance().getServiceAccount(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Service account that used to execute workload.
-     * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - serviceAccount_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the networkUri field is set. - */ - @java.lang.Override - public boolean hasNetworkUri() { - return networkCase_ == 4; - } - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - @java.lang.Override - public java.lang.String getNetworkUri() { - java.lang.Object ref = ""; - if (networkCase_ == 4) { - ref = network_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (networkCase_ == 4) { - network_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkUriBytes() { - java.lang.Object ref = ""; - if (networkCase_ == 4) { - ref = network_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (networkCase_ == 4) { - network_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The networkUri to set. - * @return This builder for chaining. - */ - public Builder setNetworkUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - networkCase_ = 4; - network_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNetworkUri() { - if (networkCase_ == 4) { - networkCase_ = 0; - network_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Optional. Network URI to connect workload to.
-     * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for networkUri to set. - * @return This builder for chaining. - */ - public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - networkCase_ = 4; - network_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the subnetworkUri field is set. - */ - @java.lang.Override - public boolean hasSubnetworkUri() { - return networkCase_ == 5; - } - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - @java.lang.Override - public java.lang.String getSubnetworkUri() { - java.lang.Object ref = ""; - if (networkCase_ == 5) { - ref = network_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (networkCase_ == 5) { - network_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkUriBytes() { - java.lang.Object ref = ""; - if (networkCase_ == 5) { - ref = network_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (networkCase_ == 5) { - network_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The subnetworkUri to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - networkCase_ = 5; - network_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearSubnetworkUri() { - if (networkCase_ == 5) { - networkCase_ = 0; - network_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Optional. Subnetwork URI to connect workload to.
-     * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for subnetworkUri to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - networkCase_ = 5; - network_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList networkTags_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureNetworkTagsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList getNetworkTagsList() { - return networkTags_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The networkTags to set. - * @return This builder for chaining. - */ - public Builder setNetworkTags(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTags(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The networkTags to add. - * @return This builder for chaining. - */ - public Builder addAllNetworkTags(java.lang.Iterable values) { - ensureNetworkTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNetworkTags() { - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Tags used for network traffic control.
-     * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - - private java.lang.Object kmsKey_ = ""; - /** - * - * - *
-     * Optional. The Cloud KMS key to use for encryption.
-     * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKey. - */ - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud KMS key to use for encryption.
-     * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKey. - */ - public com.google.protobuf.ByteString getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud KMS key to use for encryption.
-     * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kmsKey_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud KMS key to use for encryption.
-     * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKmsKey() { - - kmsKey_ = getDefaultInstance().getKmsKey(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud KMS key to use for encryption.
-     * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kmsKey_ = 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.dataproc.v1.ExecutionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ExecutionConfig) - private static final com.google.cloud.dataproc.v1.ExecutionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ExecutionConfig(); - } - - public static com.google.cloud.dataproc.v1.ExecutionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExecutionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExecutionConfig(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.dataproc.v1.ExecutionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfigOrBuilder.java deleted file mode 100644 index 51aab728..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ExecutionConfigOrBuilder.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface ExecutionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ExecutionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Service account that used to execute workload.
-   * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - java.lang.String getServiceAccount(); - /** - * - * - *
-   * Optional. Service account that used to execute workload.
-   * 
- * - * string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the networkUri field is set. - */ - boolean hasNetworkUri(); - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - java.lang.String getNetworkUri(); - /** - * - * - *
-   * Optional. Network URI to connect workload to.
-   * 
- * - * string network_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - com.google.protobuf.ByteString getNetworkUriBytes(); - - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the subnetworkUri field is set. - */ - boolean hasSubnetworkUri(); - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - java.lang.String getSubnetworkUri(); - /** - * - * - *
-   * Optional. Subnetwork URI to connect workload to.
-   * 
- * - * string subnetwork_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - com.google.protobuf.ByteString getSubnetworkUriBytes(); - - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the networkTags. - */ - java.util.List getNetworkTagsList(); - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of networkTags. - */ - int getNetworkTagsCount(); - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - java.lang.String getNetworkTags(int index); - /** - * - * - *
-   * Optional. Tags used for network traffic control.
-   * 
- * - * repeated string network_tags = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - com.google.protobuf.ByteString getNetworkTagsBytes(int index); - - /** - * - * - *
-   * Optional. The Cloud KMS key to use for encryption.
-   * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKey. - */ - java.lang.String getKmsKey(); - /** - * - * - *
-   * Optional. The Cloud KMS key to use for encryption.
-   * 
- * - * string kms_key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKey. - */ - com.google.protobuf.ByteString getKmsKeyBytes(); - - public com.google.cloud.dataproc.v1.ExecutionConfig.NetworkCase getNetworkCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/FailureAction.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/FailureAction.java deleted file mode 100644 index b6a86610..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/FailureAction.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Actions in response to failure of a resource associated with a cluster.
- * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.FailureAction} - */ -public enum FailureAction implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * When FailureAction is unspecified, failure action defaults to NO_ACTION.
-   * 
- * - * FAILURE_ACTION_UNSPECIFIED = 0; - */ - FAILURE_ACTION_UNSPECIFIED(0), - /** - * - * - *
-   * Take no action on failure to create a cluster resource. NO_ACTION is the
-   * default.
-   * 
- * - * NO_ACTION = 1; - */ - NO_ACTION(1), - /** - * - * - *
-   * Delete the failed cluster resource.
-   * 
- * - * DELETE = 2; - */ - DELETE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-   * When FailureAction is unspecified, failure action defaults to NO_ACTION.
-   * 
- * - * FAILURE_ACTION_UNSPECIFIED = 0; - */ - public static final int FAILURE_ACTION_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Take no action on failure to create a cluster resource. NO_ACTION is the
-   * default.
-   * 
- * - * NO_ACTION = 1; - */ - public static final int NO_ACTION_VALUE = 1; - /** - * - * - *
-   * Delete the failed cluster resource.
-   * 
- * - * DELETE = 2; - */ - public static final int DELETE_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 FailureAction 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 FailureAction forNumber(int value) { - switch (value) { - case 0: - return FAILURE_ACTION_UNSPECIFIED; - case 1: - return NO_ACTION; - case 2: - return DELETE; - 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 FailureAction findValueByNumber(int number) { - return FailureAction.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.dataproc.v1.SharedProto.getDescriptor().getEnumTypes().get(1); - } - - private static final FailureAction[] VALUES = values(); - - public static FailureAction 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 FailureAction(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.FailureAction) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java deleted file mode 100644 index fb7e418e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java +++ /dev/null @@ -1,4189 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Common config settings for resources of Compute Engine cluster
- * instances, applicable to all instances in the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GceClusterConfig} - */ -public final class GceClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GceClusterConfig) - GceClusterConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GceClusterConfig.newBuilder() to construct. - private GceClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GceClusterConfig() { - zoneUri_ = ""; - networkUri_ = ""; - subnetworkUri_ = ""; - privateIpv6GoogleAccess_ = 0; - serviceAccount_ = ""; - serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GceClusterConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GceClusterConfig( - 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(); - - zoneUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - serviceAccountScopes_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - tags_.add(s); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetworkUri_ = s; - break; - } - case 56: - { - internalIpOnly_ = input.readBool(); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 90: - { - com.google.cloud.dataproc.v1.ReservationAffinity.Builder subBuilder = null; - if (reservationAffinity_ != null) { - subBuilder = reservationAffinity_.toBuilder(); - } - reservationAffinity_ = - input.readMessage( - com.google.cloud.dataproc.v1.ReservationAffinity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationAffinity_); - reservationAffinity_ = subBuilder.buildPartial(); - } - - break; - } - case 96: - { - int rawValue = input.readEnum(); - - privateIpv6GoogleAccess_ = rawValue; - break; - } - case 106: - { - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder subBuilder = null; - if (nodeGroupAffinity_ != null) { - subBuilder = nodeGroupAffinity_.toBuilder(); - } - nodeGroupAffinity_ = - input.readMessage( - com.google.cloud.dataproc.v1.NodeGroupAffinity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupAffinity_); - nodeGroupAffinity_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder subBuilder = null; - if (shieldedInstanceConfig_ != null) { - subBuilder = shieldedInstanceConfig_.toBuilder(); - } - shieldedInstanceConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceConfig_); - shieldedInstanceConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder subBuilder = null; - if (confidentialInstanceConfig_ != null) { - subBuilder = confidentialInstanceConfig_.toBuilder(); - } - confidentialInstanceConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confidentialInstanceConfig_); - confidentialInstanceConfig_ = 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_ & 0x00000001) != 0)) { - serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GceClusterConfig.class, - com.google.cloud.dataproc.v1.GceClusterConfig.Builder.class); - } - - /** - * - * - *
-   * `PrivateIpv6GoogleAccess` controls whether and how Dataproc cluster nodes
-   * can communicate with Google Services through gRPC over IPv6.
-   * These values are directly mapped to corresponding values in the
-   * [Compute Engine Instance
-   * fields](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess} - */ - public enum PrivateIpv6GoogleAccess implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * If unspecified, Compute Engine default behavior will apply, which
-     * is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
-     * 
- * - * PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - */ - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED(0), - /** - * - * - *
-     * Private access to and from Google Services configuration
-     * inherited from the subnetwork configuration. This is the
-     * default Compute Engine behavior.
-     * 
- * - * INHERIT_FROM_SUBNETWORK = 1; - */ - INHERIT_FROM_SUBNETWORK(1), - /** - * - * - *
-     * Enables outbound private IPv6 access to Google Services from the Dataproc
-     * cluster.
-     * 
- * - * OUTBOUND = 2; - */ - OUTBOUND(2), - /** - * - * - *
-     * Enables bidirectional private IPv6 access between Google Services and the
-     * Dataproc cluster.
-     * 
- * - * BIDIRECTIONAL = 3; - */ - BIDIRECTIONAL(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * If unspecified, Compute Engine default behavior will apply, which
-     * is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK].
-     * 
- * - * PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - */ - public static final int PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Private access to and from Google Services configuration
-     * inherited from the subnetwork configuration. This is the
-     * default Compute Engine behavior.
-     * 
- * - * INHERIT_FROM_SUBNETWORK = 1; - */ - public static final int INHERIT_FROM_SUBNETWORK_VALUE = 1; - /** - * - * - *
-     * Enables outbound private IPv6 access to Google Services from the Dataproc
-     * cluster.
-     * 
- * - * OUTBOUND = 2; - */ - public static final int OUTBOUND_VALUE = 2; - /** - * - * - *
-     * Enables bidirectional private IPv6 access between Google Services and the
-     * Dataproc cluster.
-     * 
- * - * BIDIRECTIONAL = 3; - */ - public static final int BIDIRECTIONAL_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 PrivateIpv6GoogleAccess 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 PrivateIpv6GoogleAccess forNumber(int value) { - switch (value) { - case 0: - return PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED; - case 1: - return INHERIT_FROM_SUBNETWORK; - case 2: - return OUTBOUND; - case 3: - return BIDIRECTIONAL; - 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 PrivateIpv6GoogleAccess findValueByNumber(int number) { - return PrivateIpv6GoogleAccess.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.dataproc.v1.GceClusterConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final PrivateIpv6GoogleAccess[] VALUES = values(); - - public static PrivateIpv6GoogleAccess 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 PrivateIpv6GoogleAccess(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess) - } - - public static final int ZONE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object zoneUri_; - /** - * - * - *
-   * Optional. The zone where the Compute Engine cluster will be located.
-   * On a create request, it is required in the "global" region. If omitted
-   * in a non-global Dataproc region, the service will pick a zone in the
-   * corresponding Compute Engine region. On a get request, zone will
-   * always be present.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-   * * `projects/[project_id]/zones/[zone]`
-   * * `us-central1-f`
-   * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The zoneUri. - */ - @java.lang.Override - public java.lang.String getZoneUri() { - java.lang.Object ref = zoneUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - zoneUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The zone where the Compute Engine cluster will be located.
-   * On a create request, it is required in the "global" region. If omitted
-   * in a non-global Dataproc region, the service will pick a zone in the
-   * corresponding Compute Engine region. On a get request, zone will
-   * always be present.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-   * * `projects/[project_id]/zones/[zone]`
-   * * `us-central1-f`
-   * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for zoneUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getZoneUriBytes() { - java.lang.Object ref = zoneUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - zoneUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NETWORK_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object networkUri_; - /** - * - * - *
-   * Optional. The Compute Engine network to be used for machine
-   * communications. Cannot be specified with subnetwork_uri. If neither
-   * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-   * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-   * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-   * more information).
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-   * * `projects/[project_id]/regions/global/default`
-   * * `default`
-   * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - @java.lang.Override - public java.lang.String getNetworkUri() { - java.lang.Object ref = networkUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - networkUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Compute Engine network to be used for machine
-   * communications. Cannot be specified with subnetwork_uri. If neither
-   * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-   * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-   * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-   * more information).
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-   * * `projects/[project_id]/regions/global/default`
-   * * `default`
-   * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNetworkUriBytes() { - java.lang.Object ref = networkUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - networkUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBNETWORK_URI_FIELD_NUMBER = 6; - private volatile java.lang.Object subnetworkUri_; - /** - * - * - *
-   * Optional. The Compute Engine subnetwork to be used for machine
-   * communications. Cannot be specified with network_uri.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `sub0`
-   * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - @java.lang.Override - public java.lang.String getSubnetworkUri() { - java.lang.Object ref = subnetworkUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subnetworkUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Compute Engine subnetwork to be used for machine
-   * communications. Cannot be specified with network_uri.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `sub0`
-   * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubnetworkUriBytes() { - java.lang.Object ref = subnetworkUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - subnetworkUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INTERNAL_IP_ONLY_FIELD_NUMBER = 7; - private boolean internalIpOnly_; - /** - * - * - *
-   * Optional. If true, all instances in the cluster will only have internal IP
-   * addresses. By default, clusters are not restricted to internal IP
-   * addresses, and will have ephemeral external IP addresses assigned to each
-   * instance. This `internal_ip_only` restriction can only be enabled for
-   * subnetwork enabled networks, and all off-cluster dependencies must be
-   * configured to be accessible without external IP addresses.
-   * 
- * - * bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The internalIpOnly. - */ - @java.lang.Override - public boolean getInternalIpOnly() { - return internalIpOnly_; - } - - public static final int PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER = 12; - private int privateIpv6GoogleAccess_; - /** - * - * - *
-   * Optional. The type of IPv6 access for a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for privateIpv6GoogleAccess. - */ - @java.lang.Override - public int getPrivateIpv6GoogleAccessValue() { - return privateIpv6GoogleAccess_; - } - /** - * - * - *
-   * Optional. The type of IPv6 access for a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateIpv6GoogleAccess. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - getPrivateIpv6GoogleAccess() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess result = - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.valueOf( - privateIpv6GoogleAccess_); - return result == null - ? com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.UNRECOGNIZED - : result; - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 8; - private volatile java.lang.Object serviceAccount_; - /** - * - * - *
-   * Optional. The [Dataproc service
-   * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-   * (also see [VM Data Plane
-   * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-   * used by Dataproc cluster VM instances to access Google Cloud Platform
-   * services.
-   * If not specified, the
-   * [Compute Engine default service
-   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-   * is used.
-   * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - @java.lang.Override - 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; - } - } - /** - * - * - *
-   * Optional. The [Dataproc service
-   * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-   * (also see [VM Data Plane
-   * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-   * used by Dataproc cluster VM instances to access Google Cloud Platform
-   * services.
-   * If not specified, the
-   * [Compute Engine default service
-   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-   * is used.
-   * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - @java.lang.Override - 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 SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList serviceAccountScopes_; - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the serviceAccountScopes. - */ - public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { - return serviceAccountScopes_; - } - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of serviceAccountScopes. - */ - public int getServiceAccountScopesCount() { - return serviceAccountScopes_.size(); - } - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The serviceAccountScopes at the given index. - */ - public java.lang.String getServiceAccountScopes(int index) { - return serviceAccountScopes_.get(index); - } - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the serviceAccountScopes at the given index. - */ - public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { - return serviceAccountScopes_.getByteString(index); - } - - public static final int TAGS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList tags_; - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @return A list containing the tags. - */ - public com.google.protobuf.ProtocolStringList getTagsList() { - return tags_; - } - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @return The count of tags. - */ - public int getTagsCount() { - return tags_.size(); - } - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @param index The index of the element to return. - * @return The tags at the given index. - */ - public java.lang.String getTags(int index) { - return tags_.get(index); - } - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - public com.google.protobuf.ByteString getTagsBytes(int index) { - return tags_.getByteString(index); - } - - public static final int METADATA_FIELD_NUMBER = 5; - - private static final class MetadataDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_MetadataEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 11; - private com.google.cloud.dataproc.v1.ReservationAffinity reservationAffinity_; - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - @java.lang.Override - public boolean hasReservationAffinity() { - return reservationAffinity_ != null; - } - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity getReservationAffinity() { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - return getReservationAffinity(); - } - - public static final int NODE_GROUP_AFFINITY_FIELD_NUMBER = 13; - private com.google.cloud.dataproc.v1.NodeGroupAffinity nodeGroupAffinity_; - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodeGroupAffinity field is set. - */ - @java.lang.Override - public boolean hasNodeGroupAffinity() { - return nodeGroupAffinity_ != null; - } - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodeGroupAffinity. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeGroupAffinity getNodeGroupAffinity() { - return nodeGroupAffinity_ == null - ? com.google.cloud.dataproc.v1.NodeGroupAffinity.getDefaultInstance() - : nodeGroupAffinity_; - } - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder getNodeGroupAffinityOrBuilder() { - return getNodeGroupAffinity(); - } - - public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 14; - private com.google.cloud.dataproc.v1.ShieldedInstanceConfig shieldedInstanceConfig_; - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the shieldedInstanceConfig field is set. - */ - @java.lang.Override - public boolean hasShieldedInstanceConfig() { - return shieldedInstanceConfig_ != null; - } - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The shieldedInstanceConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig getShieldedInstanceConfig() { - return shieldedInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; - } - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder - getShieldedInstanceConfigOrBuilder() { - return getShieldedInstanceConfig(); - } - - public static final int CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER = 15; - private com.google.cloud.dataproc.v1.ConfidentialInstanceConfig confidentialInstanceConfig_; - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the confidentialInstanceConfig field is set. - */ - @java.lang.Override - public boolean hasConfidentialInstanceConfig() { - return confidentialInstanceConfig_ != null; - } - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The confidentialInstanceConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig getConfidentialInstanceConfig() { - return confidentialInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.getDefaultInstance() - : confidentialInstanceConfig_; - } - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder - getConfidentialInstanceConfigOrBuilder() { - return getConfidentialInstanceConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zoneUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, networkUri_); - } - for (int i = 0; i < serviceAccountScopes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 3, serviceAccountScopes_.getRaw(i)); - } - for (int i = 0; i < tags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tags_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 5); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetworkUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - output.writeBool(7, internalIpOnly_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); - } - if (reservationAffinity_ != null) { - output.writeMessage(11, getReservationAffinity()); - } - if (privateIpv6GoogleAccess_ - != com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - .PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED - .getNumber()) { - output.writeEnum(12, privateIpv6GoogleAccess_); - } - if (nodeGroupAffinity_ != null) { - output.writeMessage(13, getNodeGroupAffinity()); - } - if (shieldedInstanceConfig_ != null) { - output.writeMessage(14, getShieldedInstanceConfig()); - } - if (confidentialInstanceConfig_ != null) { - output.writeMessage(15, getConfidentialInstanceConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zoneUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, networkUri_); - } - { - int dataSize = 0; - for (int i = 0; i < serviceAccountScopes_.size(); i++) { - dataSize += computeStringSizeNoTag(serviceAccountScopes_.getRaw(i)); - } - size += dataSize; - size += 1 * getServiceAccountScopesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < tags_.size(); i++) { - dataSize += computeStringSizeNoTag(tags_.getRaw(i)); - } - size += dataSize; - size += 1 * getTagsList().size(); - } - for (java.util.Map.Entry entry : - internalGetMetadata().getMap().entrySet()) { - com.google.protobuf.MapEntry metadata__ = - MetadataDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, metadata__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetworkUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, internalIpOnly_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); - } - if (reservationAffinity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(11, getReservationAffinity()); - } - if (privateIpv6GoogleAccess_ - != com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - .PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, privateIpv6GoogleAccess_); - } - if (nodeGroupAffinity_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getNodeGroupAffinity()); - } - if (shieldedInstanceConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(14, getShieldedInstanceConfig()); - } - if (confidentialInstanceConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 15, getConfidentialInstanceConfig()); - } - 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.dataproc.v1.GceClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GceClusterConfig other = - (com.google.cloud.dataproc.v1.GceClusterConfig) obj; - - if (!getZoneUri().equals(other.getZoneUri())) return false; - if (!getNetworkUri().equals(other.getNetworkUri())) return false; - if (!getSubnetworkUri().equals(other.getSubnetworkUri())) return false; - if (getInternalIpOnly() != other.getInternalIpOnly()) return false; - if (privateIpv6GoogleAccess_ != other.privateIpv6GoogleAccess_) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (!getServiceAccountScopesList().equals(other.getServiceAccountScopesList())) return false; - if (!getTagsList().equals(other.getTagsList())) return false; - if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (hasReservationAffinity() != other.hasReservationAffinity()) return false; - if (hasReservationAffinity()) { - if (!getReservationAffinity().equals(other.getReservationAffinity())) return false; - } - if (hasNodeGroupAffinity() != other.hasNodeGroupAffinity()) return false; - if (hasNodeGroupAffinity()) { - if (!getNodeGroupAffinity().equals(other.getNodeGroupAffinity())) return false; - } - if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; - if (hasShieldedInstanceConfig()) { - if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; - } - if (hasConfidentialInstanceConfig() != other.hasConfidentialInstanceConfig()) return false; - if (hasConfidentialInstanceConfig()) { - if (!getConfidentialInstanceConfig().equals(other.getConfidentialInstanceConfig())) - 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_URI_FIELD_NUMBER; - hash = (53 * hash) + getZoneUri().hashCode(); - hash = (37 * hash) + NETWORK_URI_FIELD_NUMBER; - hash = (53 * hash) + getNetworkUri().hashCode(); - hash = (37 * hash) + SUBNETWORK_URI_FIELD_NUMBER; - hash = (53 * hash) + getSubnetworkUri().hashCode(); - hash = (37 * hash) + INTERNAL_IP_ONLY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInternalIpOnly()); - hash = (37 * hash) + PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER; - hash = (53 * hash) + privateIpv6GoogleAccess_; - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - if (getServiceAccountScopesCount() > 0) { - hash = (37 * hash) + SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountScopesList().hashCode(); - } - if (getTagsCount() > 0) { - hash = (37 * hash) + TAGS_FIELD_NUMBER; - hash = (53 * hash) + getTagsList().hashCode(); - } - if (!internalGetMetadata().getMap().isEmpty()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + internalGetMetadata().hashCode(); - } - if (hasReservationAffinity()) { - hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER; - hash = (53 * hash) + getReservationAffinity().hashCode(); - } - if (hasNodeGroupAffinity()) { - hash = (37 * hash) + NODE_GROUP_AFFINITY_FIELD_NUMBER; - hash = (53 * hash) + getNodeGroupAffinity().hashCode(); - } - if (hasShieldedInstanceConfig()) { - hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); - } - if (hasConfidentialInstanceConfig()) { - hash = (37 * hash) + CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfidentialInstanceConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig 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.dataproc.v1.GceClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig parseFrom( - 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.dataproc.v1.GceClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig 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.dataproc.v1.GceClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig 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.dataproc.v1.GceClusterConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig 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.dataproc.v1.GceClusterConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Common config settings for resources of Compute Engine cluster
-   * instances, applicable to all instances in the cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GceClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GceClusterConfig) - com.google.cloud.dataproc.v1.GceClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 5: - return internalGetMutableMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GceClusterConfig.class, - com.google.cloud.dataproc.v1.GceClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GceClusterConfig.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(); - zoneUri_ = ""; - - networkUri_ = ""; - - subnetworkUri_ = ""; - - internalIpOnly_ = false; - - privateIpv6GoogleAccess_ = 0; - - serviceAccount_ = ""; - - serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableMetadata().clear(); - if (reservationAffinityBuilder_ == null) { - reservationAffinity_ = null; - } else { - reservationAffinity_ = null; - reservationAffinityBuilder_ = null; - } - if (nodeGroupAffinityBuilder_ == null) { - nodeGroupAffinity_ = null; - } else { - nodeGroupAffinity_ = null; - nodeGroupAffinityBuilder_ = null; - } - if (shieldedInstanceConfigBuilder_ == null) { - shieldedInstanceConfig_ = null; - } else { - shieldedInstanceConfig_ = null; - shieldedInstanceConfigBuilder_ = null; - } - if (confidentialInstanceConfigBuilder_ == null) { - confidentialInstanceConfig_ = null; - } else { - confidentialInstanceConfig_ = null; - confidentialInstanceConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GceClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GceClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig build() { - com.google.cloud.dataproc.v1.GceClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig buildPartial() { - com.google.cloud.dataproc.v1.GceClusterConfig result = - new com.google.cloud.dataproc.v1.GceClusterConfig(this); - int from_bitField0_ = bitField0_; - result.zoneUri_ = zoneUri_; - result.networkUri_ = networkUri_; - result.subnetworkUri_ = subnetworkUri_; - result.internalIpOnly_ = internalIpOnly_; - result.privateIpv6GoogleAccess_ = privateIpv6GoogleAccess_; - result.serviceAccount_ = serviceAccount_; - if (((bitField0_ & 0x00000001) != 0)) { - serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceAccountScopes_ = serviceAccountScopes_; - if (((bitField0_ & 0x00000002) != 0)) { - tags_ = tags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.tags_ = tags_; - result.metadata_ = internalGetMetadata(); - result.metadata_.makeImmutable(); - if (reservationAffinityBuilder_ == null) { - result.reservationAffinity_ = reservationAffinity_; - } else { - result.reservationAffinity_ = reservationAffinityBuilder_.build(); - } - if (nodeGroupAffinityBuilder_ == null) { - result.nodeGroupAffinity_ = nodeGroupAffinity_; - } else { - result.nodeGroupAffinity_ = nodeGroupAffinityBuilder_.build(); - } - if (shieldedInstanceConfigBuilder_ == null) { - result.shieldedInstanceConfig_ = shieldedInstanceConfig_; - } else { - result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build(); - } - if (confidentialInstanceConfigBuilder_ == null) { - result.confidentialInstanceConfig_ = confidentialInstanceConfig_; - } else { - result.confidentialInstanceConfig_ = confidentialInstanceConfigBuilder_.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.dataproc.v1.GceClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.GceClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GceClusterConfig other) { - if (other == com.google.cloud.dataproc.v1.GceClusterConfig.getDefaultInstance()) return this; - if (!other.getZoneUri().isEmpty()) { - zoneUri_ = other.zoneUri_; - onChanged(); - } - if (!other.getNetworkUri().isEmpty()) { - networkUri_ = other.networkUri_; - onChanged(); - } - if (!other.getSubnetworkUri().isEmpty()) { - subnetworkUri_ = other.subnetworkUri_; - onChanged(); - } - if (other.getInternalIpOnly() != false) { - setInternalIpOnly(other.getInternalIpOnly()); - } - if (other.privateIpv6GoogleAccess_ != 0) { - setPrivateIpv6GoogleAccessValue(other.getPrivateIpv6GoogleAccessValue()); - } - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - onChanged(); - } - if (!other.serviceAccountScopes_.isEmpty()) { - if (serviceAccountScopes_.isEmpty()) { - serviceAccountScopes_ = other.serviceAccountScopes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceAccountScopesIsMutable(); - serviceAccountScopes_.addAll(other.serviceAccountScopes_); - } - onChanged(); - } - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); - } - onChanged(); - } - internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - if (other.hasReservationAffinity()) { - mergeReservationAffinity(other.getReservationAffinity()); - } - if (other.hasNodeGroupAffinity()) { - mergeNodeGroupAffinity(other.getNodeGroupAffinity()); - } - if (other.hasShieldedInstanceConfig()) { - mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); - } - if (other.hasConfidentialInstanceConfig()) { - mergeConfidentialInstanceConfig(other.getConfidentialInstanceConfig()); - } - 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.dataproc.v1.GceClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GceClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object zoneUri_ = ""; - /** - * - * - *
-     * Optional. The zone where the Compute Engine cluster will be located.
-     * On a create request, it is required in the "global" region. If omitted
-     * in a non-global Dataproc region, the service will pick a zone in the
-     * corresponding Compute Engine region. On a get request, zone will
-     * always be present.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-     * * `projects/[project_id]/zones/[zone]`
-     * * `us-central1-f`
-     * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The zoneUri. - */ - public java.lang.String getZoneUri() { - java.lang.Object ref = zoneUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - zoneUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The zone where the Compute Engine cluster will be located.
-     * On a create request, it is required in the "global" region. If omitted
-     * in a non-global Dataproc region, the service will pick a zone in the
-     * corresponding Compute Engine region. On a get request, zone will
-     * always be present.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-     * * `projects/[project_id]/zones/[zone]`
-     * * `us-central1-f`
-     * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for zoneUri. - */ - public com.google.protobuf.ByteString getZoneUriBytes() { - java.lang.Object ref = zoneUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - zoneUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The zone where the Compute Engine cluster will be located.
-     * On a create request, it is required in the "global" region. If omitted
-     * in a non-global Dataproc region, the service will pick a zone in the
-     * corresponding Compute Engine region. On a get request, zone will
-     * always be present.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-     * * `projects/[project_id]/zones/[zone]`
-     * * `us-central1-f`
-     * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The zoneUri to set. - * @return This builder for chaining. - */ - public Builder setZoneUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - zoneUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The zone where the Compute Engine cluster will be located.
-     * On a create request, it is required in the "global" region. If omitted
-     * in a non-global Dataproc region, the service will pick a zone in the
-     * corresponding Compute Engine region. On a get request, zone will
-     * always be present.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-     * * `projects/[project_id]/zones/[zone]`
-     * * `us-central1-f`
-     * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearZoneUri() { - - zoneUri_ = getDefaultInstance().getZoneUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The zone where the Compute Engine cluster will be located.
-     * On a create request, it is required in the "global" region. If omitted
-     * in a non-global Dataproc region, the service will pick a zone in the
-     * corresponding Compute Engine region. On a get request, zone will
-     * always be present.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-     * * `projects/[project_id]/zones/[zone]`
-     * * `us-central1-f`
-     * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for zoneUri to set. - * @return This builder for chaining. - */ - public Builder setZoneUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - zoneUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object networkUri_ = ""; - /** - * - * - *
-     * Optional. The Compute Engine network to be used for machine
-     * communications. Cannot be specified with subnetwork_uri. If neither
-     * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-     * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-     * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-     * more information).
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-     * * `projects/[project_id]/regions/global/default`
-     * * `default`
-     * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - public java.lang.String getNetworkUri() { - java.lang.Object ref = networkUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - networkUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine network to be used for machine
-     * communications. Cannot be specified with subnetwork_uri. If neither
-     * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-     * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-     * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-     * more information).
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-     * * `projects/[project_id]/regions/global/default`
-     * * `default`
-     * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - public com.google.protobuf.ByteString getNetworkUriBytes() { - java.lang.Object ref = networkUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - networkUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine network to be used for machine
-     * communications. Cannot be specified with subnetwork_uri. If neither
-     * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-     * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-     * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-     * more information).
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-     * * `projects/[project_id]/regions/global/default`
-     * * `default`
-     * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The networkUri to set. - * @return This builder for chaining. - */ - public Builder setNetworkUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - networkUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine network to be used for machine
-     * communications. Cannot be specified with subnetwork_uri. If neither
-     * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-     * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-     * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-     * more information).
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-     * * `projects/[project_id]/regions/global/default`
-     * * `default`
-     * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNetworkUri() { - - networkUri_ = getDefaultInstance().getNetworkUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine network to be used for machine
-     * communications. Cannot be specified with subnetwork_uri. If neither
-     * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-     * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-     * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-     * more information).
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-     * * `projects/[project_id]/regions/global/default`
-     * * `default`
-     * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for networkUri to set. - * @return This builder for chaining. - */ - public Builder setNetworkUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - networkUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object subnetworkUri_ = ""; - /** - * - * - *
-     * Optional. The Compute Engine subnetwork to be used for machine
-     * communications. Cannot be specified with network_uri.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `sub0`
-     * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - public java.lang.String getSubnetworkUri() { - java.lang.Object ref = subnetworkUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subnetworkUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine subnetwork to be used for machine
-     * communications. Cannot be specified with network_uri.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `sub0`
-     * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - public com.google.protobuf.ByteString getSubnetworkUriBytes() { - java.lang.Object ref = subnetworkUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - subnetworkUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine subnetwork to be used for machine
-     * communications. Cannot be specified with network_uri.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `sub0`
-     * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The subnetworkUri to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subnetworkUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine subnetwork to be used for machine
-     * communications. Cannot be specified with network_uri.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `sub0`
-     * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearSubnetworkUri() { - - subnetworkUri_ = getDefaultInstance().getSubnetworkUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine subnetwork to be used for machine
-     * communications. Cannot be specified with network_uri.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-     * * `sub0`
-     * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for subnetworkUri to set. - * @return This builder for chaining. - */ - public Builder setSubnetworkUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subnetworkUri_ = value; - onChanged(); - return this; - } - - private boolean internalIpOnly_; - /** - * - * - *
-     * Optional. If true, all instances in the cluster will only have internal IP
-     * addresses. By default, clusters are not restricted to internal IP
-     * addresses, and will have ephemeral external IP addresses assigned to each
-     * instance. This `internal_ip_only` restriction can only be enabled for
-     * subnetwork enabled networks, and all off-cluster dependencies must be
-     * configured to be accessible without external IP addresses.
-     * 
- * - * bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The internalIpOnly. - */ - @java.lang.Override - public boolean getInternalIpOnly() { - return internalIpOnly_; - } - /** - * - * - *
-     * Optional. If true, all instances in the cluster will only have internal IP
-     * addresses. By default, clusters are not restricted to internal IP
-     * addresses, and will have ephemeral external IP addresses assigned to each
-     * instance. This `internal_ip_only` restriction can only be enabled for
-     * subnetwork enabled networks, and all off-cluster dependencies must be
-     * configured to be accessible without external IP addresses.
-     * 
- * - * bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The internalIpOnly to set. - * @return This builder for chaining. - */ - public Builder setInternalIpOnly(boolean value) { - - internalIpOnly_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If true, all instances in the cluster will only have internal IP
-     * addresses. By default, clusters are not restricted to internal IP
-     * addresses, and will have ephemeral external IP addresses assigned to each
-     * instance. This `internal_ip_only` restriction can only be enabled for
-     * subnetwork enabled networks, and all off-cluster dependencies must be
-     * configured to be accessible without external IP addresses.
-     * 
- * - * bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearInternalIpOnly() { - - internalIpOnly_ = false; - onChanged(); - return this; - } - - private int privateIpv6GoogleAccess_ = 0; - /** - * - * - *
-     * Optional. The type of IPv6 access for a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for privateIpv6GoogleAccess. - */ - @java.lang.Override - public int getPrivateIpv6GoogleAccessValue() { - return privateIpv6GoogleAccess_; - } - /** - * - * - *
-     * Optional. The type of IPv6 access for a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for privateIpv6GoogleAccess to set. - * @return This builder for chaining. - */ - public Builder setPrivateIpv6GoogleAccessValue(int value) { - - privateIpv6GoogleAccess_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of IPv6 access for a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateIpv6GoogleAccess. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - getPrivateIpv6GoogleAccess() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess result = - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.valueOf( - privateIpv6GoogleAccess_); - return result == null - ? com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. The type of IPv6 access for a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The privateIpv6GoogleAccess to set. - * @return This builder for chaining. - */ - public Builder setPrivateIpv6GoogleAccess( - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess value) { - if (value == null) { - throw new NullPointerException(); - } - - privateIpv6GoogleAccess_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The type of IPv6 access for a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearPrivateIpv6GoogleAccess() { - - privateIpv6GoogleAccess_ = 0; - onChanged(); - return this; - } - - private java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-     * (also see [VM Data Plane
-     * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-     * used by Dataproc cluster VM instances to access Google Cloud Platform
-     * services.
-     * If not specified, the
-     * [Compute Engine default service
-     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-     * is used.
-     * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - 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; - } - } - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-     * (also see [VM Data Plane
-     * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-     * used by Dataproc cluster VM instances to access Google Cloud Platform
-     * services.
-     * If not specified, the
-     * [Compute Engine default service
-     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-     * is used.
-     * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - 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; - } - } - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-     * (also see [VM Data Plane
-     * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-     * used by Dataproc cluster VM instances to access Google Cloud Platform
-     * services.
-     * If not specified, the
-     * [Compute Engine default service
-     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-     * is used.
-     * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccount(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceAccount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-     * (also see [VM Data Plane
-     * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-     * used by Dataproc cluster VM instances to access Google Cloud Platform
-     * services.
-     * If not specified, the
-     * [Compute Engine default service
-     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-     * is used.
-     * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccount() { - - serviceAccount_ = getDefaultInstance().getServiceAccount(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-     * (also see [VM Data Plane
-     * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-     * used by Dataproc cluster VM instances to access Google Cloud Platform
-     * services.
-     * If not specified, the
-     * [Compute Engine default service
-     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-     * is used.
-     * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for serviceAccount to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - serviceAccount_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList serviceAccountScopes_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureServiceAccountScopesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(serviceAccountScopes_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the serviceAccountScopes. - */ - public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { - return serviceAccountScopes_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of serviceAccountScopes. - */ - public int getServiceAccountScopesCount() { - return serviceAccountScopes_.size(); - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The serviceAccountScopes at the given index. - */ - public java.lang.String getServiceAccountScopes(int index) { - return serviceAccountScopes_.get(index); - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the serviceAccountScopes at the given index. - */ - public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { - return serviceAccountScopes_.getByteString(index); - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The serviceAccountScopes to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountScopes(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceAccountScopesIsMutable(); - serviceAccountScopes_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The serviceAccountScopes to add. - * @return This builder for chaining. - */ - public Builder addServiceAccountScopes(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceAccountScopesIsMutable(); - serviceAccountScopes_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The serviceAccountScopes to add. - * @return This builder for chaining. - */ - public Builder addAllServiceAccountScopes(java.lang.Iterable values) { - ensureServiceAccountScopesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccountScopes_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountScopes() { - serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The URIs of service account scopes to be included in
-     * Compute Engine instances. The following base set of scopes is always
-     * included:
-     * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-     * * https://www.googleapis.com/auth/devstorage.read_write
-     * * https://www.googleapis.com/auth/logging.write
-     * If no scopes are specified, the following defaults are also provided:
-     * * https://www.googleapis.com/auth/bigquery
-     * * https://www.googleapis.com/auth/bigtable.admin.table
-     * * https://www.googleapis.com/auth/bigtable.data
-     * * https://www.googleapis.com/auth/devstorage.full_control
-     * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the serviceAccountScopes to add. - * @return This builder for chaining. - */ - public Builder addServiceAccountScopesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureServiceAccountScopesIsMutable(); - serviceAccountScopes_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList tags_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureTagsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(tags_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @return A list containing the tags. - */ - public com.google.protobuf.ProtocolStringList getTagsList() { - return tags_.getUnmodifiableView(); - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @return The count of tags. - */ - public int getTagsCount() { - return tags_.size(); - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param index The index of the element to return. - * @return The tags at the given index. - */ - public java.lang.String getTags(int index) { - return tags_.get(index); - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - public com.google.protobuf.ByteString getTagsBytes(int index) { - return tags_.getByteString(index); - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param index The index to set the value at. - * @param value The tags to set. - * @return This builder for chaining. - */ - public Builder setTags(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param value The tags to add. - * @return This builder for chaining. - */ - public Builder addTags(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param values The tags to add. - * @return This builder for chaining. - */ - public Builder addAllTags(java.lang.Iterable values) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); - onChanged(); - return this; - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @return This builder for chaining. - */ - public Builder clearTags() { - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The Compute Engine tags to add to all instances (see [Tagging
-     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-     * 
- * - * repeated string tags = 4; - * - * @param value The bytes of the tags to add. - * @return This builder for chaining. - */ - public Builder addTagsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - private com.google.protobuf.MapField - internalGetMutableMetadata() { - onChanged(); - ; - if (metadata_ == null) { - metadata_ = - com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); - } - if (!metadata_.isMutable()) { - metadata_ = metadata_.copy(); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - @java.lang.Override - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMetadata() { - internalGetMutableMetadata().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - public Builder removeMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableMetadata() { - return internalGetMutableMetadata().getMutableMap(); - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - public Builder putMetadata(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The Compute Engine metadata entries to add to all instances (see
-     * [Project and instance
-     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-     * 
- * - * map<string, string> metadata = 5; - */ - public Builder putAllMetadata(java.util.Map values) { - internalGetMutableMetadata().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.ReservationAffinity reservationAffinity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ReservationAffinity, - com.google.cloud.dataproc.v1.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder> - reservationAffinityBuilder_; - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - public boolean hasReservationAffinity() { - return reservationAffinityBuilder_ != null || reservationAffinity_ != null; - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - public com.google.cloud.dataproc.v1.ReservationAffinity getReservationAffinity() { - if (reservationAffinityBuilder_ == null) { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } else { - return reservationAffinityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity(com.google.cloud.dataproc.v1.ReservationAffinity value) { - if (reservationAffinityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservationAffinity_ = value; - onChanged(); - } else { - reservationAffinityBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity( - com.google.cloud.dataproc.v1.ReservationAffinity.Builder builderForValue) { - if (reservationAffinityBuilder_ == null) { - reservationAffinity_ = builderForValue.build(); - onChanged(); - } else { - reservationAffinityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReservationAffinity( - com.google.cloud.dataproc.v1.ReservationAffinity value) { - if (reservationAffinityBuilder_ == null) { - if (reservationAffinity_ != null) { - reservationAffinity_ = - com.google.cloud.dataproc.v1.ReservationAffinity.newBuilder(reservationAffinity_) - .mergeFrom(value) - .buildPartial(); - } else { - reservationAffinity_ = value; - } - onChanged(); - } else { - reservationAffinityBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearReservationAffinity() { - if (reservationAffinityBuilder_ == null) { - reservationAffinity_ = null; - onChanged(); - } else { - reservationAffinity_ = null; - reservationAffinityBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ReservationAffinity.Builder - getReservationAffinityBuilder() { - - onChanged(); - return getReservationAffinityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - if (reservationAffinityBuilder_ != null) { - return reservationAffinityBuilder_.getMessageOrBuilder(); - } else { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ReservationAffinity, - com.google.cloud.dataproc.v1.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder> - getReservationAffinityFieldBuilder() { - if (reservationAffinityBuilder_ == null) { - reservationAffinityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ReservationAffinity, - com.google.cloud.dataproc.v1.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder>( - getReservationAffinity(), getParentForChildren(), isClean()); - reservationAffinity_ = null; - } - return reservationAffinityBuilder_; - } - - private com.google.cloud.dataproc.v1.NodeGroupAffinity nodeGroupAffinity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeGroupAffinity, - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder, - com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder> - nodeGroupAffinityBuilder_; - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodeGroupAffinity field is set. - */ - public boolean hasNodeGroupAffinity() { - return nodeGroupAffinityBuilder_ != null || nodeGroupAffinity_ != null; - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodeGroupAffinity. - */ - public com.google.cloud.dataproc.v1.NodeGroupAffinity getNodeGroupAffinity() { - if (nodeGroupAffinityBuilder_ == null) { - return nodeGroupAffinity_ == null - ? com.google.cloud.dataproc.v1.NodeGroupAffinity.getDefaultInstance() - : nodeGroupAffinity_; - } else { - return nodeGroupAffinityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodeGroupAffinity(com.google.cloud.dataproc.v1.NodeGroupAffinity value) { - if (nodeGroupAffinityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nodeGroupAffinity_ = value; - onChanged(); - } else { - nodeGroupAffinityBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodeGroupAffinity( - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder builderForValue) { - if (nodeGroupAffinityBuilder_ == null) { - nodeGroupAffinity_ = builderForValue.build(); - onChanged(); - } else { - nodeGroupAffinityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeNodeGroupAffinity(com.google.cloud.dataproc.v1.NodeGroupAffinity value) { - if (nodeGroupAffinityBuilder_ == null) { - if (nodeGroupAffinity_ != null) { - nodeGroupAffinity_ = - com.google.cloud.dataproc.v1.NodeGroupAffinity.newBuilder(nodeGroupAffinity_) - .mergeFrom(value) - .buildPartial(); - } else { - nodeGroupAffinity_ = value; - } - onChanged(); - } else { - nodeGroupAffinityBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearNodeGroupAffinity() { - if (nodeGroupAffinityBuilder_ == null) { - nodeGroupAffinity_ = null; - onChanged(); - } else { - nodeGroupAffinity_ = null; - nodeGroupAffinityBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder getNodeGroupAffinityBuilder() { - - onChanged(); - return getNodeGroupAffinityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder getNodeGroupAffinityOrBuilder() { - if (nodeGroupAffinityBuilder_ != null) { - return nodeGroupAffinityBuilder_.getMessageOrBuilder(); - } else { - return nodeGroupAffinity_ == null - ? com.google.cloud.dataproc.v1.NodeGroupAffinity.getDefaultInstance() - : nodeGroupAffinity_; - } - } - /** - * - * - *
-     * Optional. Node Group Affinity for sole-tenant clusters.
-     * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeGroupAffinity, - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder, - com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder> - getNodeGroupAffinityFieldBuilder() { - if (nodeGroupAffinityBuilder_ == null) { - nodeGroupAffinityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.NodeGroupAffinity, - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder, - com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder>( - getNodeGroupAffinity(), getParentForChildren(), isClean()); - nodeGroupAffinity_ = null; - } - return nodeGroupAffinityBuilder_; - } - - private com.google.cloud.dataproc.v1.ShieldedInstanceConfig shieldedInstanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ShieldedInstanceConfig, - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder> - shieldedInstanceConfigBuilder_; - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the shieldedInstanceConfig field is set. - */ - public boolean hasShieldedInstanceConfig() { - return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The shieldedInstanceConfig. - */ - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig getShieldedInstanceConfig() { - if (shieldedInstanceConfigBuilder_ == null) { - return shieldedInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; - } else { - return shieldedInstanceConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setShieldedInstanceConfig( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig value) { - if (shieldedInstanceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - shieldedInstanceConfig_ = value; - onChanged(); - } else { - shieldedInstanceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setShieldedInstanceConfig( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder builderForValue) { - if (shieldedInstanceConfigBuilder_ == null) { - shieldedInstanceConfig_ = builderForValue.build(); - onChanged(); - } else { - shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeShieldedInstanceConfig( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig value) { - if (shieldedInstanceConfigBuilder_ == null) { - if (shieldedInstanceConfig_ != null) { - shieldedInstanceConfig_ = - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.newBuilder( - shieldedInstanceConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - shieldedInstanceConfig_ = value; - } - onChanged(); - } else { - shieldedInstanceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearShieldedInstanceConfig() { - if (shieldedInstanceConfigBuilder_ == null) { - shieldedInstanceConfig_ = null; - onChanged(); - } else { - shieldedInstanceConfig_ = null; - shieldedInstanceConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder - getShieldedInstanceConfigBuilder() { - - onChanged(); - return getShieldedInstanceConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder - getShieldedInstanceConfigOrBuilder() { - if (shieldedInstanceConfigBuilder_ != null) { - return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); - } else { - return shieldedInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ShieldedInstanceConfig.getDefaultInstance() - : shieldedInstanceConfig_; - } - } - /** - * - * - *
-     * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-     * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-     * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ShieldedInstanceConfig, - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder> - getShieldedInstanceConfigFieldBuilder() { - if (shieldedInstanceConfigBuilder_ == null) { - shieldedInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ShieldedInstanceConfig, - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder>( - getShieldedInstanceConfig(), getParentForChildren(), isClean()); - shieldedInstanceConfig_ = null; - } - return shieldedInstanceConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.ConfidentialInstanceConfig confidentialInstanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder> - confidentialInstanceConfigBuilder_; - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the confidentialInstanceConfig field is set. - */ - public boolean hasConfidentialInstanceConfig() { - return confidentialInstanceConfigBuilder_ != null || confidentialInstanceConfig_ != null; - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The confidentialInstanceConfig. - */ - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig getConfidentialInstanceConfig() { - if (confidentialInstanceConfigBuilder_ == null) { - return confidentialInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.getDefaultInstance() - : confidentialInstanceConfig_; - } else { - return confidentialInstanceConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfidentialInstanceConfig( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig value) { - if (confidentialInstanceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - confidentialInstanceConfig_ = value; - onChanged(); - } else { - confidentialInstanceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfidentialInstanceConfig( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder builderForValue) { - if (confidentialInstanceConfigBuilder_ == null) { - confidentialInstanceConfig_ = builderForValue.build(); - onChanged(); - } else { - confidentialInstanceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeConfidentialInstanceConfig( - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig value) { - if (confidentialInstanceConfigBuilder_ == null) { - if (confidentialInstanceConfig_ != null) { - confidentialInstanceConfig_ = - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.newBuilder( - confidentialInstanceConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - confidentialInstanceConfig_ = value; - } - onChanged(); - } else { - confidentialInstanceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearConfidentialInstanceConfig() { - if (confidentialInstanceConfigBuilder_ == null) { - confidentialInstanceConfig_ = null; - onChanged(); - } else { - confidentialInstanceConfig_ = null; - confidentialInstanceConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder - getConfidentialInstanceConfigBuilder() { - - onChanged(); - return getConfidentialInstanceConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder - getConfidentialInstanceConfigOrBuilder() { - if (confidentialInstanceConfigBuilder_ != null) { - return confidentialInstanceConfigBuilder_.getMessageOrBuilder(); - } else { - return confidentialInstanceConfig_ == null - ? com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.getDefaultInstance() - : confidentialInstanceConfig_; - } - } - /** - * - * - *
-     * Optional. Confidential Instance Config for clusters using [Confidential
-     * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-     * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder> - getConfidentialInstanceConfigFieldBuilder() { - if (confidentialInstanceConfigBuilder_ == null) { - confidentialInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig.Builder, - com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder>( - getConfidentialInstanceConfig(), getParentForChildren(), isClean()); - confidentialInstanceConfig_ = null; - } - return confidentialInstanceConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.GceClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GceClusterConfig) - private static final com.google.cloud.dataproc.v1.GceClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GceClusterConfig(); - } - - public static com.google.cloud.dataproc.v1.GceClusterConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GceClusterConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GceClusterConfig(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.dataproc.v1.GceClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java deleted file mode 100644 index 3b3b2fbd..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java +++ /dev/null @@ -1,620 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface GceClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GceClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The zone where the Compute Engine cluster will be located.
-   * On a create request, it is required in the "global" region. If omitted
-   * in a non-global Dataproc region, the service will pick a zone in the
-   * corresponding Compute Engine region. On a get request, zone will
-   * always be present.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-   * * `projects/[project_id]/zones/[zone]`
-   * * `us-central1-f`
-   * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The zoneUri. - */ - java.lang.String getZoneUri(); - /** - * - * - *
-   * Optional. The zone where the Compute Engine cluster will be located.
-   * On a create request, it is required in the "global" region. If omitted
-   * in a non-global Dataproc region, the service will pick a zone in the
-   * corresponding Compute Engine region. On a get request, zone will
-   * always be present.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`
-   * * `projects/[project_id]/zones/[zone]`
-   * * `us-central1-f`
-   * 
- * - * string zone_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for zoneUri. - */ - com.google.protobuf.ByteString getZoneUriBytes(); - - /** - * - * - *
-   * Optional. The Compute Engine network to be used for machine
-   * communications. Cannot be specified with subnetwork_uri. If neither
-   * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-   * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-   * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-   * more information).
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-   * * `projects/[project_id]/regions/global/default`
-   * * `default`
-   * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The networkUri. - */ - java.lang.String getNetworkUri(); - /** - * - * - *
-   * Optional. The Compute Engine network to be used for machine
-   * communications. Cannot be specified with subnetwork_uri. If neither
-   * `network_uri` nor `subnetwork_uri` is specified, the "default" network of
-   * the project is used, if it exists. Cannot be a "Custom Subnet Network" (see
-   * [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for
-   * more information).
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
-   * * `projects/[project_id]/regions/global/default`
-   * * `default`
-   * 
- * - * string network_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for networkUri. - */ - com.google.protobuf.ByteString getNetworkUriBytes(); - - /** - * - * - *
-   * Optional. The Compute Engine subnetwork to be used for machine
-   * communications. Cannot be specified with network_uri.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `sub0`
-   * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The subnetworkUri. - */ - java.lang.String getSubnetworkUri(); - /** - * - * - *
-   * Optional. The Compute Engine subnetwork to be used for machine
-   * communications. Cannot be specified with network_uri.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
-   * * `sub0`
-   * 
- * - * string subnetwork_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for subnetworkUri. - */ - com.google.protobuf.ByteString getSubnetworkUriBytes(); - - /** - * - * - *
-   * Optional. If true, all instances in the cluster will only have internal IP
-   * addresses. By default, clusters are not restricted to internal IP
-   * addresses, and will have ephemeral external IP addresses assigned to each
-   * instance. This `internal_ip_only` restriction can only be enabled for
-   * subnetwork enabled networks, and all off-cluster dependencies must be
-   * configured to be accessible without external IP addresses.
-   * 
- * - * bool internal_ip_only = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The internalIpOnly. - */ - boolean getInternalIpOnly(); - - /** - * - * - *
-   * Optional. The type of IPv6 access for a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for privateIpv6GoogleAccess. - */ - int getPrivateIpv6GoogleAccessValue(); - /** - * - * - *
-   * Optional. The type of IPv6 access for a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The privateIpv6GoogleAccess. - */ - com.google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess - getPrivateIpv6GoogleAccess(); - - /** - * - * - *
-   * Optional. The [Dataproc service
-   * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-   * (also see [VM Data Plane
-   * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-   * used by Dataproc cluster VM instances to access Google Cloud Platform
-   * services.
-   * If not specified, the
-   * [Compute Engine default service
-   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-   * is used.
-   * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The serviceAccount. - */ - java.lang.String getServiceAccount(); - /** - * - * - *
-   * Optional. The [Dataproc service
-   * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
-   * (also see [VM Data Plane
-   * identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
-   * used by Dataproc cluster VM instances to access Google Cloud Platform
-   * services.
-   * If not specified, the
-   * [Compute Engine default service
-   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
-   * is used.
-   * 
- * - * string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for serviceAccount. - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the serviceAccountScopes. - */ - java.util.List getServiceAccountScopesList(); - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of serviceAccountScopes. - */ - int getServiceAccountScopesCount(); - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The serviceAccountScopes at the given index. - */ - java.lang.String getServiceAccountScopes(int index); - /** - * - * - *
-   * Optional. The URIs of service account scopes to be included in
-   * Compute Engine instances. The following base set of scopes is always
-   * included:
-   * * https://www.googleapis.com/auth/cloud.useraccounts.readonly
-   * * https://www.googleapis.com/auth/devstorage.read_write
-   * * https://www.googleapis.com/auth/logging.write
-   * If no scopes are specified, the following defaults are also provided:
-   * * https://www.googleapis.com/auth/bigquery
-   * * https://www.googleapis.com/auth/bigtable.admin.table
-   * * https://www.googleapis.com/auth/bigtable.data
-   * * https://www.googleapis.com/auth/devstorage.full_control
-   * 
- * - * repeated string service_account_scopes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the serviceAccountScopes at the given index. - */ - com.google.protobuf.ByteString getServiceAccountScopesBytes(int index); - - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @return A list containing the tags. - */ - java.util.List getTagsList(); - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @return The count of tags. - */ - int getTagsCount(); - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @param index The index of the element to return. - * @return The tags at the given index. - */ - java.lang.String getTags(int index); - /** - * - * - *
-   * The Compute Engine tags to add to all instances (see [Tagging
-   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
-   * 
- * - * repeated string tags = 4; - * - * @param index The index of the value to return. - * @return The bytes of the tags at the given index. - */ - com.google.protobuf.ByteString getTagsBytes(int index); - - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - int getMetadataCount(); - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - boolean containsMetadata(java.lang.String key); - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - java.util.Map getMetadata(); - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - java.util.Map getMetadataMap(); - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * The Compute Engine metadata entries to add to all instances (see
-   * [Project and instance
-   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
-   * 
- * - * map<string, string> metadata = 5; - */ - java.lang.String getMetadataOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reservationAffinity field is set. - */ - boolean hasReservationAffinity(); - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - com.google.cloud.dataproc.v1.ReservationAffinity getReservationAffinity(); - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder getReservationAffinityOrBuilder(); - - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodeGroupAffinity field is set. - */ - boolean hasNodeGroupAffinity(); - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodeGroupAffinity. - */ - com.google.cloud.dataproc.v1.NodeGroupAffinity getNodeGroupAffinity(); - /** - * - * - *
-   * Optional. Node Group Affinity for sole-tenant clusters.
-   * 
- * - * - * .google.cloud.dataproc.v1.NodeGroupAffinity node_group_affinity = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder getNodeGroupAffinityOrBuilder(); - - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the shieldedInstanceConfig field is set. - */ - boolean hasShieldedInstanceConfig(); - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The shieldedInstanceConfig. - */ - com.google.cloud.dataproc.v1.ShieldedInstanceConfig getShieldedInstanceConfig(); - /** - * - * - *
-   * Optional. Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * - * .google.cloud.dataproc.v1.ShieldedInstanceConfig shielded_instance_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the confidentialInstanceConfig field is set. - */ - boolean hasConfidentialInstanceConfig(); - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The confidentialInstanceConfig. - */ - com.google.cloud.dataproc.v1.ConfidentialInstanceConfig getConfidentialInstanceConfig(); - /** - * - * - *
-   * Optional. Confidential Instance Config for clusters using [Confidential
-   * VMs](https://cloud.google.com/compute/confidential-vm/docs).
-   * 
- * - * - * .google.cloud.dataproc.v1.ConfidentialInstanceConfig confidential_instance_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ConfidentialInstanceConfigOrBuilder - getConfidentialInstanceConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequest.java deleted file mode 100644 index 6da1a8f1..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequest.java +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to fetch an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetAutoscalingPolicyRequest} - */ -public final class GetAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) - GetAutoscalingPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAutoscalingPolicyRequest.newBuilder() to construct. - private GetAutoscalingPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetAutoscalingPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetAutoscalingPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetAutoscalingPolicyRequest( - 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += 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.dataproc.v1.GetAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) 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.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest 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.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - 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.dataproc.v1.GetAutoscalingPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest 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.dataproc.v1.GetAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest 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.dataproc.v1.GetAutoscalingPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest 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.dataproc.v1.GetAutoscalingPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to fetch an autoscaling policy.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest(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.dataproc.v1.GetAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest other) { - if (other == com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest.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.dataproc.v1.GetAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The "resource name" of the autoscaling policy, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-     * * For `projects.locations.autoscalingPolicies.get`, the resource name
-     *   of the policy has the following format:
-     *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - 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.dataproc.v1.GetAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAutoscalingPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAutoscalingPolicyRequest(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.dataproc.v1.GetAutoscalingPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index e2dd358b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequestOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface GetAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetAutoscalingPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The "resource name" of the autoscaling policy, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}`
-   * * For `projects.locations.autoscalingPolicies.get`, the resource name
-   *   of the policy has the following format:
-   *   `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequest.java deleted file mode 100644 index 9e300434..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequest.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to get the resource representation for a batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetBatchRequest} - */ -public final class GetBatchRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetBatchRequest) - GetBatchRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBatchRequest.newBuilder() to construct. - private GetBatchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetBatchRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBatchRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetBatchRequest( - 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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_GetBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetBatchRequest.class, - com.google.cloud.dataproc.v1.GetBatchRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the batch to retrieve.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the batch to retrieve.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += 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.dataproc.v1.GetBatchRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GetBatchRequest other = - (com.google.cloud.dataproc.v1.GetBatchRequest) 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.dataproc.v1.GetBatchRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest 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.dataproc.v1.GetBatchRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest parseFrom( - 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.dataproc.v1.GetBatchRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest 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.dataproc.v1.GetBatchRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest 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.dataproc.v1.GetBatchRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest 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.dataproc.v1.GetBatchRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to get the resource representation for a batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetBatchRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetBatchRequest) - com.google.cloud.dataproc.v1.GetBatchRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_GetBatchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetBatchRequest.class, - com.google.cloud.dataproc.v1.GetBatchRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GetBatchRequest.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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_GetBatchRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetBatchRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GetBatchRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetBatchRequest build() { - com.google.cloud.dataproc.v1.GetBatchRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetBatchRequest buildPartial() { - com.google.cloud.dataproc.v1.GetBatchRequest result = - new com.google.cloud.dataproc.v1.GetBatchRequest(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.dataproc.v1.GetBatchRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.GetBatchRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GetBatchRequest other) { - if (other == com.google.cloud.dataproc.v1.GetBatchRequest.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.dataproc.v1.GetBatchRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GetBatchRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the batch to retrieve.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the batch to retrieve.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the batch to retrieve.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the batch to retrieve.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the batch to retrieve.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - 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.dataproc.v1.GetBatchRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetBatchRequest) - private static final com.google.cloud.dataproc.v1.GetBatchRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetBatchRequest(); - } - - public static com.google.cloud.dataproc.v1.GetBatchRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBatchRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBatchRequest(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.dataproc.v1.GetBatchRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequestOrBuilder.java deleted file mode 100644 index e8b97dd4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetBatchRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface GetBatchRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetBatchRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the batch to retrieve.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The name of the batch to retrieve.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequest.java deleted file mode 100644 index fa0ae6bb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequest.java +++ /dev/null @@ -1,999 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Request to get the resource representation for a cluster in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetClusterRequest} - */ -public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetClusterRequest) - GetClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetClusterRequest.newBuilder() to construct. - private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GetClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetClusterRequest.class, - com.google.cloud.dataproc.v1.GetClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - 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.dataproc.v1.GetClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GetClusterRequest other = - (com.google.cloud.dataproc.v1.GetClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest 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.dataproc.v1.GetClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest parseFrom( - 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.dataproc.v1.GetClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest 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.dataproc.v1.GetClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest 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.dataproc.v1.GetClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest 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.dataproc.v1.GetClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 to get the resource representation for a cluster in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetClusterRequest) - com.google.cloud.dataproc.v1.GetClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GetClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetClusterRequest.class, - com.google.cloud.dataproc.v1.GetClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GetClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_GetClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GetClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetClusterRequest build() { - com.google.cloud.dataproc.v1.GetClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.GetClusterRequest result = - new com.google.cloud.dataproc.v1.GetClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - 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.dataproc.v1.GetClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.GetClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GetClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.GetClusterRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - 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.dataproc.v1.GetClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GetClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = 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.dataproc.v1.GetClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetClusterRequest) - private static final com.google.cloud.dataproc.v1.GetClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.GetClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetClusterRequest(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.dataproc.v1.GetClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequestOrBuilder.java deleted file mode 100644 index fba9993e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface GetClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequest.java deleted file mode 100644 index 37f0748a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequest.java +++ /dev/null @@ -1,999 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to get the resource representation for a job in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetJobRequest} - */ -public final class GetJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetJobRequest) - GetJobRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetJobRequest.newBuilder() to construct. - private GetJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetJobRequest() { - projectId_ = ""; - region_ = ""; - jobId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetJobRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_GetJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetJobRequest.class, - com.google.cloud.dataproc.v1.GetJobRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - 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.dataproc.v1.GetJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GetJobRequest other = - (com.google.cloud.dataproc.v1.GetJobRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getJobId().equals(other.getJobId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GetJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest 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.dataproc.v1.GetJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest parseFrom( - 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.dataproc.v1.GetJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest 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.dataproc.v1.GetJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest 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.dataproc.v1.GetJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest 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.dataproc.v1.GetJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to get the resource representation for a job in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetJobRequest) - com.google.cloud.dataproc.v1.GetJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_GetJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetJobRequest.class, - com.google.cloud.dataproc.v1.GetJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GetJobRequest.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(); - projectId_ = ""; - - region_ = ""; - - jobId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GetJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetJobRequest build() { - com.google.cloud.dataproc.v1.GetJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetJobRequest buildPartial() { - com.google.cloud.dataproc.v1.GetJobRequest result = - new com.google.cloud.dataproc.v1.GetJobRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.jobId_ = jobId_; - 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.dataproc.v1.GetJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.GetJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GetJobRequest other) { - if (other == com.google.cloud.dataproc.v1.GetJobRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - 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.dataproc.v1.GetJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GetJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = 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.dataproc.v1.GetJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetJobRequest) - private static final com.google.cloud.dataproc.v1.GetJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetJobRequest(); - } - - public static com.google.cloud.dataproc.v1.GetJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetJobRequest(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.dataproc.v1.GetJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequestOrBuilder.java deleted file mode 100644 index 013ec48a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface GetJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequest.java deleted file mode 100644 index fa305956..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequest.java +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to fetch a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetWorkflowTemplateRequest} - */ -public final class GetWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GetWorkflowTemplateRequest) - GetWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetWorkflowTemplateRequest.newBuilder() to construct. - private GetWorkflowTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetWorkflowTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetWorkflowTemplateRequest( - 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 16: - { - version_ = input.readInt32(); - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private int version_; - /** - * - * - *
-   * Optional. The version of workflow template to retrieve. Only previously
-   * instantiated versions can be retrieved.
-   * If unspecified, retrieves the current version.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - 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.dataproc.v1.GetWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (getVersion() != other.getVersion()) 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) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest 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.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.GetWorkflowTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest 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.dataproc.v1.GetWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest 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.dataproc.v1.GetWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest 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.dataproc.v1.GetWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to fetch a workflow template.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GetWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GetWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.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_ = ""; - - version_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest(this); - result.name_ = name_; - result.version_ = version_; - 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.dataproc.v1.GetWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest other) { - if (other == com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - 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.dataproc.v1.GetWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.get`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int version_; - /** - * - * - *
-     * Optional. The version of workflow template to retrieve. Only previously
-     * instantiated versions can be retrieved.
-     * If unspecified, retrieves the current version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - * - * - *
-     * Optional. The version of workflow template to retrieve. Only previously
-     * instantiated versions can be retrieved.
-     * If unspecified, retrieves the current version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The version of workflow template to retrieve. Only previously
-     * instantiated versions can be retrieved.
-     * If unspecified, retrieves the current version.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 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.dataproc.v1.GetWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GetWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetWorkflowTemplateRequest(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.dataproc.v1.GetWorkflowTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 41a72a2d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface GetWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GetWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.get`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The version of workflow template to retrieve. Only previously
-   * instantiated versions can be retrieved.
-   * If unspecified, retrieves the current version.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - int getVersion(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfig.java deleted file mode 100644 index 23b7bdf6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfig.java +++ /dev/null @@ -1,1291 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The cluster's GKE config.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeClusterConfig} - */ -public final class GkeClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeClusterConfig) - GkeClusterConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeClusterConfig.newBuilder() to construct. - private GkeClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeClusterConfig() { - gkeClusterTarget_ = ""; - nodePoolTarget_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeClusterConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeClusterConfig( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - gkeClusterTarget_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodePoolTarget_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodePoolTarget_.add( - input.readMessage( - com.google.cloud.dataproc.v1.GkeNodePoolTarget.parser(), extensionRegistry)); - 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)) { - nodePoolTarget_ = java.util.Collections.unmodifiableList(nodePoolTarget_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeClusterConfig.class, - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder.class); - } - - public static final int GKE_CLUSTER_TARGET_FIELD_NUMBER = 2; - private volatile java.lang.Object gkeClusterTarget_; - /** - * - * - *
-   * Optional. A target GKE cluster to deploy to. It must be in the same project and
-   * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-   * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-   * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gkeClusterTarget. - */ - @java.lang.Override - public java.lang.String getGkeClusterTarget() { - java.lang.Object ref = gkeClusterTarget_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gkeClusterTarget_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A target GKE cluster to deploy to. It must be in the same project and
-   * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-   * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-   * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gkeClusterTarget. - */ - @java.lang.Override - public com.google.protobuf.ByteString getGkeClusterTargetBytes() { - java.lang.Object ref = gkeClusterTarget_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gkeClusterTarget_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODE_POOL_TARGET_FIELD_NUMBER = 3; - private java.util.List nodePoolTarget_; - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getNodePoolTargetList() { - return nodePoolTarget_; - } - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getNodePoolTargetOrBuilderList() { - return nodePoolTarget_; - } - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getNodePoolTargetCount() { - return nodePoolTarget_.size(); - } - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTarget getNodePoolTarget(int index) { - return nodePoolTarget_.get(index); - } - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder getNodePoolTargetOrBuilder( - int index) { - return nodePoolTarget_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gkeClusterTarget_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gkeClusterTarget_); - } - for (int i = 0; i < nodePoolTarget_.size(); i++) { - output.writeMessage(3, nodePoolTarget_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gkeClusterTarget_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gkeClusterTarget_); - } - for (int i = 0; i < nodePoolTarget_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, nodePoolTarget_.get(i)); - } - 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.dataproc.v1.GkeClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeClusterConfig other = - (com.google.cloud.dataproc.v1.GkeClusterConfig) obj; - - if (!getGkeClusterTarget().equals(other.getGkeClusterTarget())) return false; - if (!getNodePoolTargetList().equals(other.getNodePoolTargetList())) 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) + GKE_CLUSTER_TARGET_FIELD_NUMBER; - hash = (53 * hash) + getGkeClusterTarget().hashCode(); - if (getNodePoolTargetCount() > 0) { - hash = (37 * hash) + NODE_POOL_TARGET_FIELD_NUMBER; - hash = (53 * hash) + getNodePoolTargetList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig 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.dataproc.v1.GkeClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig parseFrom( - 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.dataproc.v1.GkeClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig 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.dataproc.v1.GkeClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig 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.dataproc.v1.GkeClusterConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig 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.dataproc.v1.GkeClusterConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 cluster's GKE config.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeClusterConfig) - com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeClusterConfig.class, - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GkeClusterConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getNodePoolTargetFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - gkeClusterTarget_ = ""; - - if (nodePoolTargetBuilder_ == null) { - nodePoolTarget_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nodePoolTargetBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfig build() { - com.google.cloud.dataproc.v1.GkeClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfig buildPartial() { - com.google.cloud.dataproc.v1.GkeClusterConfig result = - new com.google.cloud.dataproc.v1.GkeClusterConfig(this); - int from_bitField0_ = bitField0_; - result.gkeClusterTarget_ = gkeClusterTarget_; - if (nodePoolTargetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nodePoolTarget_ = java.util.Collections.unmodifiableList(nodePoolTarget_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nodePoolTarget_ = nodePoolTarget_; - } else { - result.nodePoolTarget_ = nodePoolTargetBuilder_.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.dataproc.v1.GkeClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.GkeClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GkeClusterConfig other) { - if (other == com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance()) return this; - if (!other.getGkeClusterTarget().isEmpty()) { - gkeClusterTarget_ = other.gkeClusterTarget_; - onChanged(); - } - if (nodePoolTargetBuilder_ == null) { - if (!other.nodePoolTarget_.isEmpty()) { - if (nodePoolTarget_.isEmpty()) { - nodePoolTarget_ = other.nodePoolTarget_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.addAll(other.nodePoolTarget_); - } - onChanged(); - } - } else { - if (!other.nodePoolTarget_.isEmpty()) { - if (nodePoolTargetBuilder_.isEmpty()) { - nodePoolTargetBuilder_.dispose(); - nodePoolTargetBuilder_ = null; - nodePoolTarget_ = other.nodePoolTarget_; - bitField0_ = (bitField0_ & ~0x00000001); - nodePoolTargetBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNodePoolTargetFieldBuilder() - : null; - } else { - nodePoolTargetBuilder_.addAllMessages(other.nodePoolTarget_); - } - } - } - 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.dataproc.v1.GkeClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GkeClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object gkeClusterTarget_ = ""; - /** - * - * - *
-     * Optional. A target GKE cluster to deploy to. It must be in the same project and
-     * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gkeClusterTarget. - */ - public java.lang.String getGkeClusterTarget() { - java.lang.Object ref = gkeClusterTarget_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - gkeClusterTarget_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A target GKE cluster to deploy to. It must be in the same project and
-     * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gkeClusterTarget. - */ - public com.google.protobuf.ByteString getGkeClusterTargetBytes() { - java.lang.Object ref = gkeClusterTarget_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - gkeClusterTarget_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A target GKE cluster to deploy to. It must be in the same project and
-     * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The gkeClusterTarget to set. - * @return This builder for chaining. - */ - public Builder setGkeClusterTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - gkeClusterTarget_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A target GKE cluster to deploy to. It must be in the same project and
-     * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearGkeClusterTarget() { - - gkeClusterTarget_ = getDefaultInstance().getGkeClusterTarget(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A target GKE cluster to deploy to. It must be in the same project and
-     * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for gkeClusterTarget to set. - * @return This builder for chaining. - */ - public Builder setGkeClusterTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - gkeClusterTarget_ = value; - onChanged(); - return this; - } - - private java.util.List nodePoolTarget_ = - java.util.Collections.emptyList(); - - private void ensureNodePoolTargetIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nodePoolTarget_ = - new java.util.ArrayList( - nodePoolTarget_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolTarget, - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder> - nodePoolTargetBuilder_; - - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getNodePoolTargetList() { - if (nodePoolTargetBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodePoolTarget_); - } else { - return nodePoolTargetBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getNodePoolTargetCount() { - if (nodePoolTargetBuilder_ == null) { - return nodePoolTarget_.size(); - } else { - return nodePoolTargetBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTarget getNodePoolTarget(int index) { - if (nodePoolTargetBuilder_ == null) { - return nodePoolTarget_.get(index); - } else { - return nodePoolTargetBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodePoolTarget( - int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget value) { - if (nodePoolTargetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.set(index, value); - onChanged(); - } else { - nodePoolTargetBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodePoolTarget( - int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder builderForValue) { - if (nodePoolTargetBuilder_ == null) { - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.set(index, builderForValue.build()); - onChanged(); - } else { - nodePoolTargetBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addNodePoolTarget(com.google.cloud.dataproc.v1.GkeNodePoolTarget value) { - if (nodePoolTargetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.add(value); - onChanged(); - } else { - nodePoolTargetBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addNodePoolTarget( - int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget value) { - if (nodePoolTargetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.add(index, value); - onChanged(); - } else { - nodePoolTargetBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addNodePoolTarget( - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder builderForValue) { - if (nodePoolTargetBuilder_ == null) { - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.add(builderForValue.build()); - onChanged(); - } else { - nodePoolTargetBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addNodePoolTarget( - int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder builderForValue) { - if (nodePoolTargetBuilder_ == null) { - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.add(index, builderForValue.build()); - onChanged(); - } else { - nodePoolTargetBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllNodePoolTarget( - java.lang.Iterable values) { - if (nodePoolTargetBuilder_ == null) { - ensureNodePoolTargetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodePoolTarget_); - onChanged(); - } else { - nodePoolTargetBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearNodePoolTarget() { - if (nodePoolTargetBuilder_ == null) { - nodePoolTarget_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nodePoolTargetBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeNodePoolTarget(int index) { - if (nodePoolTargetBuilder_ == null) { - ensureNodePoolTargetIsMutable(); - nodePoolTarget_.remove(index); - onChanged(); - } else { - nodePoolTargetBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder getNodePoolTargetBuilder( - int index) { - return getNodePoolTargetFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder getNodePoolTargetOrBuilder( - int index) { - if (nodePoolTargetBuilder_ == null) { - return nodePoolTarget_.get(index); - } else { - return nodePoolTargetBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getNodePoolTargetOrBuilderList() { - if (nodePoolTargetBuilder_ != null) { - return nodePoolTargetBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodePoolTarget_); - } - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder addNodePoolTargetBuilder() { - return getNodePoolTargetFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder addNodePoolTargetBuilder( - int index) { - return getNodePoolTargetFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-     * must be assigned the 'default' role. Each role can be given to only a
-     * single NodePoolTarget. All NodePools must have the same location settings.
-     * If a nodePoolTarget is not specified, Dataproc constructs a default
-     * nodePoolTarget.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getNodePoolTargetBuilderList() { - return getNodePoolTargetFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolTarget, - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder> - getNodePoolTargetFieldBuilder() { - if (nodePoolTargetBuilder_ == null) { - nodePoolTargetBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolTarget, - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder>( - nodePoolTarget_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - nodePoolTarget_ = null; - } - return nodePoolTargetBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.GkeClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeClusterConfig) - private static final com.google.cloud.dataproc.v1.GkeClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GkeClusterConfig(); - } - - public static com.google.cloud.dataproc.v1.GkeClusterConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeClusterConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeClusterConfig(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.dataproc.v1.GkeClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfigOrBuilder.java deleted file mode 100644 index bc7bd12a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfigOrBuilder.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface GkeClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A target GKE cluster to deploy to. It must be in the same project and
-   * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-   * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-   * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The gkeClusterTarget. - */ - java.lang.String getGkeClusterTarget(); - /** - * - * - *
-   * Optional. A target GKE cluster to deploy to. It must be in the same project and
-   * region as the Dataproc cluster (the GKE cluster can be zonal or regional).
-   * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-   * 
- * - * string gke_cluster_target = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for gkeClusterTarget. - */ - com.google.protobuf.ByteString getGkeClusterTargetBytes(); - - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getNodePoolTargetList(); - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolTarget getNodePoolTarget(int index); - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getNodePoolTargetCount(); - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getNodePoolTargetOrBuilderList(); - /** - * - * - *
-   * Optional. GKE NodePools where workloads will be scheduled. At least one node pool
-   * must be assigned the 'default' role. Each role can be given to only a
-   * single NodePoolTarget. All NodePools must have the same location settings.
-   * If a nodePoolTarget is not specified, Dataproc constructs a default
-   * nodePoolTarget.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget node_pool_target = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder getNodePoolTargetOrBuilder(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfig.java deleted file mode 100644 index 9bb277bd..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfig.java +++ /dev/null @@ -1,4761 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The configuration of a GKE NodePool used by a [Dataproc-on-GKE
- * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig} - */ -public final class GkeNodePoolConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolConfig) - GkeNodePoolConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeNodePoolConfig.newBuilder() to construct. - private GkeNodePoolConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeNodePoolConfig() { - locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeNodePoolConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeNodePoolConfig( - 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 18: - { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder subBuilder = - null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder - subBuilder = null; - if (autoscaling_ != null) { - subBuilder = autoscaling_.toBuilder(); - } - autoscaling_ = - input.readMessage( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscaling_); - autoscaling_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - locations_.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)) { - locations_ = locations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder.class); - } - - public interface GkeNodeConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. The name of a Compute Engine [machine
-     * type](https://cloud.google.com/compute/docs/machine-types).
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineType. - */ - java.lang.String getMachineType(); - /** - * - * - *
-     * Optional. The name of a Compute Engine [machine
-     * type](https://cloud.google.com/compute/docs/machine-types).
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineType. - */ - com.google.protobuf.ByteString getMachineTypeBytes(); - - /** - * - * - *
-     * Optional. Whether the nodes are created as [preemptible VM
-     * instances](https://cloud.google.com/compute/docs/instances/preemptible).
-     * 
- * - * bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The preemptible. - */ - boolean getPreemptible(); - - /** - * - * - *
-     * Optional. The number of local SSD disks to attach to the node, which is limited by
-     * the maximum number of disks allowable per zone (see [Adding Local
-     * SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).
-     * 
- * - * int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdCount. - */ - int getLocalSsdCount(); - - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getAcceleratorsList(); - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig getAccelerators( - int index); - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAcceleratorsCount(); - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - ? extends - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAcceleratorConfigOrBuilder> - getAcceleratorsOrBuilderList(); - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder - getAcceleratorsOrBuilder(int index); - - /** - * - * - *
-     * Optional. [Minimum CPU
-     * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-     * to be used by this instance. The instance may be scheduled on the
-     * specified or a newer CPU platform. Specify the friendly names of CPU
-     * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-     * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - java.lang.String getMinCpuPlatform(); - /** - * - * - *
-     * Optional. [Minimum CPU
-     * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-     * to be used by this instance. The instance may be scheduled on the
-     * specified or a newer CPU platform. Specify the friendly names of CPU
-     * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-     * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - com.google.protobuf.ByteString getMinCpuPlatformBytes(); - } - /** - * - * - *
-   * Parameters that describe cluster nodes.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig} - */ - public static final class GkeNodeConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - GkeNodeConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeNodeConfig.newBuilder() to construct. - private GkeNodeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeNodeConfig() { - machineType_ = ""; - accelerators_ = java.util.Collections.emptyList(); - minCpuPlatform_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeNodeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeNodeConfig( - 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(); - - machineType_ = s; - break; - } - case 56: - { - localSsdCount_ = input.readInt32(); - break; - } - case 80: - { - preemptible_ = input.readBool(); - break; - } - case 90: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = - new java.util.ArrayList< - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAcceleratorConfig>(); - mutable_bitField0_ |= 0x00000001; - } - accelerators_.add( - input.readMessage( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .parser(), - extensionRegistry)); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - minCpuPlatform_ = 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)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder.class); - } - - public static final int MACHINE_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object machineType_; - /** - * - * - *
-     * Optional. The name of a Compute Engine [machine
-     * type](https://cloud.google.com/compute/docs/machine-types).
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineType. - */ - @java.lang.Override - public java.lang.String getMachineType() { - java.lang.Object ref = machineType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - machineType_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. The name of a Compute Engine [machine
-     * type](https://cloud.google.com/compute/docs/machine-types).
-     * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMachineTypeBytes() { - java.lang.Object ref = machineType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREEMPTIBLE_FIELD_NUMBER = 10; - private boolean preemptible_; - /** - * - * - *
-     * Optional. Whether the nodes are created as [preemptible VM
-     * instances](https://cloud.google.com/compute/docs/instances/preemptible).
-     * 
- * - * bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The preemptible. - */ - @java.lang.Override - public boolean getPreemptible() { - return preemptible_; - } - - public static final int LOCAL_SSD_COUNT_FIELD_NUMBER = 7; - private int localSsdCount_; - /** - * - * - *
-     * Optional. The number of local SSD disks to attach to the node, which is limited by
-     * the maximum number of disks allowable per zone (see [Adding Local
-     * SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).
-     * 
- * - * int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdCount. - */ - @java.lang.Override - public int getLocalSsdCount() { - return localSsdCount_; - } - - public static final int ACCELERATORS_FIELD_NUMBER = 11; - private java.util.List< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig> - accelerators_; - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig> - getAcceleratorsList() { - return accelerators_; - } - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAcceleratorConfigOrBuilder> - getAcceleratorsOrBuilderList() { - return accelerators_; - } - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getAcceleratorsCount() { - return accelerators_.size(); - } - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - getAccelerators(int index) { - return accelerators_.get(index); - } - /** - * - * - *
-     * Optional. A list of [hardware
-     * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-     * each node.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder - getAcceleratorsOrBuilder(int index) { - return accelerators_.get(index); - } - - public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 13; - private volatile java.lang.Object minCpuPlatform_; - /** - * - * - *
-     * Optional. [Minimum CPU
-     * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-     * to be used by this instance. The instance may be scheduled on the
-     * specified or a newer CPU platform. Specify the friendly names of CPU
-     * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-     * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - @java.lang.Override - public java.lang.String getMinCpuPlatform() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - minCpuPlatform_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. [Minimum CPU
-     * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-     * to be used by this instance. The instance may be scheduled on the
-     * specified or a newer CPU platform. Specify the friendly names of CPU
-     * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-     * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMinCpuPlatformBytes() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - minCpuPlatform_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); - } - if (localSsdCount_ != 0) { - output.writeInt32(7, localSsdCount_); - } - if (preemptible_ != false) { - output.writeBool(10, preemptible_); - } - for (int i = 0; i < accelerators_.size(); i++) { - output.writeMessage(11, accelerators_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, minCpuPlatform_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); - } - if (localSsdCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, localSsdCount_); - } - if (preemptible_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, preemptible_); - } - for (int i = 0; i < accelerators_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, accelerators_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, minCpuPlatform_); - } - 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig other = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) obj; - - if (!getMachineType().equals(other.getMachineType())) return false; - if (getPreemptible() != other.getPreemptible()) return false; - if (getLocalSsdCount() != other.getLocalSsdCount()) return false; - if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; - if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) 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) + MACHINE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMachineType().hashCode(); - hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPreemptible()); - hash = (37 * hash) + LOCAL_SSD_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getLocalSsdCount(); - if (getAcceleratorsCount() > 0) { - hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorsList().hashCode(); - } - hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; - hash = (53 * hash) + getMinCpuPlatform().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Parameters that describe cluster nodes.
-     * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAcceleratorsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - machineType_ = ""; - - preemptible_ = false; - - localSsdCount_ = 0; - - if (acceleratorsBuilder_ == null) { - accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - acceleratorsBuilder_.clear(); - } - minCpuPlatform_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig build() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig buildPartial() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig result = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig(this); - int from_bitField0_ = bitField0_; - result.machineType_ = machineType_; - result.preemptible_ = preemptible_; - result.localSsdCount_ = localSsdCount_; - if (acceleratorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.accelerators_ = accelerators_; - } else { - result.accelerators_ = acceleratorsBuilder_.build(); - } - result.minCpuPlatform_ = minCpuPlatform_; - 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig other) { - if (other - == com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.getDefaultInstance()) - return this; - if (!other.getMachineType().isEmpty()) { - machineType_ = other.machineType_; - onChanged(); - } - if (other.getPreemptible() != false) { - setPreemptible(other.getPreemptible()); - } - if (other.getLocalSsdCount() != 0) { - setLocalSsdCount(other.getLocalSsdCount()); - } - if (acceleratorsBuilder_ == null) { - if (!other.accelerators_.isEmpty()) { - if (accelerators_.isEmpty()) { - accelerators_ = other.accelerators_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAcceleratorsIsMutable(); - accelerators_.addAll(other.accelerators_); - } - onChanged(); - } - } else { - if (!other.accelerators_.isEmpty()) { - if (acceleratorsBuilder_.isEmpty()) { - acceleratorsBuilder_.dispose(); - acceleratorsBuilder_ = null; - accelerators_ = other.accelerators_; - bitField0_ = (bitField0_ & ~0x00000001); - acceleratorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAcceleratorsFieldBuilder() - : null; - } else { - acceleratorsBuilder_.addAllMessages(other.accelerators_); - } - } - } - if (!other.getMinCpuPlatform().isEmpty()) { - minCpuPlatform_ = other.minCpuPlatform_; - 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object machineType_ = ""; - /** - * - * - *
-       * Optional. The name of a Compute Engine [machine
-       * type](https://cloud.google.com/compute/docs/machine-types).
-       * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineType. - */ - public java.lang.String getMachineType() { - java.lang.Object ref = machineType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - machineType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. The name of a Compute Engine [machine
-       * type](https://cloud.google.com/compute/docs/machine-types).
-       * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineType. - */ - public com.google.protobuf.ByteString getMachineTypeBytes() { - java.lang.Object ref = machineType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. The name of a Compute Engine [machine
-       * type](https://cloud.google.com/compute/docs/machine-types).
-       * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The machineType to set. - * @return This builder for chaining. - */ - public Builder setMachineType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - machineType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The name of a Compute Engine [machine
-       * type](https://cloud.google.com/compute/docs/machine-types).
-       * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMachineType() { - - machineType_ = getDefaultInstance().getMachineType(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The name of a Compute Engine [machine
-       * type](https://cloud.google.com/compute/docs/machine-types).
-       * 
- * - * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for machineType to set. - * @return This builder for chaining. - */ - public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - machineType_ = value; - onChanged(); - return this; - } - - private boolean preemptible_; - /** - * - * - *
-       * Optional. Whether the nodes are created as [preemptible VM
-       * instances](https://cloud.google.com/compute/docs/instances/preemptible).
-       * 
- * - * bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The preemptible. - */ - @java.lang.Override - public boolean getPreemptible() { - return preemptible_; - } - /** - * - * - *
-       * Optional. Whether the nodes are created as [preemptible VM
-       * instances](https://cloud.google.com/compute/docs/instances/preemptible).
-       * 
- * - * bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The preemptible to set. - * @return This builder for chaining. - */ - public Builder setPreemptible(boolean value) { - - preemptible_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. Whether the nodes are created as [preemptible VM
-       * instances](https://cloud.google.com/compute/docs/instances/preemptible).
-       * 
- * - * bool preemptible = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPreemptible() { - - preemptible_ = false; - onChanged(); - return this; - } - - private int localSsdCount_; - /** - * - * - *
-       * Optional. The number of local SSD disks to attach to the node, which is limited by
-       * the maximum number of disks allowable per zone (see [Adding Local
-       * SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).
-       * 
- * - * int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The localSsdCount. - */ - @java.lang.Override - public int getLocalSsdCount() { - return localSsdCount_; - } - /** - * - * - *
-       * Optional. The number of local SSD disks to attach to the node, which is limited by
-       * the maximum number of disks allowable per zone (see [Adding Local
-       * SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).
-       * 
- * - * int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The localSsdCount to set. - * @return This builder for chaining. - */ - public Builder setLocalSsdCount(int value) { - - localSsdCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The number of local SSD disks to attach to the node, which is limited by
-       * the maximum number of disks allowable per zone (see [Adding Local
-       * SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).
-       * 
- * - * int32 local_ssd_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLocalSsdCount() { - - localSsdCount_ = 0; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig> - accelerators_ = java.util.Collections.emptyList(); - - private void ensureAcceleratorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - accelerators_ = - new java.util.ArrayList< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig>( - accelerators_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder> - acceleratorsBuilder_; - - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig> - getAcceleratorsList() { - if (acceleratorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(accelerators_); - } else { - return acceleratorsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getAcceleratorsCount() { - if (acceleratorsBuilder_ == null) { - return accelerators_.size(); - } else { - return acceleratorsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - getAccelerators(int index) { - if (acceleratorsBuilder_ == null) { - return accelerators_.get(index); - } else { - return acceleratorsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.set(index, value); - onChanged(); - } else { - acceleratorsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.set(index, builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.add(value); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.add(index, value); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.add(builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.add(index, builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllAccelerators( - java.lang.Iterable< - ? extends - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig> - values) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_); - onChanged(); - } else { - acceleratorsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAccelerators() { - if (acceleratorsBuilder_ == null) { - accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - acceleratorsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeAccelerators(int index) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.remove(index); - onChanged(); - } else { - acceleratorsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - getAcceleratorsBuilder(int index) { - return getAcceleratorsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder - getAcceleratorsOrBuilder(int index) { - if (acceleratorsBuilder_ == null) { - return accelerators_.get(index); - } else { - return acceleratorsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAcceleratorConfigOrBuilder> - getAcceleratorsOrBuilderList() { - if (acceleratorsBuilder_ != null) { - return acceleratorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(accelerators_); - } - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - addAcceleratorsBuilder() { - return getAcceleratorsFieldBuilder() - .addBuilder( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .getDefaultInstance()); - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - addAcceleratorsBuilder(int index) { - return getAcceleratorsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .getDefaultInstance()); - } - /** - * - * - *
-       * Optional. A list of [hardware
-       * accelerators](https://cloud.google.com/compute/docs/gpus) to attach to
-       * each node.
-       * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig accelerators = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder> - getAcceleratorsBuilderList() { - return getAcceleratorsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder> - getAcceleratorsFieldBuilder() { - if (acceleratorsBuilder_ == null) { - acceleratorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAcceleratorConfigOrBuilder>( - accelerators_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - accelerators_ = null; - } - return acceleratorsBuilder_; - } - - private java.lang.Object minCpuPlatform_ = ""; - /** - * - * - *
-       * Optional. [Minimum CPU
-       * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-       * to be used by this instance. The instance may be scheduled on the
-       * specified or a newer CPU platform. Specify the friendly names of CPU
-       * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-       * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - public java.lang.String getMinCpuPlatform() { - java.lang.Object ref = minCpuPlatform_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - minCpuPlatform_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. [Minimum CPU
-       * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-       * to be used by this instance. The instance may be scheduled on the
-       * specified or a newer CPU platform. Specify the friendly names of CPU
-       * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-       * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - public com.google.protobuf.ByteString getMinCpuPlatformBytes() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - minCpuPlatform_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. [Minimum CPU
-       * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-       * to be used by this instance. The instance may be scheduled on the
-       * specified or a newer CPU platform. Specify the friendly names of CPU
-       * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-       * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minCpuPlatform to set. - * @return This builder for chaining. - */ - public Builder setMinCpuPlatform(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - minCpuPlatform_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. [Minimum CPU
-       * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-       * to be used by this instance. The instance may be scheduled on the
-       * specified or a newer CPU platform. Specify the friendly names of CPU
-       * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-       * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinCpuPlatform() { - - minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. [Minimum CPU
-       * platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
-       * to be used by this instance. The instance may be scheduled on the
-       * specified or a newer CPU platform. Specify the friendly names of CPU
-       * platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
-       * 
- * - * string min_cpu_platform = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for minCpuPlatform to set. - * @return This builder for chaining. - */ - public Builder setMinCpuPlatformBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - minCpuPlatform_ = 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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig) - private static final com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig(); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeNodeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeNodeConfig(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.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface GkeNodePoolAcceleratorConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The number of accelerator cards exposed to an instance.
-     * 
- * - * int64 accelerator_count = 1; - * - * @return The acceleratorCount. - */ - long getAcceleratorCount(); - - /** - * - * - *
-     * The accelerator type resource namename (see GPUs on Compute Engine).
-     * 
- * - * string accelerator_type = 2; - * - * @return The acceleratorType. - */ - java.lang.String getAcceleratorType(); - /** - * - * - *
-     * The accelerator type resource namename (see GPUs on Compute Engine).
-     * 
- * - * string accelerator_type = 2; - * - * @return The bytes for acceleratorType. - */ - com.google.protobuf.ByteString getAcceleratorTypeBytes(); - } - /** - * - * - *
-   * A GkeNodeConfigAcceleratorConfig represents a Hardware Accelerator request
-   * for a NodePool.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig} - */ - public static final class GkeNodePoolAcceleratorConfig - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - GkeNodePoolAcceleratorConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeNodePoolAcceleratorConfig.newBuilder() to construct. - private GkeNodePoolAcceleratorConfig( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeNodePoolAcceleratorConfig() { - acceleratorType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeNodePoolAcceleratorConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeNodePoolAcceleratorConfig( - 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: - { - acceleratorCount_ = input.readInt64(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - acceleratorType_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - .class); - } - - public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 1; - private long acceleratorCount_; - /** - * - * - *
-     * The number of accelerator cards exposed to an instance.
-     * 
- * - * int64 accelerator_count = 1; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public long getAcceleratorCount() { - return acceleratorCount_; - } - - public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object acceleratorType_; - /** - * - * - *
-     * The accelerator type resource namename (see GPUs on Compute Engine).
-     * 
- * - * string accelerator_type = 2; - * - * @return The acceleratorType. - */ - @java.lang.Override - public java.lang.String getAcceleratorType() { - java.lang.Object ref = acceleratorType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - acceleratorType_ = s; - return s; - } - } - /** - * - * - *
-     * The accelerator type resource namename (see GPUs on Compute Engine).
-     * 
- * - * string accelerator_type = 2; - * - * @return The bytes for acceleratorType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { - java.lang.Object ref = acceleratorType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - acceleratorType_ = 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 (acceleratorCount_ != 0L) { - output.writeInt64(1, acceleratorCount_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, acceleratorType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (acceleratorCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, acceleratorCount_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(acceleratorType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig other = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) obj; - - if (getAcceleratorCount() != other.getAcceleratorCount()) return false; - if (!getAcceleratorType().equals(other.getAcceleratorType())) 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_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAcceleratorCount()); - hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom( - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * A GkeNodeConfigAcceleratorConfig represents a Hardware Accelerator request
-     * for a NodePool.
-     * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.Builder - .class); - } - - // Construct using - // com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig.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(); - acceleratorCount_ = 0L; - - acceleratorType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig build() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - buildPartial() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig result = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig(this); - result.acceleratorCount_ = acceleratorCount_; - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) { - return mergeFrom( - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig other) { - if (other - == com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - .getDefaultInstance()) return this; - if (other.getAcceleratorCount() != 0L) { - setAcceleratorCount(other.getAcceleratorCount()); - } - if (!other.getAcceleratorType().isEmpty()) { - acceleratorType_ = other.acceleratorType_; - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long acceleratorCount_; - /** - * - * - *
-       * The number of accelerator cards exposed to an instance.
-       * 
- * - * int64 accelerator_count = 1; - * - * @return The acceleratorCount. - */ - @java.lang.Override - public long getAcceleratorCount() { - return acceleratorCount_; - } - /** - * - * - *
-       * The number of accelerator cards exposed to an instance.
-       * 
- * - * int64 accelerator_count = 1; - * - * @param value The acceleratorCount to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorCount(long value) { - - acceleratorCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The number of accelerator cards exposed to an instance.
-       * 
- * - * int64 accelerator_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorCount() { - - acceleratorCount_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object acceleratorType_ = ""; - /** - * - * - *
-       * The accelerator type resource namename (see GPUs on Compute Engine).
-       * 
- * - * string accelerator_type = 2; - * - * @return The acceleratorType. - */ - public java.lang.String getAcceleratorType() { - java.lang.Object ref = acceleratorType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - acceleratorType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The accelerator type resource namename (see GPUs on Compute Engine).
-       * 
- * - * string accelerator_type = 2; - * - * @return The bytes for acceleratorType. - */ - public com.google.protobuf.ByteString getAcceleratorTypeBytes() { - java.lang.Object ref = acceleratorType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - acceleratorType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The accelerator type resource namename (see GPUs on Compute Engine).
-       * 
- * - * string accelerator_type = 2; - * - * @param value The acceleratorType to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - acceleratorType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The accelerator type resource namename (see GPUs on Compute Engine).
-       * 
- * - * string accelerator_type = 2; - * - * @return This builder for chaining. - */ - public Builder clearAcceleratorType() { - - acceleratorType_ = getDefaultInstance().getAcceleratorType(); - onChanged(); - return this; - } - /** - * - * - *
-       * The accelerator type resource namename (see GPUs on Compute Engine).
-       * 
- * - * string accelerator_type = 2; - * - * @param value The bytes for acceleratorType to set. - * @return This builder for chaining. - */ - public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - acceleratorType_ = 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig) - private static final com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig(); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeNodePoolAcceleratorConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeNodePoolAcceleratorConfig(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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAcceleratorConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface GkeNodePoolAutoscalingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The minimum number of nodes in the NodePool. Must be >= 0 and <=
-     * max_node_count.
-     * 
- * - * int32 min_node_count = 2; - * - * @return The minNodeCount. - */ - int getMinNodeCount(); - - /** - * - * - *
-     * The maximum number of nodes in the NodePool. Must be >= min_node_count.
-     * **Note:** Quota must be sufficient to scale up the cluster.
-     * 
- * - * int32 max_node_count = 3; - * - * @return The maxNodeCount. - */ - int getMaxNodeCount(); - } - /** - * - * - *
-   * GkeNodePoolAutoscaling contains information the cluster autoscaler needs to
-   * adjust the size of the node pool to the current cluster usage.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig} - */ - public static final class GkeNodePoolAutoscalingConfig - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - GkeNodePoolAutoscalingConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeNodePoolAutoscalingConfig.newBuilder() to construct. - private GkeNodePoolAutoscalingConfig( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeNodePoolAutoscalingConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeNodePoolAutoscalingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeNodePoolAutoscalingConfig( - 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 16: - { - minNodeCount_ = input.readInt32(); - break; - } - case 24: - { - maxNodeCount_ = input.readInt32(); - 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder - .class); - } - - public static final int MIN_NODE_COUNT_FIELD_NUMBER = 2; - private int minNodeCount_; - /** - * - * - *
-     * The minimum number of nodes in the NodePool. Must be >= 0 and <=
-     * max_node_count.
-     * 
- * - * int32 min_node_count = 2; - * - * @return The minNodeCount. - */ - @java.lang.Override - public int getMinNodeCount() { - return minNodeCount_; - } - - public static final int MAX_NODE_COUNT_FIELD_NUMBER = 3; - private int maxNodeCount_; - /** - * - * - *
-     * The maximum number of nodes in the NodePool. Must be >= min_node_count.
-     * **Note:** Quota must be sufficient to scale up the cluster.
-     * 
- * - * int32 max_node_count = 3; - * - * @return The maxNodeCount. - */ - @java.lang.Override - public int getMaxNodeCount() { - return maxNodeCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (minNodeCount_ != 0) { - output.writeInt32(2, minNodeCount_); - } - if (maxNodeCount_ != 0) { - output.writeInt32(3, maxNodeCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minNodeCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minNodeCount_); - } - if (maxNodeCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxNodeCount_); - } - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig other = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) obj; - - if (getMinNodeCount() != other.getMinNodeCount()) return false; - if (getMaxNodeCount() != other.getMaxNodeCount()) 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) + MIN_NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMinNodeCount(); - hash = (37 * hash) + MAX_NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxNodeCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom( - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-     * GkeNodePoolAutoscaling contains information the cluster autoscaler needs to
-     * adjust the size of the node pool to the current cluster usage.
-     * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder - .class); - } - - // Construct using - // com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.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(); - minNodeCount_ = 0; - - maxNodeCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig build() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - buildPartial() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig result = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig(this); - result.minNodeCount_ = minNodeCount_; - result.maxNodeCount_ = maxNodeCount_; - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) { - return mergeFrom( - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig other) { - if (other - == com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .getDefaultInstance()) return this; - if (other.getMinNodeCount() != 0) { - setMinNodeCount(other.getMinNodeCount()); - } - if (other.getMaxNodeCount() != 0) { - setMaxNodeCount(other.getMaxNodeCount()); - } - 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int minNodeCount_; - /** - * - * - *
-       * The minimum number of nodes in the NodePool. Must be >= 0 and <=
-       * max_node_count.
-       * 
- * - * int32 min_node_count = 2; - * - * @return The minNodeCount. - */ - @java.lang.Override - public int getMinNodeCount() { - return minNodeCount_; - } - /** - * - * - *
-       * The minimum number of nodes in the NodePool. Must be >= 0 and <=
-       * max_node_count.
-       * 
- * - * int32 min_node_count = 2; - * - * @param value The minNodeCount to set. - * @return This builder for chaining. - */ - public Builder setMinNodeCount(int value) { - - minNodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The minimum number of nodes in the NodePool. Must be >= 0 and <=
-       * max_node_count.
-       * 
- * - * int32 min_node_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearMinNodeCount() { - - minNodeCount_ = 0; - onChanged(); - return this; - } - - private int maxNodeCount_; - /** - * - * - *
-       * The maximum number of nodes in the NodePool. Must be >= min_node_count.
-       * **Note:** Quota must be sufficient to scale up the cluster.
-       * 
- * - * int32 max_node_count = 3; - * - * @return The maxNodeCount. - */ - @java.lang.Override - public int getMaxNodeCount() { - return maxNodeCount_; - } - /** - * - * - *
-       * The maximum number of nodes in the NodePool. Must be >= min_node_count.
-       * **Note:** Quota must be sufficient to scale up the cluster.
-       * 
- * - * int32 max_node_count = 3; - * - * @param value The maxNodeCount to set. - * @return This builder for chaining. - */ - public Builder setMaxNodeCount(int value) { - - maxNodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The maximum number of nodes in the NodePool. Must be >= min_node_count.
-       * **Note:** Quota must be sufficient to scale up the cluster.
-       * 
- * - * int32 max_node_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearMaxNodeCount() { - - maxNodeCount_ = 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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig) - private static final com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig(); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeNodePoolAutoscalingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeNodePoolAutoscalingConfig(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.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config_; - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig getConfig() { - return config_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder - getConfigOrBuilder() { - return getConfig(); - } - - public static final int LOCATIONS_FIELD_NUMBER = 13; - private com.google.protobuf.LazyStringList locations_; - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the locations. - */ - public com.google.protobuf.ProtocolStringList getLocationsList() { - return locations_; - } - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of locations. - */ - public int getLocationsCount() { - return locations_.size(); - } - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The locations at the given index. - */ - public java.lang.String getLocations(int index) { - return locations_.get(index); - } - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the locations at the given index. - */ - public com.google.protobuf.ByteString getLocationsBytes(int index) { - return locations_.getByteString(index); - } - - public static final int AUTOSCALING_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling_; - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscaling field is set. - */ - @java.lang.Override - public boolean hasAutoscaling() { - return autoscaling_ != null; - } - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscaling. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - getAutoscaling() { - return autoscaling_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .getDefaultInstance() - : autoscaling_; - } - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder - getAutoscalingOrBuilder() { - return getAutoscaling(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (config_ != null) { - output.writeMessage(2, getConfig()); - } - if (autoscaling_ != null) { - output.writeMessage(4, getAutoscaling()); - } - for (int i = 0; i < locations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, locations_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfig()); - } - if (autoscaling_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAutoscaling()); - } - { - int dataSize = 0; - for (int i = 0; i < locations_.size(); i++) { - dataSize += computeStringSizeNoTag(locations_.getRaw(i)); - } - size += dataSize; - size += 1 * getLocationsList().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.dataproc.v1.GkeNodePoolConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeNodePoolConfig other = - (com.google.cloud.dataproc.v1.GkeNodePoolConfig) obj; - - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig().equals(other.getConfig())) return false; - } - if (!getLocationsList().equals(other.getLocationsList())) return false; - if (hasAutoscaling() != other.hasAutoscaling()) return false; - if (hasAutoscaling()) { - if (!getAutoscaling().equals(other.getAutoscaling())) 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 (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (getLocationsCount() > 0) { - hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getLocationsList().hashCode(); - } - if (hasAutoscaling()) { - hash = (37 * hash) + AUTOSCALING_FIELD_NUMBER; - hash = (53 * hash) + getAutoscaling().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig 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.dataproc.v1.GkeNodePoolConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig parseFrom( - 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.dataproc.v1.GkeNodePoolConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig 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.dataproc.v1.GkeNodePoolConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig 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.dataproc.v1.GkeNodePoolConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig 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.dataproc.v1.GkeNodePoolConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 configuration of a GKE NodePool used by a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolConfig) - com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.class, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GkeNodePoolConfig.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 (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (autoscalingBuilder_ == null) { - autoscaling_ = null; - } else { - autoscaling_ = null; - autoscalingBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig build() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig buildPartial() { - com.google.cloud.dataproc.v1.GkeNodePoolConfig result = - new com.google.cloud.dataproc.v1.GkeNodePoolConfig(this); - int from_bitField0_ = bitField0_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - locations_ = locations_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.locations_ = locations_; - if (autoscalingBuilder_ == null) { - result.autoscaling_ = autoscaling_; - } else { - result.autoscaling_ = autoscalingBuilder_.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.dataproc.v1.GkeNodePoolConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.GkeNodePoolConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GkeNodePoolConfig other) { - if (other == com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance()) return this; - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); - } - onChanged(); - } - if (other.hasAutoscaling()) { - mergeAutoscaling(other.getAutoscaling()); - } - 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.dataproc.v1.GkeNodePoolConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GkeNodePoolConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setConfig( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder - getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * Optional. The node pool configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.protobuf.LazyStringList locations_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - locations_ = new com.google.protobuf.LazyStringArrayList(locations_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the locations. - */ - public com.google.protobuf.ProtocolStringList getLocationsList() { - return locations_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of locations. - */ - public int getLocationsCount() { - return locations_.size(); - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The locations at the given index. - */ - public java.lang.String getLocations(int index) { - return locations_.get(index); - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the locations at the given index. - */ - public com.google.protobuf.ByteString getLocationsBytes(int index) { - return locations_.getByteString(index); - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The locations to set. - * @return This builder for chaining. - */ - public Builder setLocations(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The locations to add. - * @return This builder for chaining. - */ - public Builder addLocations(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The locations to add. - * @return This builder for chaining. - */ - public Builder addAllLocations(java.lang.Iterable values) { - ensureLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearLocations() { - locations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The list of Compute Engine
-     * [zones](https://cloud.google.com/compute/docs/zones#available) where
-     * NodePool's nodes will be located.
-     * **Note:** Currently, only one zone may be specified.
-     * If a location is not specified during NodePool creation, Dataproc will
-     * choose a location.
-     * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the locations to add. - * @return This builder for chaining. - */ - public Builder addLocationsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - autoscaling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder> - autoscalingBuilder_; - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscaling field is set. - */ - public boolean hasAutoscaling() { - return autoscalingBuilder_ != null || autoscaling_ != null; - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscaling. - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - getAutoscaling() { - if (autoscalingBuilder_ == null) { - return autoscaling_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .getDefaultInstance() - : autoscaling_; - } else { - return autoscalingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscaling( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig value) { - if (autoscalingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - autoscaling_ = value; - onChanged(); - } else { - autoscalingBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscaling( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder - builderForValue) { - if (autoscalingBuilder_ == null) { - autoscaling_ = builderForValue.build(); - onChanged(); - } else { - autoscalingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAutoscaling( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig value) { - if (autoscalingBuilder_ == null) { - if (autoscaling_ != null) { - autoscaling_ = - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .newBuilder(autoscaling_) - .mergeFrom(value) - .buildPartial(); - } else { - autoscaling_ = value; - } - onChanged(); - } else { - autoscalingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAutoscaling() { - if (autoscalingBuilder_ == null) { - autoscaling_ = null; - onChanged(); - } else { - autoscaling_ = null; - autoscalingBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder - getAutoscalingBuilder() { - - onChanged(); - return getAutoscalingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder - getAutoscalingOrBuilder() { - if (autoscalingBuilder_ != null) { - return autoscalingBuilder_.getMessageOrBuilder(); - } else { - return autoscaling_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig - .getDefaultInstance() - : autoscaling_; - } - } - /** - * - * - *
-     * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-     * only when a valid configuration is present.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder> - getAutoscalingFieldBuilder() { - if (autoscalingBuilder_ == null) { - autoscalingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfig - .GkeNodePoolAutoscalingConfigOrBuilder>( - getAutoscaling(), getParentForChildren(), isClean()); - autoscaling_ = null; - } - return autoscalingBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.GkeNodePoolConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolConfig) - private static final com.google.cloud.dataproc.v1.GkeNodePoolConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GkeNodePoolConfig(); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeNodePoolConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeNodePoolConfig(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.dataproc.v1.GkeNodePoolConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfigOrBuilder.java deleted file mode 100644 index 81c1de16..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolConfigOrBuilder.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface GkeNodePoolConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeNodePoolConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The config. - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig getConfig(); - /** - * - * - *
-   * Optional. The node pool configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the locations. - */ - java.util.List getLocationsList(); - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of locations. - */ - int getLocationsCount(); - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The locations at the given index. - */ - java.lang.String getLocations(int index); - /** - * - * - *
-   * Optional. The list of Compute Engine
-   * [zones](https://cloud.google.com/compute/docs/zones#available) where
-   * NodePool's nodes will be located.
-   * **Note:** Currently, only one zone may be specified.
-   * If a location is not specified during NodePool creation, Dataproc will
-   * choose a location.
-   * 
- * - * repeated string locations = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the locations at the given index. - */ - com.google.protobuf.ByteString getLocationsBytes(int index); - - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoscaling field is set. - */ - boolean hasAutoscaling(); - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscaling. - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig getAutoscaling(); - /** - * - * - *
-   * Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled
-   * only when a valid configuration is present.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfig autoscaling = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodePoolAutoscalingConfigOrBuilder - getAutoscalingOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTarget.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTarget.java deleted file mode 100644 index 5d501e88..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTarget.java +++ /dev/null @@ -1,1669 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * GKE NodePools that Dataproc workloads run on.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolTarget} - */ -public final class GkeNodePoolTarget extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.GkeNodePoolTarget) - GkeNodePoolTargetOrBuilder { - private static final long serialVersionUID = 0L; - // Use GkeNodePoolTarget.newBuilder() to construct. - private GkeNodePoolTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GkeNodePoolTarget() { - nodePool_ = ""; - roles_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GkeNodePoolTarget(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GkeNodePoolTarget( - 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(); - - nodePool_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - roles_.add(rawValue); - break; - } - case 18: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - roles_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 26: - { - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder subBuilder = null; - if (nodePoolConfig_ != null) { - subBuilder = nodePoolConfig_.toBuilder(); - } - nodePoolConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodePoolConfig_); - nodePoolConfig_ = 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_ & 0x00000001) != 0)) { - roles_ = java.util.Collections.unmodifiableList(roles_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolTarget.class, - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder.class); - } - - /** - * - * - *
-   * `Role` specifies whose tasks will run on the NodePool. The roles can be
-   * specific to workloads. Exactly one GkeNodePoolTarget within the
-   * VirtualCluster must have 'default' role, which is used to run all workloads
-   * that are not associated with a NodePool.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.GkeNodePoolTarget.Role} - */ - public enum Role implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Role is unspecified.
-     * 
- * - * ROLE_UNSPECIFIED = 0; - */ - ROLE_UNSPECIFIED(0), - /** - * - * - *
-     * Any roles that are not directly assigned to a NodePool run on the
-     * `default` role's NodePool.
-     * 
- * - * DEFAULT = 1; - */ - DEFAULT(1), - /** - * - * - *
-     * Run controllers and webhooks.
-     * 
- * - * CONTROLLER = 2; - */ - CONTROLLER(2), - /** - * - * - *
-     * Run spark driver.
-     * 
- * - * SPARK_DRIVER = 3; - */ - SPARK_DRIVER(3), - /** - * - * - *
-     * Run spark executors.
-     * 
- * - * SPARK_EXECUTOR = 4; - */ - SPARK_EXECUTOR(4), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Role is unspecified.
-     * 
- * - * ROLE_UNSPECIFIED = 0; - */ - public static final int ROLE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Any roles that are not directly assigned to a NodePool run on the
-     * `default` role's NodePool.
-     * 
- * - * DEFAULT = 1; - */ - public static final int DEFAULT_VALUE = 1; - /** - * - * - *
-     * Run controllers and webhooks.
-     * 
- * - * CONTROLLER = 2; - */ - public static final int CONTROLLER_VALUE = 2; - /** - * - * - *
-     * Run spark driver.
-     * 
- * - * SPARK_DRIVER = 3; - */ - public static final int SPARK_DRIVER_VALUE = 3; - /** - * - * - *
-     * Run spark executors.
-     * 
- * - * SPARK_EXECUTOR = 4; - */ - public static final int SPARK_EXECUTOR_VALUE = 4; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Role valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Role forNumber(int value) { - switch (value) { - case 0: - return ROLE_UNSPECIFIED; - case 1: - return DEFAULT; - case 2: - return CONTROLLER; - case 3: - return SPARK_DRIVER; - case 4: - return SPARK_EXECUTOR; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Role findValueByNumber(int number) { - return Role.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDescriptor().getEnumTypes().get(0); - } - - private static final Role[] VALUES = values(); - - public static Role valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Role(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.GkeNodePoolTarget.Role) - } - - public static final int NODE_POOL_FIELD_NUMBER = 1; - private volatile java.lang.Object nodePool_; - /** - * - * - *
-   * Required. The target GKE NodePool.
-   * Format:
-   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-   * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodePool. - */ - @java.lang.Override - public java.lang.String getNodePool() { - java.lang.Object ref = nodePool_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nodePool_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The target GKE NodePool.
-   * Format:
-   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-   * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodePool. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNodePoolBytes() { - java.lang.Object ref = nodePool_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nodePool_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROLES_FIELD_NUMBER = 2; - private java.util.List roles_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role> - roles_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>() { - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role convert( - java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role result = - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role.valueOf(from); - return result == null - ? com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role.UNRECOGNIZED - : result; - } - }; - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the roles. - */ - @java.lang.Override - public java.util.List getRolesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>( - roles_, roles_converter_); - } - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The count of roles. - */ - @java.lang.Override - public int getRolesCount() { - return roles_.size(); - } - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the element to return. - * @return The roles at the given index. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role getRoles(int index) { - return roles_converter_.convert(roles_.get(index)); - } - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the enum numeric values on the wire for roles. - */ - @java.lang.Override - public java.util.List getRolesValueList() { - return roles_; - } - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of roles at the given index. - */ - @java.lang.Override - public int getRolesValue(int index) { - return roles_.get(index); - } - - private int rolesMemoizedSerializedSize; - - public static final int NODE_POOL_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.GkeNodePoolConfig nodePoolConfig_; - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodePoolConfig field is set. - */ - @java.lang.Override - public boolean hasNodePoolConfig() { - return nodePoolConfig_ != null; - } - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodePoolConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfig getNodePoolConfig() { - return nodePoolConfig_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() - : nodePoolConfig_; - } - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder getNodePoolConfigOrBuilder() { - return getNodePoolConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodePool_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodePool_); - } - if (getRolesList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(rolesMemoizedSerializedSize); - } - for (int i = 0; i < roles_.size(); i++) { - output.writeEnumNoTag(roles_.get(i)); - } - if (nodePoolConfig_ != null) { - output.writeMessage(3, getNodePoolConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodePool_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodePool_); - } - { - int dataSize = 0; - for (int i = 0; i < roles_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(roles_.get(i)); - } - size += dataSize; - if (!getRolesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); - } - rolesMemoizedSerializedSize = dataSize; - } - if (nodePoolConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNodePoolConfig()); - } - 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.dataproc.v1.GkeNodePoolTarget)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.GkeNodePoolTarget other = - (com.google.cloud.dataproc.v1.GkeNodePoolTarget) obj; - - if (!getNodePool().equals(other.getNodePool())) return false; - if (!roles_.equals(other.roles_)) return false; - if (hasNodePoolConfig() != other.hasNodePoolConfig()) return false; - if (hasNodePoolConfig()) { - if (!getNodePoolConfig().equals(other.getNodePoolConfig())) 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) + NODE_POOL_FIELD_NUMBER; - hash = (53 * hash) + getNodePool().hashCode(); - if (getRolesCount() > 0) { - hash = (37 * hash) + ROLES_FIELD_NUMBER; - hash = (53 * hash) + roles_.hashCode(); - } - if (hasNodePoolConfig()) { - hash = (37 * hash) + NODE_POOL_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNodePoolConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget 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.dataproc.v1.GkeNodePoolTarget parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( - 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.dataproc.v1.GkeNodePoolTarget parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget 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.dataproc.v1.GkeNodePoolTarget parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget 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.dataproc.v1.GkeNodePoolTarget parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget 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.dataproc.v1.GkeNodePoolTarget prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * GKE NodePools that Dataproc workloads run on.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.GkeNodePoolTarget} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.GkeNodePoolTarget) - com.google.cloud.dataproc.v1.GkeNodePoolTargetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.GkeNodePoolTarget.class, - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.GkeNodePoolTarget.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(); - nodePool_ = ""; - - roles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (nodePoolConfigBuilder_ == null) { - nodePoolConfig_ = null; - } else { - nodePoolConfig_ = null; - nodePoolConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTarget getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTarget build() { - com.google.cloud.dataproc.v1.GkeNodePoolTarget result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeNodePoolTarget buildPartial() { - com.google.cloud.dataproc.v1.GkeNodePoolTarget result = - new com.google.cloud.dataproc.v1.GkeNodePoolTarget(this); - int from_bitField0_ = bitField0_; - result.nodePool_ = nodePool_; - if (((bitField0_ & 0x00000001) != 0)) { - roles_ = java.util.Collections.unmodifiableList(roles_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.roles_ = roles_; - if (nodePoolConfigBuilder_ == null) { - result.nodePoolConfig_ = nodePoolConfig_; - } else { - result.nodePoolConfig_ = nodePoolConfigBuilder_.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.dataproc.v1.GkeNodePoolTarget) { - return mergeFrom((com.google.cloud.dataproc.v1.GkeNodePoolTarget) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.GkeNodePoolTarget other) { - if (other == com.google.cloud.dataproc.v1.GkeNodePoolTarget.getDefaultInstance()) return this; - if (!other.getNodePool().isEmpty()) { - nodePool_ = other.nodePool_; - onChanged(); - } - if (!other.roles_.isEmpty()) { - if (roles_.isEmpty()) { - roles_ = other.roles_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRolesIsMutable(); - roles_.addAll(other.roles_); - } - onChanged(); - } - if (other.hasNodePoolConfig()) { - mergeNodePoolConfig(other.getNodePoolConfig()); - } - 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.dataproc.v1.GkeNodePoolTarget parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.GkeNodePoolTarget) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object nodePool_ = ""; - /** - * - * - *
-     * Required. The target GKE NodePool.
-     * Format:
-     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-     * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodePool. - */ - public java.lang.String getNodePool() { - java.lang.Object ref = nodePool_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nodePool_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The target GKE NodePool.
-     * Format:
-     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-     * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodePool. - */ - public com.google.protobuf.ByteString getNodePoolBytes() { - java.lang.Object ref = nodePool_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nodePool_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The target GKE NodePool.
-     * Format:
-     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-     * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The nodePool to set. - * @return This builder for chaining. - */ - public Builder setNodePool(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nodePool_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The target GKE NodePool.
-     * Format:
-     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-     * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearNodePool() { - - nodePool_ = getDefaultInstance().getNodePool(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The target GKE NodePool.
-     * Format:
-     * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-     * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for nodePool to set. - * @return This builder for chaining. - */ - public Builder setNodePoolBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nodePool_ = value; - onChanged(); - return this; - } - - private java.util.List roles_ = java.util.Collections.emptyList(); - - private void ensureRolesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - roles_ = new java.util.ArrayList(roles_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the roles. - */ - public java.util.List getRolesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role>( - roles_, roles_converter_); - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The count of roles. - */ - public int getRolesCount() { - return roles_.size(); - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the element to return. - * @return The roles at the given index. - */ - public com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role getRoles(int index) { - return roles_converter_.convert(roles_.get(index)); - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index to set the value at. - * @param value The roles to set. - * @return This builder for chaining. - */ - public Builder setRoles(int index, com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The roles to add. - * @return This builder for chaining. - */ - public Builder addRoles(com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param values The roles to add. - * @return This builder for chaining. - */ - public Builder addAllRoles( - java.lang.Iterable values) { - ensureRolesIsMutable(); - for (com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role value : values) { - roles_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearRoles() { - roles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the enum numeric values on the wire for roles. - */ - public java.util.List getRolesValueList() { - return java.util.Collections.unmodifiableList(roles_); - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of roles at the given index. - */ - public int getRolesValue(int index) { - return roles_.get(index); - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of roles at the given index. - * @return This builder for chaining. - */ - public Builder setRolesValue(int index, int value) { - ensureRolesIsMutable(); - roles_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for roles to add. - * @return This builder for chaining. - */ - public Builder addRolesValue(int value) { - ensureRolesIsMutable(); - roles_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The types of role for a GKE NodePool
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param values The enum numeric values on the wire for roles to add. - * @return This builder for chaining. - */ - public Builder addAllRolesValue(java.lang.Iterable values) { - ensureRolesIsMutable(); - for (int value : values) { - roles_.add(value); - } - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.GkeNodePoolConfig nodePoolConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder> - nodePoolConfigBuilder_; - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodePoolConfig field is set. - */ - public boolean hasNodePoolConfig() { - return nodePoolConfigBuilder_ != null || nodePoolConfig_ != null; - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodePoolConfig. - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig getNodePoolConfig() { - if (nodePoolConfigBuilder_ == null) { - return nodePoolConfig_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() - : nodePoolConfig_; - } else { - return nodePoolConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodePoolConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig value) { - if (nodePoolConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nodePoolConfig_ = value; - onChanged(); - } else { - nodePoolConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNodePoolConfig( - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder builderForValue) { - if (nodePoolConfigBuilder_ == null) { - nodePoolConfig_ = builderForValue.build(); - onChanged(); - } else { - nodePoolConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeNodePoolConfig(com.google.cloud.dataproc.v1.GkeNodePoolConfig value) { - if (nodePoolConfigBuilder_ == null) { - if (nodePoolConfig_ != null) { - nodePoolConfig_ = - com.google.cloud.dataproc.v1.GkeNodePoolConfig.newBuilder(nodePoolConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - nodePoolConfig_ = value; - } - onChanged(); - } else { - nodePoolConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearNodePoolConfig() { - if (nodePoolConfigBuilder_ == null) { - nodePoolConfig_ = null; - onChanged(); - } else { - nodePoolConfig_ = null; - nodePoolConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder getNodePoolConfigBuilder() { - - onChanged(); - return getNodePoolConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder getNodePoolConfigOrBuilder() { - if (nodePoolConfigBuilder_ != null) { - return nodePoolConfigBuilder_.getMessageOrBuilder(); - } else { - return nodePoolConfig_ == null - ? com.google.cloud.dataproc.v1.GkeNodePoolConfig.getDefaultInstance() - : nodePoolConfig_; - } - } - /** - * - * - *
-     * Optional. The configuration for the GKE NodePool.
-     * If specified, Dataproc attempts to create a NodePool with the
-     * specified shape. If one with the same name already exists, it is
-     * verified against all specified fields. If a field differs, the
-     * virtual cluster creation will fail.
-     * If omitted, any NodePool with the specified name is used. If a
-     * NodePool with the specified name does not exist, Dataproc create a NodePool
-     * with default values.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder> - getNodePoolConfigFieldBuilder() { - if (nodePoolConfigBuilder_ == null) { - nodePoolConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeNodePoolConfig, - com.google.cloud.dataproc.v1.GkeNodePoolConfig.Builder, - com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder>( - getNodePoolConfig(), getParentForChildren(), isClean()); - nodePoolConfig_ = null; - } - return nodePoolConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.GkeNodePoolTarget) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.GkeNodePoolTarget) - private static final com.google.cloud.dataproc.v1.GkeNodePoolTarget DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.GkeNodePoolTarget(); - } - - public static com.google.cloud.dataproc.v1.GkeNodePoolTarget getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GkeNodePoolTarget parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeNodePoolTarget(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.dataproc.v1.GkeNodePoolTarget getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTargetOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTargetOrBuilder.java deleted file mode 100644 index 64b301fb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeNodePoolTargetOrBuilder.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface GkeNodePoolTargetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.GkeNodePoolTarget) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The target GKE NodePool.
-   * Format:
-   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-   * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodePool. - */ - java.lang.String getNodePool(); - /** - * - * - *
-   * Required. The target GKE NodePool.
-   * Format:
-   * 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
-   * 
- * - * string node_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodePool. - */ - com.google.protobuf.ByteString getNodePoolBytes(); - - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the roles. - */ - java.util.List getRolesList(); - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The count of roles. - */ - int getRolesCount(); - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the element to return. - * @return The roles at the given index. - */ - com.google.cloud.dataproc.v1.GkeNodePoolTarget.Role getRoles(int index); - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return A list containing the enum numeric values on the wire for roles. - */ - java.util.List getRolesValueList(); - /** - * - * - *
-   * Required. The types of role for a GKE NodePool
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.GkeNodePoolTarget.Role roles = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of roles at the given index. - */ - int getRolesValue(int index); - - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the nodePoolConfig field is set. - */ - boolean hasNodePoolConfig(); - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The nodePoolConfig. - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfig getNodePoolConfig(); - /** - * - * - *
-   * Optional. The configuration for the GKE NodePool.
-   * If specified, Dataproc attempts to create a NodePool with the
-   * specified shape. If one with the same name already exists, it is
-   * verified against all specified fields. If a field differs, the
-   * virtual cluster creation will fail.
-   * If omitted, any NodePool with the specified name is used. If a
-   * NodePool with the specified name does not exist, Dataproc create a NodePool
-   * with default values.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeNodePoolConfig node_pool_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.GkeNodePoolConfigOrBuilder getNodePoolConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java deleted file mode 100644 index 6a5663db..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java +++ /dev/null @@ -1,2938 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running
- * [Apache Hadoop
- * MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
- * jobs on [Apache Hadoop
- * YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob} - */ -public final class HadoopJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.HadoopJob) - HadoopJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use HadoopJob.newBuilder() to construct. - private HadoopJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HadoopJob() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HadoopJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private HadoopJob( - 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(); - driverCase_ = 1; - driver_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 2; - driver_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - jarFileUris_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - fileUris_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - archiveUris_.add(s); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 66: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.HadoopJob.class, - com.google.cloud.dataproc.v1.HadoopJob.Builder.class); - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public enum DriverCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MAIN_JAR_FILE_URI(1), - MAIN_CLASS(2), - DRIVER_NOT_SET(0); - private final int value; - - private DriverCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DriverCase valueOf(int value) { - return forNumber(value); - } - - public static DriverCase forNumber(int value) { - switch (value) { - case 1: - return MAIN_JAR_FILE_URI; - case 2: - return MAIN_CLASS; - case 0: - return DRIVER_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public static final int MAIN_JAR_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAIN_CLASS_FIELD_NUMBER = 2; - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 7; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (driverCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, driver_); - } - if (driverCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, driver_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 7); - if (loggingConfig_ != null) { - output.writeMessage(8, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (driverCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, driver_); - } - if (driverCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, driver_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().size(); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLoggingConfig()); - } - 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.dataproc.v1.HadoopJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.HadoopJob other = (com.google.cloud.dataproc.v1.HadoopJob) obj; - - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; - } - if (!getDriverCase().equals(other.getDriverCase())) return false; - switch (driverCase_) { - case 1: - if (!getMainJarFileUri().equals(other.getMainJarFileUri())) return false; - break; - case 2: - if (!getMainClass().equals(other.getMainClass())) return false; - break; - case 0: - default: - } - 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 (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - switch (driverCase_) { - case 1: - hash = (37 * hash) + MAIN_JAR_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainJarFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + MAIN_CLASS_FIELD_NUMBER; - hash = (53 * hash) + getMainClass().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HadoopJob 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.dataproc.v1.HadoopJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( - 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.dataproc.v1.HadoopJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HadoopJob 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.dataproc.v1.HadoopJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HadoopJob 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.dataproc.v1.HadoopJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HadoopJob 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.dataproc.v1.HadoopJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running
-   * [Apache Hadoop
-   * MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
-   * jobs on [Apache Hadoop
-   * YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.HadoopJob) - com.google.cloud.dataproc.v1.HadoopJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 7: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.HadoopJob.class, - com.google.cloud.dataproc.v1.HadoopJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.HadoopJob.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(); - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableProperties().clear(); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - driverCase_ = 0; - driver_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob build() { - com.google.cloud.dataproc.v1.HadoopJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob buildPartial() { - com.google.cloud.dataproc.v1.HadoopJob result = - new com.google.cloud.dataproc.v1.HadoopJob(this); - int from_bitField0_ = bitField0_; - if (driverCase_ == 1) { - result.driver_ = driver_; - } - if (driverCase_ == 2) { - result.driver_ = driver_; - } - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.jarFileUris_ = jarFileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.archiveUris_ = archiveUris_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.build(); - } - result.driverCase_ = driverCase_; - 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.dataproc.v1.HadoopJob) { - return mergeFrom((com.google.cloud.dataproc.v1.HadoopJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.HadoopJob other) { - if (other == com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) return this; - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - switch (other.getDriverCase()) { - case MAIN_JAR_FILE_URI: - { - driverCase_ = 1; - driver_ = other.driver_; - onChanged(); - break; - } - case MAIN_CLASS: - { - driverCase_ = 2; - driver_ = other.driver_; - onChanged(); - break; - } - case DRIVER_NOT_SET: - { - break; - } - } - 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.dataproc.v1.HadoopJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.HadoopJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public Builder clearDriver() { - driverCase_ = 0; - driver_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - @java.lang.Override - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - @java.lang.Override - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @param value The mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearMainJarFileUri() { - if (driverCase_ == 1) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the jar file containing the main class.
-     * Examples:
-     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-     * 
- * - * string main_jar_file_uri = 1; - * - * @param value The bytes for mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - @java.lang.Override - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - @java.lang.Override - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @param value The mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClass(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return This builder for chaining. - */ - public Builder clearMainClass() { - if (driverCase_ == 2) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file containing the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @param value The bytes for mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClassBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not
-     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-     * job properties, since a collision may occur that causes an incorrect job
-     * submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Jar file URIs to add to the CLASSPATHs of the
-     * Hadoop driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-     * to the working directory of Hadoop drivers and distributed tasks. Useful
-     * for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * Hadoop drivers and tasks. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, or .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Hadoop.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-     * classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.HadoopJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.HadoopJob) - private static final com.google.cloud.dataproc.v1.HadoopJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.HadoopJob(); - } - - public static com.google.cloud.dataproc.v1.HadoopJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HadoopJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HadoopJob(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.dataproc.v1.HadoopJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJobOrBuilder.java deleted file mode 100644 index 2ac0697f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJobOrBuilder.java +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface HadoopJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.HadoopJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - boolean hasMainJarFileUri(); - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - java.lang.String getMainJarFileUri(); - /** - * - * - *
-   * The HCFS URI of the jar file containing the main class.
-   * Examples:
-   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
-   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
-   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - com.google.protobuf.ByteString getMainJarFileUriBytes(); - - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - boolean hasMainClass(); - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - java.lang.String getMainClass(); - /** - * - * - *
-   * The name of the driver's main class. The jar file containing the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - com.google.protobuf.ByteString getMainClassBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not
-   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
-   * job properties, since a collision may occur that causes an incorrect job
-   * submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. Jar file URIs to add to the CLASSPATHs of the
-   * Hadoop driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
-   * to the working directory of Hadoop drivers and distributed tasks. Useful
-   * for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted in the working directory of
-   * Hadoop drivers and tasks. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, or .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Hadoop.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site and
-   * classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.HadoopJob.DriverCase getDriverCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJob.java deleted file mode 100644 index f93e4aca..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJob.java +++ /dev/null @@ -1,2178 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running [Apache Hive](https://hive.apache.org/)
- * queries on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.HiveJob} - */ -public final class HiveJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.HiveJob) - HiveJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use HiveJob.newBuilder() to construct. - private HiveJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HiveJob() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HiveJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private HiveJob( - 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(); - queriesCase_ = 1; - queries_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.QueryList) queries_); - queries_ = subBuilder.buildPartial(); - } - queriesCase_ = 2; - break; - } - case 24: - { - continueOnFailure_ = input.readBool(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry scriptVariables__ = - input.readMessage( - ScriptVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - scriptVariables_ - .getMutableMap() - .put(scriptVariables__.getKey(), scriptVariables__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jarFileUris_.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_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetScriptVariables(); - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.HiveJob.class, - com.google.cloud.dataproc.v1.HiveJob.Builder.class); - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public enum QueriesCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - QUERY_FILE_URI(1), - QUERY_LIST(2), - QUERIES_NOT_SET(0); - private final int value; - - private QueriesCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueriesCase valueOf(int value) { - return forNumber(value); - } - - public static QueriesCase forNumber(int value) { - switch (value) { - case 1: - return QUERY_FILE_URI; - case 2: - return QUERY_LIST; - case 0: - return QUERIES_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public static final int QUERY_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_LIST_FIELD_NUMBER = 2; - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - - public static final int CONTINUE_ON_FAILURE_FIELD_NUMBER = 3; - private boolean continueOnFailure_; - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - - public static final int SCRIPT_VARIABLES_FIELD_NUMBER = 4; - - private static final class ScriptVariablesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PROPERTIES_FIELD_NUMBER = 5; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.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 (queriesCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_); - } - if (queriesCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - output.writeBool(3, continueOnFailure_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetScriptVariables(), ScriptVariablesDefaultEntryHolder.defaultEntry, 4); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 5); - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, jarFileUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (queriesCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queries_); - } - if (queriesCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, continueOnFailure_); - } - for (java.util.Map.Entry entry : - internalGetScriptVariables().getMap().entrySet()) { - com.google.protobuf.MapEntry scriptVariables__ = - ScriptVariablesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, scriptVariables__); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, properties__); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().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.dataproc.v1.HiveJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.HiveJob other = (com.google.cloud.dataproc.v1.HiveJob) obj; - - if (getContinueOnFailure() != other.getContinueOnFailure()) return false; - if (!internalGetScriptVariables().equals(other.internalGetScriptVariables())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getQueriesCase().equals(other.getQueriesCase())) return false; - switch (queriesCase_) { - case 1: - if (!getQueryFileUri().equals(other.getQueryFileUri())) return false; - break; - case 2: - if (!getQueryList().equals(other.getQueryList())) return false; - break; - case 0: - default: - } - 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) + CONTINUE_ON_FAILURE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getContinueOnFailure()); - if (!internalGetScriptVariables().getMap().isEmpty()) { - hash = (37 * hash) + SCRIPT_VARIABLES_FIELD_NUMBER; - hash = (53 * hash) + internalGetScriptVariables().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - switch (queriesCase_) { - case 1: - hash = (37 * hash) + QUERY_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getQueryFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + QUERY_LIST_FIELD_NUMBER; - hash = (53 * hash) + getQueryList().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.HiveJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HiveJob 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.dataproc.v1.HiveJob parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HiveJob parseFrom( - 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.dataproc.v1.HiveJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.HiveJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.HiveJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HiveJob 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.dataproc.v1.HiveJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HiveJob 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.dataproc.v1.HiveJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.HiveJob 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.dataproc.v1.HiveJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running [Apache Hive](https://hive.apache.org/)
-   * queries on YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.HiveJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.HiveJob) - com.google.cloud.dataproc.v1.HiveJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetScriptVariables(); - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableScriptVariables(); - case 5: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.HiveJob.class, - com.google.cloud.dataproc.v1.HiveJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.HiveJob.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(); - continueOnFailure_ = false; - - internalGetMutableScriptVariables().clear(); - internalGetMutableProperties().clear(); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - queriesCase_ = 0; - queries_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_HiveJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob build() { - com.google.cloud.dataproc.v1.HiveJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob buildPartial() { - com.google.cloud.dataproc.v1.HiveJob result = new com.google.cloud.dataproc.v1.HiveJob(this); - int from_bitField0_ = bitField0_; - if (queriesCase_ == 1) { - result.queries_ = queries_; - } - if (queriesCase_ == 2) { - if (queryListBuilder_ == null) { - result.queries_ = queries_; - } else { - result.queries_ = queryListBuilder_.build(); - } - } - result.continueOnFailure_ = continueOnFailure_; - result.scriptVariables_ = internalGetScriptVariables(); - result.scriptVariables_.makeImmutable(); - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jarFileUris_ = jarFileUris_; - result.queriesCase_ = queriesCase_; - 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.dataproc.v1.HiveJob) { - return mergeFrom((com.google.cloud.dataproc.v1.HiveJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.HiveJob other) { - if (other == com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance()) return this; - if (other.getContinueOnFailure() != false) { - setContinueOnFailure(other.getContinueOnFailure()); - } - internalGetMutableScriptVariables().mergeFrom(other.internalGetScriptVariables()); - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - switch (other.getQueriesCase()) { - case QUERY_FILE_URI: - { - queriesCase_ = 1; - queries_ = other.queries_; - onChanged(); - break; - } - case QUERY_LIST: - { - mergeQueryList(other.getQueryList()); - break; - } - case QUERIES_NOT_SET: - { - break; - } - } - 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.dataproc.v1.HiveJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.HiveJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public Builder clearQueries() { - queriesCase_ = 0; - queries_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - @java.lang.Override - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - @java.lang.Override - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearQueryFileUri() { - if (queriesCase_ == 1) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains Hive queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The bytes for queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queries_ = value; - onChanged(); - } else { - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList.Builder builderForValue) { - if (queryListBuilder_ == null) { - queries_ = builderForValue.build(); - onChanged(); - } else { - queryListBuilder_.setMessage(builderForValue.build()); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1.QueryList.newBuilder( - (com.google.cloud.dataproc.v1.QueryList) queries_) - .mergeFrom(value) - .buildPartial(); - } else { - queries_ = value; - } - onChanged(); - } else { - if (queriesCase_ == 2) { - queryListBuilder_.mergeFrom(value); - } - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder clearQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - } else { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - } - queryListBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1.QueryList) queries_, - getParentForChildren(), - isClean()); - queries_ = null; - } - queriesCase_ = 2; - onChanged(); - ; - return queryListBuilder_; - } - - private boolean continueOnFailure_; - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The continueOnFailure to set. - * @return This builder for chaining. - */ - public Builder setContinueOnFailure(boolean value) { - - continueOnFailure_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearContinueOnFailure() { - - continueOnFailure_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - private com.google.protobuf.MapField - internalGetMutableScriptVariables() { - onChanged(); - ; - if (scriptVariables_ == null) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - if (!scriptVariables_.isMutable()) { - scriptVariables_ = scriptVariables_.copy(); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearScriptVariables() { - internalGetMutableScriptVariables().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableScriptVariables() { - return internalGetMutableScriptVariables().getMutableMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putScriptVariables(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Hive command: `SET name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllScriptVariables(java.util.Map values) { - internalGetMutableScriptVariables().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names and values, used to configure Hive.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/hive/conf/hive-site.xml, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-     * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-     * and UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.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.dataproc.v1.HiveJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.HiveJob) - private static final com.google.cloud.dataproc.v1.HiveJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.HiveJob(); - } - - public static com.google.cloud.dataproc.v1.HiveJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HiveJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HiveJob(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.dataproc.v1.HiveJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJobOrBuilder.java deleted file mode 100644 index 56fbdebf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJobOrBuilder.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface HiveJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.HiveJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - boolean hasQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - java.lang.String getQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains Hive queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - com.google.protobuf.ByteString getQueryFileUriBytes(); - - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder(); - - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - boolean getContinueOnFailure(); - - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getScriptVariablesCount(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsScriptVariables(java.lang.String key); - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getScriptVariables(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getScriptVariablesMap(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Hive command: `SET name="value";`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names and values, used to configure Hive.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/hive/conf/hive-site.xml, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of the
-   * Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes
-   * and UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - public com.google.cloud.dataproc.v1.HiveJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfig.java deleted file mode 100644 index ead588db..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfig.java +++ /dev/null @@ -1,829 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Identity related configuration, including service account based
- * secure multi-tenancy user mappings.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.IdentityConfig} - */ -public final class IdentityConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.IdentityConfig) - IdentityConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use IdentityConfig.newBuilder() to construct. - private IdentityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private IdentityConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IdentityConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private IdentityConfig( - 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)) { - userServiceAccountMapping_ = - com.google.protobuf.MapField.newMapField( - UserServiceAccountMappingDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - userServiceAccountMapping__ = - input.readMessage( - UserServiceAccountMappingDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - userServiceAccountMapping_ - .getMutableMap() - .put( - userServiceAccountMapping__.getKey(), userServiceAccountMapping__.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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetUserServiceAccountMapping(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.IdentityConfig.class, - com.google.cloud.dataproc.v1.IdentityConfig.Builder.class); - } - - public static final int USER_SERVICE_ACCOUNT_MAPPING_FIELD_NUMBER = 1; - - private static final class UserServiceAccountMappingDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_UserServiceAccountMappingEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField - userServiceAccountMapping_; - - private com.google.protobuf.MapField - internalGetUserServiceAccountMapping() { - if (userServiceAccountMapping_ == null) { - return com.google.protobuf.MapField.emptyMapField( - UserServiceAccountMappingDefaultEntryHolder.defaultEntry); - } - return userServiceAccountMapping_; - } - - public int getUserServiceAccountMappingCount() { - return internalGetUserServiceAccountMapping().getMap().size(); - } - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsUserServiceAccountMapping(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetUserServiceAccountMapping().getMap().containsKey(key); - } - /** Use {@link #getUserServiceAccountMappingMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getUserServiceAccountMapping() { - return getUserServiceAccountMappingMap(); - } - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map getUserServiceAccountMappingMap() { - return internalGetUserServiceAccountMapping().getMap(); - } - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getUserServiceAccountMappingOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetUserServiceAccountMapping().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getUserServiceAccountMappingOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetUserServiceAccountMapping().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetUserServiceAccountMapping(), - UserServiceAccountMappingDefaultEntryHolder.defaultEntry, - 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetUserServiceAccountMapping().getMap().entrySet()) { - com.google.protobuf.MapEntry userServiceAccountMapping__ = - UserServiceAccountMappingDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, userServiceAccountMapping__); - } - 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.dataproc.v1.IdentityConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.IdentityConfig other = - (com.google.cloud.dataproc.v1.IdentityConfig) obj; - - if (!internalGetUserServiceAccountMapping() - .equals(other.internalGetUserServiceAccountMapping())) 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 (!internalGetUserServiceAccountMapping().getMap().isEmpty()) { - hash = (37 * hash) + USER_SERVICE_ACCOUNT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + internalGetUserServiceAccountMapping().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.IdentityConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig 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.dataproc.v1.IdentityConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig parseFrom( - 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.dataproc.v1.IdentityConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig 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.dataproc.v1.IdentityConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig 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.dataproc.v1.IdentityConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig 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.dataproc.v1.IdentityConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.IdentityConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.IdentityConfig) - com.google.cloud.dataproc.v1.IdentityConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetUserServiceAccountMapping(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableUserServiceAccountMapping(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.IdentityConfig.class, - com.google.cloud.dataproc.v1.IdentityConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.IdentityConfig.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(); - internalGetMutableUserServiceAccountMapping().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_IdentityConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.IdentityConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.IdentityConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.IdentityConfig build() { - com.google.cloud.dataproc.v1.IdentityConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.IdentityConfig buildPartial() { - com.google.cloud.dataproc.v1.IdentityConfig result = - new com.google.cloud.dataproc.v1.IdentityConfig(this); - int from_bitField0_ = bitField0_; - result.userServiceAccountMapping_ = internalGetUserServiceAccountMapping(); - result.userServiceAccountMapping_.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.dataproc.v1.IdentityConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.IdentityConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.IdentityConfig other) { - if (other == com.google.cloud.dataproc.v1.IdentityConfig.getDefaultInstance()) return this; - internalGetMutableUserServiceAccountMapping() - .mergeFrom(other.internalGetUserServiceAccountMapping()); - 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.dataproc.v1.IdentityConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.IdentityConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField - userServiceAccountMapping_; - - private com.google.protobuf.MapField - internalGetUserServiceAccountMapping() { - if (userServiceAccountMapping_ == null) { - return com.google.protobuf.MapField.emptyMapField( - UserServiceAccountMappingDefaultEntryHolder.defaultEntry); - } - return userServiceAccountMapping_; - } - - private com.google.protobuf.MapField - internalGetMutableUserServiceAccountMapping() { - onChanged(); - ; - if (userServiceAccountMapping_ == null) { - userServiceAccountMapping_ = - com.google.protobuf.MapField.newMapField( - UserServiceAccountMappingDefaultEntryHolder.defaultEntry); - } - if (!userServiceAccountMapping_.isMutable()) { - userServiceAccountMapping_ = userServiceAccountMapping_.copy(); - } - return userServiceAccountMapping_; - } - - public int getUserServiceAccountMappingCount() { - return internalGetUserServiceAccountMapping().getMap().size(); - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public boolean containsUserServiceAccountMapping(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetUserServiceAccountMapping().getMap().containsKey(key); - } - /** Use {@link #getUserServiceAccountMappingMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getUserServiceAccountMapping() { - return getUserServiceAccountMappingMap(); - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.Map getUserServiceAccountMappingMap() { - return internalGetUserServiceAccountMapping().getMap(); - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getUserServiceAccountMappingOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetUserServiceAccountMapping().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.lang.String getUserServiceAccountMappingOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetUserServiceAccountMapping().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearUserServiceAccountMapping() { - internalGetMutableUserServiceAccountMapping().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeUserServiceAccountMapping(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableUserServiceAccountMapping().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableUserServiceAccountMapping() { - return internalGetMutableUserServiceAccountMapping().getMutableMap(); - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putUserServiceAccountMapping(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableUserServiceAccountMapping().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Required. Map of user to service account.
-     * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder putAllUserServiceAccountMapping( - java.util.Map values) { - internalGetMutableUserServiceAccountMapping().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.dataproc.v1.IdentityConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.IdentityConfig) - private static final com.google.cloud.dataproc.v1.IdentityConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.IdentityConfig(); - } - - public static com.google.cloud.dataproc.v1.IdentityConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IdentityConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentityConfig(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.dataproc.v1.IdentityConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfigOrBuilder.java deleted file mode 100644 index 8e42dfec..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfigOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface IdentityConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.IdentityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getUserServiceAccountMappingCount(); - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - boolean containsUserServiceAccountMapping(java.lang.String key); - /** Use {@link #getUserServiceAccountMappingMap()} instead. */ - @java.lang.Deprecated - java.util.Map getUserServiceAccountMapping(); - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.Map getUserServiceAccountMappingMap(); - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.lang.String getUserServiceAccountMappingOrDefault( - java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Required. Map of user to service account.
-   * 
- * - * - * map<string, string> user_service_account_mapping = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.lang.String getUserServiceAccountMappingOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfig.java deleted file mode 100644 index e1ed8a7d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfig.java +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Configuration for the size bounds of an instance group, including its
- * proportional size to other groups.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig} - */ -public final class InstanceGroupAutoscalingPolicyConfig - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - InstanceGroupAutoscalingPolicyConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use InstanceGroupAutoscalingPolicyConfig.newBuilder() to construct. - private InstanceGroupAutoscalingPolicyConfig( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InstanceGroupAutoscalingPolicyConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstanceGroupAutoscalingPolicyConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private InstanceGroupAutoscalingPolicyConfig( - 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: - { - minInstances_ = input.readInt32(); - break; - } - case 16: - { - maxInstances_ = input.readInt32(); - break; - } - case 24: - { - weight_ = input.readInt32(); - 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.class, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder.class); - } - - public static final int MIN_INSTANCES_FIELD_NUMBER = 1; - private int minInstances_; - /** - * - * - *
-   * Optional. Minimum number of instances for this group.
-   * Primary workers - Bounds: [2, max_instances]. Default: 2.
-   * Secondary workers - Bounds: [0, max_instances]. Default: 0.
-   * 
- * - * int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minInstances. - */ - @java.lang.Override - public int getMinInstances() { - return minInstances_; - } - - public static final int MAX_INSTANCES_FIELD_NUMBER = 2; - private int maxInstances_; - /** - * - * - *
-   * Required. Maximum number of instances for this group. Required for primary
-   * workers. Note that by default, clusters will not use secondary workers.
-   * Required for secondary workers if the minimum secondary instances is set.
-   * Primary workers - Bounds: [min_instances, ).
-   * Secondary workers - Bounds: [min_instances, ). Default: 0.
-   * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The maxInstances. - */ - @java.lang.Override - public int getMaxInstances() { - return maxInstances_; - } - - public static final int WEIGHT_FIELD_NUMBER = 3; - private int weight_; - /** - * - * - *
-   * Optional. Weight for the instance group, which is used to determine the
-   * fraction of total workers in the cluster from this instance group.
-   * For example, if primary workers have weight 2, and secondary workers have
-   * weight 1, the cluster will have approximately 2 primary workers for each
-   * secondary worker.
-   * The cluster may not reach the specified balance if constrained
-   * by min/max bounds or other autoscaling settings. For example, if
-   * `max_instances` for secondary workers is 0, then only primary workers will
-   * be added. The cluster can also be out of balance when created.
-   * If weight is not set on any instance group, the cluster will default to
-   * equal weight for all groups: the cluster will attempt to maintain an equal
-   * number of workers in each group within the configured size bounds for each
-   * group. If weight is set for one group only, the cluster will default to
-   * zero weight on the unset group. For example if weight is set only on
-   * primary workers, the cluster will use primary workers only and no
-   * secondary workers.
-   * 
- * - * int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The weight. - */ - @java.lang.Override - public int getWeight() { - return weight_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (minInstances_ != 0) { - output.writeInt32(1, minInstances_); - } - if (maxInstances_ != 0) { - output.writeInt32(2, maxInstances_); - } - if (weight_ != 0) { - output.writeInt32(3, weight_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minInstances_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minInstances_); - } - if (maxInstances_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxInstances_); - } - if (weight_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, weight_); - } - 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig other = - (com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) obj; - - if (getMinInstances() != other.getMinInstances()) return false; - if (getMaxInstances() != other.getMaxInstances()) return false; - if (getWeight() != other.getWeight()) 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) + MIN_INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getMinInstances(); - hash = (37 * hash) + MAX_INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getMaxInstances(); - hash = (37 * hash) + WEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getWeight(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Configuration for the size bounds of an instance group, including its
-   * proportional size to other groups.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.class, - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.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(); - minInstances_ = 0; - - maxInstances_ = 0; - - weight_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig build() { - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig buildPartial() { - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig result = - new com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig(this); - result.minInstances_ = minInstances_; - result.maxInstances_ = maxInstances_; - result.weight_ = weight_; - 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig other) { - if (other - == com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig.getDefaultInstance()) - return this; - if (other.getMinInstances() != 0) { - setMinInstances(other.getMinInstances()); - } - if (other.getMaxInstances() != 0) { - setMaxInstances(other.getMaxInstances()); - } - if (other.getWeight() != 0) { - setWeight(other.getWeight()); - } - 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int minInstances_; - /** - * - * - *
-     * Optional. Minimum number of instances for this group.
-     * Primary workers - Bounds: [2, max_instances]. Default: 2.
-     * Secondary workers - Bounds: [0, max_instances]. Default: 0.
-     * 
- * - * int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minInstances. - */ - @java.lang.Override - public int getMinInstances() { - return minInstances_; - } - /** - * - * - *
-     * Optional. Minimum number of instances for this group.
-     * Primary workers - Bounds: [2, max_instances]. Default: 2.
-     * Secondary workers - Bounds: [0, max_instances]. Default: 0.
-     * 
- * - * int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minInstances to set. - * @return This builder for chaining. - */ - public Builder setMinInstances(int value) { - - minInstances_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Minimum number of instances for this group.
-     * Primary workers - Bounds: [2, max_instances]. Default: 2.
-     * Secondary workers - Bounds: [0, max_instances]. Default: 0.
-     * 
- * - * int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinInstances() { - - minInstances_ = 0; - onChanged(); - return this; - } - - private int maxInstances_; - /** - * - * - *
-     * Required. Maximum number of instances for this group. Required for primary
-     * workers. Note that by default, clusters will not use secondary workers.
-     * Required for secondary workers if the minimum secondary instances is set.
-     * Primary workers - Bounds: [min_instances, ).
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The maxInstances. - */ - @java.lang.Override - public int getMaxInstances() { - return maxInstances_; - } - /** - * - * - *
-     * Required. Maximum number of instances for this group. Required for primary
-     * workers. Note that by default, clusters will not use secondary workers.
-     * Required for secondary workers if the minimum secondary instances is set.
-     * Primary workers - Bounds: [min_instances, ).
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The maxInstances to set. - * @return This builder for chaining. - */ - public Builder setMaxInstances(int value) { - - maxInstances_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Maximum number of instances for this group. Required for primary
-     * workers. Note that by default, clusters will not use secondary workers.
-     * Required for secondary workers if the minimum secondary instances is set.
-     * Primary workers - Bounds: [min_instances, ).
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMaxInstances() { - - maxInstances_ = 0; - onChanged(); - return this; - } - - private int weight_; - /** - * - * - *
-     * Optional. Weight for the instance group, which is used to determine the
-     * fraction of total workers in the cluster from this instance group.
-     * For example, if primary workers have weight 2, and secondary workers have
-     * weight 1, the cluster will have approximately 2 primary workers for each
-     * secondary worker.
-     * The cluster may not reach the specified balance if constrained
-     * by min/max bounds or other autoscaling settings. For example, if
-     * `max_instances` for secondary workers is 0, then only primary workers will
-     * be added. The cluster can also be out of balance when created.
-     * If weight is not set on any instance group, the cluster will default to
-     * equal weight for all groups: the cluster will attempt to maintain an equal
-     * number of workers in each group within the configured size bounds for each
-     * group. If weight is set for one group only, the cluster will default to
-     * zero weight on the unset group. For example if weight is set only on
-     * primary workers, the cluster will use primary workers only and no
-     * secondary workers.
-     * 
- * - * int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The weight. - */ - @java.lang.Override - public int getWeight() { - return weight_; - } - /** - * - * - *
-     * Optional. Weight for the instance group, which is used to determine the
-     * fraction of total workers in the cluster from this instance group.
-     * For example, if primary workers have weight 2, and secondary workers have
-     * weight 1, the cluster will have approximately 2 primary workers for each
-     * secondary worker.
-     * The cluster may not reach the specified balance if constrained
-     * by min/max bounds or other autoscaling settings. For example, if
-     * `max_instances` for secondary workers is 0, then only primary workers will
-     * be added. The cluster can also be out of balance when created.
-     * If weight is not set on any instance group, the cluster will default to
-     * equal weight for all groups: the cluster will attempt to maintain an equal
-     * number of workers in each group within the configured size bounds for each
-     * group. If weight is set for one group only, the cluster will default to
-     * zero weight on the unset group. For example if weight is set only on
-     * primary workers, the cluster will use primary workers only and no
-     * secondary workers.
-     * 
- * - * int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The weight to set. - * @return This builder for chaining. - */ - public Builder setWeight(int value) { - - weight_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Weight for the instance group, which is used to determine the
-     * fraction of total workers in the cluster from this instance group.
-     * For example, if primary workers have weight 2, and secondary workers have
-     * weight 1, the cluster will have approximately 2 primary workers for each
-     * secondary worker.
-     * The cluster may not reach the specified balance if constrained
-     * by min/max bounds or other autoscaling settings. For example, if
-     * `max_instances` for secondary workers is 0, then only primary workers will
-     * be added. The cluster can also be out of balance when created.
-     * If weight is not set on any instance group, the cluster will default to
-     * equal weight for all groups: the cluster will attempt to maintain an equal
-     * number of workers in each group within the configured size bounds for each
-     * group. If weight is set for one group only, the cluster will default to
-     * zero weight on the unset group. For example if weight is set only on
-     * primary workers, the cluster will use primary workers only and no
-     * secondary workers.
-     * 
- * - * int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearWeight() { - - weight_ = 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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - private static final com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig(); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InstanceGroupAutoscalingPolicyConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupAutoscalingPolicyConfig(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.dataproc.v1.InstanceGroupAutoscalingPolicyConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfigOrBuilder.java deleted file mode 100644 index 6076ba8d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfigOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface InstanceGroupAutoscalingPolicyConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Minimum number of instances for this group.
-   * Primary workers - Bounds: [2, max_instances]. Default: 2.
-   * Secondary workers - Bounds: [0, max_instances]. Default: 0.
-   * 
- * - * int32 min_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minInstances. - */ - int getMinInstances(); - - /** - * - * - *
-   * Required. Maximum number of instances for this group. Required for primary
-   * workers. Note that by default, clusters will not use secondary workers.
-   * Required for secondary workers if the minimum secondary instances is set.
-   * Primary workers - Bounds: [min_instances, ).
-   * Secondary workers - Bounds: [min_instances, ). Default: 0.
-   * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The maxInstances. - */ - int getMaxInstances(); - - /** - * - * - *
-   * Optional. Weight for the instance group, which is used to determine the
-   * fraction of total workers in the cluster from this instance group.
-   * For example, if primary workers have weight 2, and secondary workers have
-   * weight 1, the cluster will have approximately 2 primary workers for each
-   * secondary worker.
-   * The cluster may not reach the specified balance if constrained
-   * by min/max bounds or other autoscaling settings. For example, if
-   * `max_instances` for secondary workers is 0, then only primary workers will
-   * be added. The cluster can also be out of balance when created.
-   * If weight is not set on any instance group, the cluster will default to
-   * equal weight for all groups: the cluster will attempt to maintain an equal
-   * number of workers in each group within the configured size bounds for each
-   * group. If weight is set for one group only, the cluster will default to
-   * zero weight on the unset group. For example if weight is set only on
-   * primary workers, the cluster will use primary workers only and no
-   * secondary workers.
-   * 
- * - * int32 weight = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The weight. - */ - int getWeight(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java deleted file mode 100644 index 202f4c4e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java +++ /dev/null @@ -1,3211 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The config settings for Compute Engine resources in
- * an instance group, such as a master or worker group.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupConfig} - */ -public final class InstanceGroupConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.InstanceGroupConfig) - InstanceGroupConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use InstanceGroupConfig.newBuilder() to construct. - private InstanceGroupConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InstanceGroupConfig() { - instanceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - imageUri_ = ""; - machineTypeUri_ = ""; - preemptibility_ = 0; - accelerators_ = java.util.Collections.emptyList(); - minCpuPlatform_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstanceGroupConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private InstanceGroupConfig( - 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 8: - { - numInstances_ = input.readInt32(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instanceNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instanceNames_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - imageUri_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - machineTypeUri_ = s; - break; - } - case 42: - { - com.google.cloud.dataproc.v1.DiskConfig.Builder subBuilder = null; - if (diskConfig_ != null) { - subBuilder = diskConfig_.toBuilder(); - } - diskConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.DiskConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskConfig_); - diskConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - isPreemptible_ = input.readBool(); - break; - } - case 58: - { - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder subBuilder = null; - if (managedGroupConfig_ != null) { - subBuilder = managedGroupConfig_.toBuilder(); - } - managedGroupConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.ManagedGroupConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(managedGroupConfig_); - managedGroupConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - accelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - accelerators_.add( - input.readMessage( - com.google.cloud.dataproc.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - minCpuPlatform_ = s; - break; - } - case 80: - { - int rawValue = input.readEnum(); - - preemptibility_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - instanceNames_ = instanceNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstanceGroupConfig.class, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder.class); - } - - /** - * - * - *
-   * Controls the use of
-   * [preemptible instances]
-   * (https://cloud.google.com/compute/docs/instances/preemptible)
-   * within the group.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility} - */ - public enum Preemptibility implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Preemptibility is unspecified, the system will choose the
-     * appropriate setting for each instance group.
-     * 
- * - * PREEMPTIBILITY_UNSPECIFIED = 0; - */ - PREEMPTIBILITY_UNSPECIFIED(0), - /** - * - * - *
-     * Instances are non-preemptible.
-     * This option is allowed for all instance groups and is the only valid
-     * value for Master and Worker instance groups.
-     * 
- * - * NON_PREEMPTIBLE = 1; - */ - NON_PREEMPTIBLE(1), - /** - * - * - *
-     * Instances are preemptible.
-     * This option is allowed only for secondary worker groups.
-     * 
- * - * PREEMPTIBLE = 2; - */ - PREEMPTIBLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Preemptibility is unspecified, the system will choose the
-     * appropriate setting for each instance group.
-     * 
- * - * PREEMPTIBILITY_UNSPECIFIED = 0; - */ - public static final int PREEMPTIBILITY_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Instances are non-preemptible.
-     * This option is allowed for all instance groups and is the only valid
-     * value for Master and Worker instance groups.
-     * 
- * - * NON_PREEMPTIBLE = 1; - */ - public static final int NON_PREEMPTIBLE_VALUE = 1; - /** - * - * - *
-     * Instances are preemptible.
-     * This option is allowed only for secondary worker groups.
-     * 
- * - * PREEMPTIBLE = 2; - */ - public static final int PREEMPTIBLE_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 Preemptibility 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 Preemptibility forNumber(int value) { - switch (value) { - case 0: - return PREEMPTIBILITY_UNSPECIFIED; - case 1: - return NON_PREEMPTIBLE; - case 2: - return PREEMPTIBLE; - 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 Preemptibility findValueByNumber(int number) { - return Preemptibility.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.dataproc.v1.InstanceGroupConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final Preemptibility[] VALUES = values(); - - public static Preemptibility 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 Preemptibility(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility) - } - - public static final int NUM_INSTANCES_FIELD_NUMBER = 1; - private int numInstances_; - /** - * - * - *
-   * Optional. The number of VM instances in the instance group.
-   * For [HA
-   * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
-   * [master_config](#FIELDS.master_config) groups, **must be set to 3**.
-   * For standard cluster [master_config](#FIELDS.master_config) groups,
-   * **must be set to 1**.
-   * 
- * - * int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numInstances. - */ - @java.lang.Override - public int getNumInstances() { - return numInstances_; - } - - public static final int INSTANCE_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList instanceNames_; - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the instanceNames. - */ - public com.google.protobuf.ProtocolStringList getInstanceNamesList() { - return instanceNames_; - } - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of instanceNames. - */ - public int getInstanceNamesCount() { - return instanceNames_.size(); - } - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The instanceNames at the given index. - */ - public java.lang.String getInstanceNames(int index) { - return instanceNames_.get(index); - } - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the instanceNames at the given index. - */ - public com.google.protobuf.ByteString getInstanceNamesBytes(int index) { - return instanceNames_.getByteString(index); - } - - public static final int IMAGE_URI_FIELD_NUMBER = 3; - private volatile java.lang.Object imageUri_; - /** - * - * - *
-   * Optional. The Compute Engine image resource used for cluster instances.
-   * The URI can represent an image or image family.
-   * Image examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-   * * `projects/[project_id]/global/images/[image-id]`
-   * * `image-id`
-   * Image family examples. Dataproc will use the most recent
-   * image from the family:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * If the URI is unspecified, it will be inferred from
-   * `SoftwareConfig.image_version` or the system default.
-   * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageUri. - */ - @java.lang.Override - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Compute Engine image resource used for cluster instances.
-   * The URI can represent an image or image family.
-   * Image examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-   * * `projects/[project_id]/global/images/[image-id]`
-   * * `image-id`
-   * Image family examples. Dataproc will use the most recent
-   * image from the family:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * If the URI is unspecified, it will be inferred from
-   * `SoftwareConfig.image_version` or the system default.
-   * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MACHINE_TYPE_URI_FIELD_NUMBER = 4; - private volatile java.lang.Object machineTypeUri_; - /** - * - * - *
-   * Optional. The Compute Engine machine type used for cluster instances.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `n1-standard-2`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the machine type
-   * resource, for example, `n1-standard-2`.
-   * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineTypeUri. - */ - @java.lang.Override - public java.lang.String getMachineTypeUri() { - java.lang.Object ref = machineTypeUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - machineTypeUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Compute Engine machine type used for cluster instances.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `n1-standard-2`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the machine type
-   * resource, for example, `n1-standard-2`.
-   * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineTypeUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMachineTypeUriBytes() { - java.lang.Object ref = machineTypeUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineTypeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISK_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.dataproc.v1.DiskConfig diskConfig_; - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the diskConfig field is set. - */ - @java.lang.Override - public boolean hasDiskConfig() { - return diskConfig_ != null; - } - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.DiskConfig getDiskConfig() { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance() - : diskConfig_; - } - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.DiskConfigOrBuilder getDiskConfigOrBuilder() { - return getDiskConfig(); - } - - public static final int IS_PREEMPTIBLE_FIELD_NUMBER = 6; - private boolean isPreemptible_; - /** - * - * - *
-   * Output only. Specifies that this instance group contains preemptible
-   * instances.
-   * 
- * - * bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The isPreemptible. - */ - @java.lang.Override - public boolean getIsPreemptible() { - return isPreemptible_; - } - - public static final int PREEMPTIBILITY_FIELD_NUMBER = 10; - private int preemptibility_; - /** - * - * - *
-   * Optional. Specifies the preemptibility of the instance group.
-   * The default value for master and worker groups is
-   * `NON_PREEMPTIBLE`. This default cannot be changed.
-   * The default value for secondary instances is
-   * `PREEMPTIBLE`.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for preemptibility. - */ - @java.lang.Override - public int getPreemptibilityValue() { - return preemptibility_; - } - /** - * - * - *
-   * Optional. Specifies the preemptibility of the instance group.
-   * The default value for master and worker groups is
-   * `NON_PREEMPTIBLE`. This default cannot be changed.
-   * The default value for secondary instances is
-   * `PREEMPTIBLE`.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The preemptibility. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility getPreemptibility() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility result = - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.valueOf(preemptibility_); - return result == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.UNRECOGNIZED - : result; - } - - public static final int MANAGED_GROUP_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1.ManagedGroupConfig managedGroupConfig_; - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the managedGroupConfig field is set. - */ - @java.lang.Override - public boolean hasManagedGroupConfig() { - return managedGroupConfig_ != null; - } - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedGroupConfig getManagedGroupConfig() { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance() - : managedGroupConfig_; - } - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder getManagedGroupConfigOrBuilder() { - return getManagedGroupConfig(); - } - - public static final int ACCELERATORS_FIELD_NUMBER = 8; - private java.util.List accelerators_; - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getAcceleratorsList() { - return accelerators_; - } - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getAcceleratorsOrBuilderList() { - return accelerators_; - } - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getAcceleratorsCount() { - return accelerators_.size(); - } - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AcceleratorConfig getAccelerators(int index) { - return accelerators_.get(index); - } - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder( - int index) { - return accelerators_.get(index); - } - - public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 9; - private volatile java.lang.Object minCpuPlatform_; - /** - * - * - *
-   * Optional. Specifies the minimum cpu platform for the Instance Group.
-   * See [Dataproc -> Minimum CPU
-   * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-   * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - @java.lang.Override - public java.lang.String getMinCpuPlatform() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - minCpuPlatform_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specifies the minimum cpu platform for the Instance Group.
-   * See [Dataproc -> Minimum CPU
-   * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-   * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMinCpuPlatformBytes() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - minCpuPlatform_ = 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 (numInstances_ != 0) { - output.writeInt32(1, numInstances_); - } - for (int i = 0; i < instanceNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceNames_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, machineTypeUri_); - } - if (diskConfig_ != null) { - output.writeMessage(5, getDiskConfig()); - } - if (isPreemptible_ != false) { - output.writeBool(6, isPreemptible_); - } - if (managedGroupConfig_ != null) { - output.writeMessage(7, getManagedGroupConfig()); - } - for (int i = 0; i < accelerators_.size(); i++) { - output.writeMessage(8, accelerators_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, minCpuPlatform_); - } - if (preemptibility_ - != com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility - .PREEMPTIBILITY_UNSPECIFIED - .getNumber()) { - output.writeEnum(10, preemptibility_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (numInstances_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numInstances_); - } - { - int dataSize = 0; - for (int i = 0; i < instanceNames_.size(); i++) { - dataSize += computeStringSizeNoTag(instanceNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getInstanceNamesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, machineTypeUri_); - } - if (diskConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDiskConfig()); - } - if (isPreemptible_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isPreemptible_); - } - if (managedGroupConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getManagedGroupConfig()); - } - for (int i = 0; i < accelerators_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, accelerators_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, minCpuPlatform_); - } - if (preemptibility_ - != com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility - .PREEMPTIBILITY_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, preemptibility_); - } - 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.dataproc.v1.InstanceGroupConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.InstanceGroupConfig other = - (com.google.cloud.dataproc.v1.InstanceGroupConfig) obj; - - if (getNumInstances() != other.getNumInstances()) return false; - if (!getInstanceNamesList().equals(other.getInstanceNamesList())) return false; - if (!getImageUri().equals(other.getImageUri())) return false; - if (!getMachineTypeUri().equals(other.getMachineTypeUri())) return false; - if (hasDiskConfig() != other.hasDiskConfig()) return false; - if (hasDiskConfig()) { - if (!getDiskConfig().equals(other.getDiskConfig())) return false; - } - if (getIsPreemptible() != other.getIsPreemptible()) return false; - if (preemptibility_ != other.preemptibility_) return false; - if (hasManagedGroupConfig() != other.hasManagedGroupConfig()) return false; - if (hasManagedGroupConfig()) { - if (!getManagedGroupConfig().equals(other.getManagedGroupConfig())) return false; - } - if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false; - if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) 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) + NUM_INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getNumInstances(); - if (getInstanceNamesCount() > 0) { - hash = (37 * hash) + INSTANCE_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getInstanceNamesList().hashCode(); - } - hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; - hash = (53 * hash) + getImageUri().hashCode(); - hash = (37 * hash) + MACHINE_TYPE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMachineTypeUri().hashCode(); - if (hasDiskConfig()) { - hash = (37 * hash) + DISK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDiskConfig().hashCode(); - } - hash = (37 * hash) + IS_PREEMPTIBLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPreemptible()); - hash = (37 * hash) + PREEMPTIBILITY_FIELD_NUMBER; - hash = (53 * hash) + preemptibility_; - if (hasManagedGroupConfig()) { - hash = (37 * hash) + MANAGED_GROUP_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getManagedGroupConfig().hashCode(); - } - if (getAcceleratorsCount() > 0) { - hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER; - hash = (53 * hash) + getAcceleratorsList().hashCode(); - } - hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; - hash = (53 * hash) + getMinCpuPlatform().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom( - 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.dataproc.v1.InstanceGroupConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 config settings for Compute Engine resources in
-   * an instance group, such as a master or worker group.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.InstanceGroupConfig) - com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstanceGroupConfig.class, - com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAcceleratorsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - numInstances_ = 0; - - instanceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - imageUri_ = ""; - - machineTypeUri_ = ""; - - if (diskConfigBuilder_ == null) { - diskConfig_ = null; - } else { - diskConfig_ = null; - diskConfigBuilder_ = null; - } - isPreemptible_ = false; - - preemptibility_ = 0; - - if (managedGroupConfigBuilder_ == null) { - managedGroupConfig_ = null; - } else { - managedGroupConfig_ = null; - managedGroupConfigBuilder_ = null; - } - if (acceleratorsBuilder_ == null) { - accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - acceleratorsBuilder_.clear(); - } - minCpuPlatform_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig build() { - com.google.cloud.dataproc.v1.InstanceGroupConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig buildPartial() { - com.google.cloud.dataproc.v1.InstanceGroupConfig result = - new com.google.cloud.dataproc.v1.InstanceGroupConfig(this); - int from_bitField0_ = bitField0_; - result.numInstances_ = numInstances_; - if (((bitField0_ & 0x00000001) != 0)) { - instanceNames_ = instanceNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.instanceNames_ = instanceNames_; - result.imageUri_ = imageUri_; - result.machineTypeUri_ = machineTypeUri_; - if (diskConfigBuilder_ == null) { - result.diskConfig_ = diskConfig_; - } else { - result.diskConfig_ = diskConfigBuilder_.build(); - } - result.isPreemptible_ = isPreemptible_; - result.preemptibility_ = preemptibility_; - if (managedGroupConfigBuilder_ == null) { - result.managedGroupConfig_ = managedGroupConfig_; - } else { - result.managedGroupConfig_ = managedGroupConfigBuilder_.build(); - } - if (acceleratorsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.accelerators_ = accelerators_; - } else { - result.accelerators_ = acceleratorsBuilder_.build(); - } - result.minCpuPlatform_ = minCpuPlatform_; - 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.dataproc.v1.InstanceGroupConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.InstanceGroupConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.InstanceGroupConfig other) { - if (other == com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance()) - return this; - if (other.getNumInstances() != 0) { - setNumInstances(other.getNumInstances()); - } - if (!other.instanceNames_.isEmpty()) { - if (instanceNames_.isEmpty()) { - instanceNames_ = other.instanceNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInstanceNamesIsMutable(); - instanceNames_.addAll(other.instanceNames_); - } - onChanged(); - } - if (!other.getImageUri().isEmpty()) { - imageUri_ = other.imageUri_; - onChanged(); - } - if (!other.getMachineTypeUri().isEmpty()) { - machineTypeUri_ = other.machineTypeUri_; - onChanged(); - } - if (other.hasDiskConfig()) { - mergeDiskConfig(other.getDiskConfig()); - } - if (other.getIsPreemptible() != false) { - setIsPreemptible(other.getIsPreemptible()); - } - if (other.preemptibility_ != 0) { - setPreemptibilityValue(other.getPreemptibilityValue()); - } - if (other.hasManagedGroupConfig()) { - mergeManagedGroupConfig(other.getManagedGroupConfig()); - } - if (acceleratorsBuilder_ == null) { - if (!other.accelerators_.isEmpty()) { - if (accelerators_.isEmpty()) { - accelerators_ = other.accelerators_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAcceleratorsIsMutable(); - accelerators_.addAll(other.accelerators_); - } - onChanged(); - } - } else { - if (!other.accelerators_.isEmpty()) { - if (acceleratorsBuilder_.isEmpty()) { - acceleratorsBuilder_.dispose(); - acceleratorsBuilder_ = null; - accelerators_ = other.accelerators_; - bitField0_ = (bitField0_ & ~0x00000002); - acceleratorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAcceleratorsFieldBuilder() - : null; - } else { - acceleratorsBuilder_.addAllMessages(other.accelerators_); - } - } - } - if (!other.getMinCpuPlatform().isEmpty()) { - minCpuPlatform_ = other.minCpuPlatform_; - 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.dataproc.v1.InstanceGroupConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.InstanceGroupConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int numInstances_; - /** - * - * - *
-     * Optional. The number of VM instances in the instance group.
-     * For [HA
-     * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
-     * [master_config](#FIELDS.master_config) groups, **must be set to 3**.
-     * For standard cluster [master_config](#FIELDS.master_config) groups,
-     * **must be set to 1**.
-     * 
- * - * int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numInstances. - */ - @java.lang.Override - public int getNumInstances() { - return numInstances_; - } - /** - * - * - *
-     * Optional. The number of VM instances in the instance group.
-     * For [HA
-     * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
-     * [master_config](#FIELDS.master_config) groups, **must be set to 3**.
-     * For standard cluster [master_config](#FIELDS.master_config) groups,
-     * **must be set to 1**.
-     * 
- * - * int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The numInstances to set. - * @return This builder for chaining. - */ - public Builder setNumInstances(int value) { - - numInstances_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The number of VM instances in the instance group.
-     * For [HA
-     * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
-     * [master_config](#FIELDS.master_config) groups, **must be set to 3**.
-     * For standard cluster [master_config](#FIELDS.master_config) groups,
-     * **must be set to 1**.
-     * 
- * - * int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNumInstances() { - - numInstances_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList instanceNames_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureInstanceNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - instanceNames_ = new com.google.protobuf.LazyStringArrayList(instanceNames_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the instanceNames. - */ - public com.google.protobuf.ProtocolStringList getInstanceNamesList() { - return instanceNames_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of instanceNames. - */ - public int getInstanceNamesCount() { - return instanceNames_.size(); - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The instanceNames at the given index. - */ - public java.lang.String getInstanceNames(int index) { - return instanceNames_.get(index); - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the instanceNames at the given index. - */ - public com.google.protobuf.ByteString getInstanceNamesBytes(int index) { - return instanceNames_.getByteString(index); - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index to set the value at. - * @param value The instanceNames to set. - * @return This builder for chaining. - */ - public Builder setInstanceNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstanceNamesIsMutable(); - instanceNames_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The instanceNames to add. - * @return This builder for chaining. - */ - public Builder addInstanceNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstanceNamesIsMutable(); - instanceNames_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param values The instanceNames to add. - * @return This builder for chaining. - */ - public Builder addAllInstanceNames(java.lang.Iterable values) { - ensureInstanceNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceNames_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearInstanceNames() { - instanceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The list of instance names. Dataproc derives the names
-     * from `cluster_name`, `num_instances`, and the instance group.
-     * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes of the instanceNames to add. - * @return This builder for chaining. - */ - public Builder addInstanceNamesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInstanceNamesIsMutable(); - instanceNames_.add(value); - onChanged(); - return this; - } - - private java.lang.Object imageUri_ = ""; - /** - * - * - *
-     * Optional. The Compute Engine image resource used for cluster instances.
-     * The URI can represent an image or image family.
-     * Image examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-     * * `projects/[project_id]/global/images/[image-id]`
-     * * `image-id`
-     * Image family examples. Dataproc will use the most recent
-     * image from the family:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * If the URI is unspecified, it will be inferred from
-     * `SoftwareConfig.image_version` or the system default.
-     * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageUri. - */ - public java.lang.String getImageUri() { - java.lang.Object ref = imageUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine image resource used for cluster instances.
-     * The URI can represent an image or image family.
-     * Image examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-     * * `projects/[project_id]/global/images/[image-id]`
-     * * `image-id`
-     * Image family examples. Dataproc will use the most recent
-     * image from the family:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * If the URI is unspecified, it will be inferred from
-     * `SoftwareConfig.image_version` or the system default.
-     * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageUri. - */ - public com.google.protobuf.ByteString getImageUriBytes() { - java.lang.Object ref = imageUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - imageUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine image resource used for cluster instances.
-     * The URI can represent an image or image family.
-     * Image examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-     * * `projects/[project_id]/global/images/[image-id]`
-     * * `image-id`
-     * Image family examples. Dataproc will use the most recent
-     * image from the family:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * If the URI is unspecified, it will be inferred from
-     * `SoftwareConfig.image_version` or the system default.
-     * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine image resource used for cluster instances.
-     * The URI can represent an image or image family.
-     * Image examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-     * * `projects/[project_id]/global/images/[image-id]`
-     * * `image-id`
-     * Image family examples. Dataproc will use the most recent
-     * image from the family:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * If the URI is unspecified, it will be inferred from
-     * `SoftwareConfig.image_version` or the system default.
-     * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearImageUri() { - - imageUri_ = getDefaultInstance().getImageUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine image resource used for cluster instances.
-     * The URI can represent an image or image family.
-     * Image examples:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-     * * `projects/[project_id]/global/images/[image-id]`
-     * * `image-id`
-     * Image family examples. Dataproc will use the most recent
-     * image from the family:
-     * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-     * If the URI is unspecified, it will be inferred from
-     * `SoftwareConfig.image_version` or the system default.
-     * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for imageUri to set. - * @return This builder for chaining. - */ - public Builder setImageUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object machineTypeUri_ = ""; - /** - * - * - *
-     * Optional. The Compute Engine machine type used for cluster instances.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `n1-standard-2`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the machine type
-     * resource, for example, `n1-standard-2`.
-     * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineTypeUri. - */ - public java.lang.String getMachineTypeUri() { - java.lang.Object ref = machineTypeUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - machineTypeUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine machine type used for cluster instances.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `n1-standard-2`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the machine type
-     * resource, for example, `n1-standard-2`.
-     * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineTypeUri. - */ - public com.google.protobuf.ByteString getMachineTypeUriBytes() { - java.lang.Object ref = machineTypeUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - machineTypeUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Compute Engine machine type used for cluster instances.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `n1-standard-2`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the machine type
-     * resource, for example, `n1-standard-2`.
-     * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The machineTypeUri to set. - * @return This builder for chaining. - */ - public Builder setMachineTypeUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - machineTypeUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine machine type used for cluster instances.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `n1-standard-2`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the machine type
-     * resource, for example, `n1-standard-2`.
-     * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMachineTypeUri() { - - machineTypeUri_ = getDefaultInstance().getMachineTypeUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine machine type used for cluster instances.
-     * A full URL, partial URI, or short name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-     * * `n1-standard-2`
-     * **Auto Zone Exception**: If you are using the Dataproc
-     * [Auto Zone
-     * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-     * feature, you must use the short name of the machine type
-     * resource, for example, `n1-standard-2`.
-     * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for machineTypeUri to set. - * @return This builder for chaining. - */ - public Builder setMachineTypeUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - machineTypeUri_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.DiskConfig diskConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.DiskConfig, - com.google.cloud.dataproc.v1.DiskConfig.Builder, - com.google.cloud.dataproc.v1.DiskConfigOrBuilder> - diskConfigBuilder_; - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the diskConfig field is set. - */ - public boolean hasDiskConfig() { - return diskConfigBuilder_ != null || diskConfig_ != null; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - public com.google.cloud.dataproc.v1.DiskConfig getDiskConfig() { - if (diskConfigBuilder_ == null) { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance() - : diskConfig_; - } else { - return diskConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDiskConfig(com.google.cloud.dataproc.v1.DiskConfig value) { - if (diskConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - diskConfig_ = value; - onChanged(); - } else { - diskConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDiskConfig(com.google.cloud.dataproc.v1.DiskConfig.Builder builderForValue) { - if (diskConfigBuilder_ == null) { - diskConfig_ = builderForValue.build(); - onChanged(); - } else { - diskConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeDiskConfig(com.google.cloud.dataproc.v1.DiskConfig value) { - if (diskConfigBuilder_ == null) { - if (diskConfig_ != null) { - diskConfig_ = - com.google.cloud.dataproc.v1.DiskConfig.newBuilder(diskConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - diskConfig_ = value; - } - onChanged(); - } else { - diskConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearDiskConfig() { - if (diskConfigBuilder_ == null) { - diskConfig_ = null; - onChanged(); - } else { - diskConfig_ = null; - diskConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.DiskConfig.Builder getDiskConfigBuilder() { - - onChanged(); - return getDiskConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.DiskConfigOrBuilder getDiskConfigOrBuilder() { - if (diskConfigBuilder_ != null) { - return diskConfigBuilder_.getMessageOrBuilder(); - } else { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance() - : diskConfig_; - } - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.DiskConfig, - com.google.cloud.dataproc.v1.DiskConfig.Builder, - com.google.cloud.dataproc.v1.DiskConfigOrBuilder> - getDiskConfigFieldBuilder() { - if (diskConfigBuilder_ == null) { - diskConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.DiskConfig, - com.google.cloud.dataproc.v1.DiskConfig.Builder, - com.google.cloud.dataproc.v1.DiskConfigOrBuilder>( - getDiskConfig(), getParentForChildren(), isClean()); - diskConfig_ = null; - } - return diskConfigBuilder_; - } - - private boolean isPreemptible_; - /** - * - * - *
-     * Output only. Specifies that this instance group contains preemptible
-     * instances.
-     * 
- * - * bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The isPreemptible. - */ - @java.lang.Override - public boolean getIsPreemptible() { - return isPreemptible_; - } - /** - * - * - *
-     * Output only. Specifies that this instance group contains preemptible
-     * instances.
-     * 
- * - * bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The isPreemptible to set. - * @return This builder for chaining. - */ - public Builder setIsPreemptible(boolean value) { - - isPreemptible_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Specifies that this instance group contains preemptible
-     * instances.
-     * 
- * - * bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearIsPreemptible() { - - isPreemptible_ = false; - onChanged(); - return this; - } - - private int preemptibility_ = 0; - /** - * - * - *
-     * Optional. Specifies the preemptibility of the instance group.
-     * The default value for master and worker groups is
-     * `NON_PREEMPTIBLE`. This default cannot be changed.
-     * The default value for secondary instances is
-     * `PREEMPTIBLE`.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for preemptibility. - */ - @java.lang.Override - public int getPreemptibilityValue() { - return preemptibility_; - } - /** - * - * - *
-     * Optional. Specifies the preemptibility of the instance group.
-     * The default value for master and worker groups is
-     * `NON_PREEMPTIBLE`. This default cannot be changed.
-     * The default value for secondary instances is
-     * `PREEMPTIBLE`.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for preemptibility to set. - * @return This builder for chaining. - */ - public Builder setPreemptibilityValue(int value) { - - preemptibility_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies the preemptibility of the instance group.
-     * The default value for master and worker groups is
-     * `NON_PREEMPTIBLE`. This default cannot be changed.
-     * The default value for secondary instances is
-     * `PREEMPTIBLE`.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The preemptibility. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility getPreemptibility() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility result = - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.valueOf(preemptibility_); - return result == null - ? com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. Specifies the preemptibility of the instance group.
-     * The default value for master and worker groups is
-     * `NON_PREEMPTIBLE`. This default cannot be changed.
-     * The default value for secondary instances is
-     * `PREEMPTIBLE`.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The preemptibility to set. - * @return This builder for chaining. - */ - public Builder setPreemptibility( - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility value) { - if (value == null) { - throw new NullPointerException(); - } - - preemptibility_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies the preemptibility of the instance group.
-     * The default value for master and worker groups is
-     * `NON_PREEMPTIBLE`. This default cannot be changed.
-     * The default value for secondary instances is
-     * `PREEMPTIBLE`.
-     * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearPreemptibility() { - - preemptibility_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ManagedGroupConfig managedGroupConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedGroupConfig, - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder> - managedGroupConfigBuilder_; - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the managedGroupConfig field is set. - */ - public boolean hasManagedGroupConfig() { - return managedGroupConfigBuilder_ != null || managedGroupConfig_ != null; - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - public com.google.cloud.dataproc.v1.ManagedGroupConfig getManagedGroupConfig() { - if (managedGroupConfigBuilder_ == null) { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance() - : managedGroupConfig_; - } else { - return managedGroupConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setManagedGroupConfig(com.google.cloud.dataproc.v1.ManagedGroupConfig value) { - if (managedGroupConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - managedGroupConfig_ = value; - onChanged(); - } else { - managedGroupConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setManagedGroupConfig( - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder builderForValue) { - if (managedGroupConfigBuilder_ == null) { - managedGroupConfig_ = builderForValue.build(); - onChanged(); - } else { - managedGroupConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeManagedGroupConfig(com.google.cloud.dataproc.v1.ManagedGroupConfig value) { - if (managedGroupConfigBuilder_ == null) { - if (managedGroupConfig_ != null) { - managedGroupConfig_ = - com.google.cloud.dataproc.v1.ManagedGroupConfig.newBuilder(managedGroupConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - managedGroupConfig_ = value; - } - onChanged(); - } else { - managedGroupConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearManagedGroupConfig() { - if (managedGroupConfigBuilder_ == null) { - managedGroupConfig_ = null; - onChanged(); - } else { - managedGroupConfig_ = null; - managedGroupConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder getManagedGroupConfigBuilder() { - - onChanged(); - return getManagedGroupConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder - getManagedGroupConfigOrBuilder() { - if (managedGroupConfigBuilder_ != null) { - return managedGroupConfigBuilder_.getMessageOrBuilder(); - } else { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance() - : managedGroupConfig_; - } - } - /** - * - * - *
-     * Output only. The config for Compute Engine Instance Group
-     * Manager that manages this group.
-     * This is only used for preemptible instance groups.
-     * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedGroupConfig, - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder> - getManagedGroupConfigFieldBuilder() { - if (managedGroupConfigBuilder_ == null) { - managedGroupConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedGroupConfig, - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder>( - getManagedGroupConfig(), getParentForChildren(), isClean()); - managedGroupConfig_ = null; - } - return managedGroupConfigBuilder_; - } - - private java.util.List accelerators_ = - java.util.Collections.emptyList(); - - private void ensureAcceleratorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - accelerators_ = - new java.util.ArrayList(accelerators_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AcceleratorConfig, - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder> - acceleratorsBuilder_; - - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getAcceleratorsList() { - if (acceleratorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(accelerators_); - } else { - return acceleratorsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getAcceleratorsCount() { - if (acceleratorsBuilder_ == null) { - return accelerators_.size(); - } else { - return acceleratorsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AcceleratorConfig getAccelerators(int index) { - if (acceleratorsBuilder_ == null) { - return accelerators_.get(index); - } else { - return acceleratorsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, com.google.cloud.dataproc.v1.AcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.set(index, value); - onChanged(); - } else { - acceleratorsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.set(index, builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators(com.google.cloud.dataproc.v1.AcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.add(value); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, com.google.cloud.dataproc.v1.AcceleratorConfig value) { - if (acceleratorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAcceleratorsIsMutable(); - accelerators_.add(index, value); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.add(builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.add(index, builderForValue.build()); - onChanged(); - } else { - acceleratorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - 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; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAccelerators() { - if (acceleratorsBuilder_ == null) { - accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - acceleratorsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeAccelerators(int index) { - if (acceleratorsBuilder_ == null) { - ensureAcceleratorsIsMutable(); - accelerators_.remove(index); - onChanged(); - } else { - acceleratorsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder getAcceleratorsBuilder( - int index) { - return getAcceleratorsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder( - int index) { - if (acceleratorsBuilder_ == null) { - return accelerators_.get(index); - } else { - return acceleratorsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getAcceleratorsOrBuilderList() { - if (acceleratorsBuilder_ != null) { - return acceleratorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(accelerators_); - } - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder addAcceleratorsBuilder() { - return getAcceleratorsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder addAcceleratorsBuilder( - int index) { - return getAcceleratorsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getAcceleratorsBuilderList() { - return getAcceleratorsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AcceleratorConfig, - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder> - getAcceleratorsFieldBuilder() { - if (acceleratorsBuilder_ == null) { - acceleratorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AcceleratorConfig, - com.google.cloud.dataproc.v1.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>( - accelerators_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - accelerators_ = null; - } - return acceleratorsBuilder_; - } - - private java.lang.Object minCpuPlatform_ = ""; - /** - * - * - *
-     * Optional. Specifies the minimum cpu platform for the Instance Group.
-     * See [Dataproc -> Minimum CPU
-     * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-     * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - public java.lang.String getMinCpuPlatform() { - java.lang.Object ref = minCpuPlatform_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - minCpuPlatform_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specifies the minimum cpu platform for the Instance Group.
-     * See [Dataproc -> Minimum CPU
-     * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-     * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - public com.google.protobuf.ByteString getMinCpuPlatformBytes() { - java.lang.Object ref = minCpuPlatform_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - minCpuPlatform_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specifies the minimum cpu platform for the Instance Group.
-     * See [Dataproc -> Minimum CPU
-     * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-     * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The minCpuPlatform to set. - * @return This builder for chaining. - */ - public Builder setMinCpuPlatform(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - minCpuPlatform_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies the minimum cpu platform for the Instance Group.
-     * See [Dataproc -> Minimum CPU
-     * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-     * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMinCpuPlatform() { - - minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies the minimum cpu platform for the Instance Group.
-     * See [Dataproc -> Minimum CPU
-     * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-     * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for minCpuPlatform to set. - * @return This builder for chaining. - */ - public Builder setMinCpuPlatformBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - minCpuPlatform_ = 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.dataproc.v1.InstanceGroupConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.InstanceGroupConfig) - private static final com.google.cloud.dataproc.v1.InstanceGroupConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.InstanceGroupConfig(); - } - - public static com.google.cloud.dataproc.v1.InstanceGroupConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InstanceGroupConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupConfig(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.dataproc.v1.InstanceGroupConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfigOrBuilder.java deleted file mode 100644 index 77f65b6d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfigOrBuilder.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface InstanceGroupConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.InstanceGroupConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The number of VM instances in the instance group.
-   * For [HA
-   * cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
-   * [master_config](#FIELDS.master_config) groups, **must be set to 3**.
-   * For standard cluster [master_config](#FIELDS.master_config) groups,
-   * **must be set to 1**.
-   * 
- * - * int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The numInstances. - */ - int getNumInstances(); - - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return A list containing the instanceNames. - */ - java.util.List getInstanceNamesList(); - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The count of instanceNames. - */ - int getInstanceNamesCount(); - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the element to return. - * @return The instanceNames at the given index. - */ - java.lang.String getInstanceNames(int index); - /** - * - * - *
-   * Output only. The list of instance names. Dataproc derives the names
-   * from `cluster_name`, `num_instances`, and the instance group.
-   * 
- * - * repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param index The index of the value to return. - * @return The bytes of the instanceNames at the given index. - */ - com.google.protobuf.ByteString getInstanceNamesBytes(int index); - - /** - * - * - *
-   * Optional. The Compute Engine image resource used for cluster instances.
-   * The URI can represent an image or image family.
-   * Image examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-   * * `projects/[project_id]/global/images/[image-id]`
-   * * `image-id`
-   * Image family examples. Dataproc will use the most recent
-   * image from the family:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * If the URI is unspecified, it will be inferred from
-   * `SoftwareConfig.image_version` or the system default.
-   * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageUri. - */ - java.lang.String getImageUri(); - /** - * - * - *
-   * Optional. The Compute Engine image resource used for cluster instances.
-   * The URI can represent an image or image family.
-   * Image examples:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]`
-   * * `projects/[project_id]/global/images/[image-id]`
-   * * `image-id`
-   * Image family examples. Dataproc will use the most recent
-   * image from the family:
-   * * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * * `projects/[project_id]/global/images/family/[custom-image-family-name]`
-   * If the URI is unspecified, it will be inferred from
-   * `SoftwareConfig.image_version` or the system default.
-   * 
- * - * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageUri. - */ - com.google.protobuf.ByteString getImageUriBytes(); - - /** - * - * - *
-   * Optional. The Compute Engine machine type used for cluster instances.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `n1-standard-2`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the machine type
-   * resource, for example, `n1-standard-2`.
-   * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The machineTypeUri. - */ - java.lang.String getMachineTypeUri(); - /** - * - * - *
-   * Optional. The Compute Engine machine type used for cluster instances.
-   * A full URL, partial URI, or short name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2`
-   * * `n1-standard-2`
-   * **Auto Zone Exception**: If you are using the Dataproc
-   * [Auto Zone
-   * Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
-   * feature, you must use the short name of the machine type
-   * resource, for example, `n1-standard-2`.
-   * 
- * - * string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for machineTypeUri. - */ - com.google.protobuf.ByteString getMachineTypeUriBytes(); - - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the diskConfig field is set. - */ - boolean hasDiskConfig(); - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - com.google.cloud.dataproc.v1.DiskConfig getDiskConfig(); - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.DiskConfigOrBuilder getDiskConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Specifies that this instance group contains preemptible
-   * instances.
-   * 
- * - * bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The isPreemptible. - */ - boolean getIsPreemptible(); - - /** - * - * - *
-   * Optional. Specifies the preemptibility of the instance group.
-   * The default value for master and worker groups is
-   * `NON_PREEMPTIBLE`. This default cannot be changed.
-   * The default value for secondary instances is
-   * `PREEMPTIBLE`.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for preemptibility. - */ - int getPreemptibilityValue(); - /** - * - * - *
-   * Optional. Specifies the preemptibility of the instance group.
-   * The default value for master and worker groups is
-   * `NON_PREEMPTIBLE`. This default cannot be changed.
-   * The default value for secondary instances is
-   * `PREEMPTIBLE`.
-   * 
- * - * - * .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The preemptibility. - */ - com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility getPreemptibility(); - - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the managedGroupConfig field is set. - */ - boolean hasManagedGroupConfig(); - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - com.google.cloud.dataproc.v1.ManagedGroupConfig getManagedGroupConfig(); - /** - * - * - *
-   * Output only. The config for Compute Engine Instance Group
-   * Manager that manages this group.
-   * This is only used for preemptible instance groups.
-   * 
- * - * - * .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder getManagedGroupConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getAcceleratorsList(); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.AcceleratorConfig getAccelerators(int index); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAcceleratorsCount(); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getAcceleratorsOrBuilderList(); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Specifies the minimum cpu platform for the Instance Group.
-   * See [Dataproc -> Minimum CPU
-   * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-   * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The minCpuPlatform. - */ - java.lang.String getMinCpuPlatform(); - /** - * - * - *
-   * Optional. Specifies the minimum cpu platform for the Instance Group.
-   * See [Dataproc -> Minimum CPU
-   * Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
-   * 
- * - * string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for minCpuPlatform. - */ - com.google.protobuf.ByteString getMinCpuPlatformBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequest.java deleted file mode 100644 index 8cf503ad..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequest.java +++ /dev/null @@ -1,1236 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to instantiate an inline workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest} - */ -public final class InstantiateInlineWorkflowTemplateRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - InstantiateInlineWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use InstantiateInlineWorkflowTemplateRequest.newBuilder() to construct. - private InstantiateInlineWorkflowTemplateRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InstantiateInlineWorkflowTemplateRequest() { - parent_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstantiateInlineWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private InstantiateInlineWorkflowTemplateRequest( - 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.dataproc.v1.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(template_); - template_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.instantiateinline`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.instantiateinline`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 TEMPLATE_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - @java.lang.Override - public boolean hasTemplate() { - return template_ != null; - } - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - return getTemplate(); - } - - public static final int REQUEST_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (template_ != null) { - output.writeMessage(2, getTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (template_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); - } - 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasTemplate() != other.hasTemplate()) return false; - if (hasTemplate()) { - if (!getTemplate().equals(other.getTemplate())) return false; - } - if (!getRequestId().equals(other.getRequestId())) 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 (hasTemplate()) { - hash = (37 * hash) + TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getTemplate().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to instantiate an inline workflow template.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest.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 (templateBuilder_ == null) { - template_ = null; - } else { - template_ = null; - templateBuilder_ = null; - } - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest(this); - result.parent_ = parent_; - if (templateBuilder_ == null) { - result.template_ = template_; - } else { - result.template_ = templateBuilder_.build(); - } - result.requestId_ = requestId_; - 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) { - return mergeFrom( - (com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasTemplate()) { - mergeTemplate(other.getTemplate()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.instantiateinline`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.instantiateinline`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.instantiateinline`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.instantiateinline`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.instantiateinline`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 com.google.cloud.dataproc.v1.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - public boolean hasTemplate() { - return templateBuilder_ != null || template_ != null; - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - template_ = value; - onChanged(); - } else { - templateBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templateBuilder_ == null) { - template_ = builderForValue.build(); - onChanged(); - } else { - templateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1.WorkflowTemplate.newBuilder(template_) - .mergeFrom(value) - .buildPartial(); - } else { - template_ = value; - } - onChanged(); - } else { - templateBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearTemplate() { - if (templateBuilder_ == null) { - template_ = null; - onChanged(); - } else { - template_ = null; - templateBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder>( - getTemplate(), getParentForChildren(), isClean()); - template_ = null; - } - return templateBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InstantiateInlineWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InstantiateInlineWorkflowTemplateRequest(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.dataproc.v1.InstantiateInlineWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 0a96c171..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface InstantiateInlineWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.instantiateinline`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,instantiateinline`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.instantiateinline`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - boolean hasTemplate(); - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder(); - - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequest.java deleted file mode 100644 index 10c1b251..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequest.java +++ /dev/null @@ -1,1387 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to instantiate a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest} - */ -public final class InstantiateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) - InstantiateWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use InstantiateWorkflowTemplateRequest.newBuilder() to construct. - private InstantiateWorkflowTemplateRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InstantiateWorkflowTemplateRequest() { - name_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstantiateWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private InstantiateWorkflowTemplateRequest( - 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 16: - { - version_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - parameters_ = - com.google.protobuf.MapField.newMapField( - ParametersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry parameters__ = - input.readMessage( - ParametersDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - parameters_.getMutableMap().put(parameters__.getKey(), parameters__.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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private int version_; - /** - * - * - *
-   * Optional. The version of workflow template to instantiate. If specified,
-   * the workflow will be instantiated only if the current version of
-   * the workflow template has the supplied version.
-   * This option cannot be used to instantiate a previous version of
-   * workflow template.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int REQUEST_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMETERS_FIELD_NUMBER = 6; - - private static final class ParametersDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField parameters_; - - private com.google.protobuf.MapField internalGetParameters() { - if (parameters_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParametersDefaultEntryHolder.defaultEntry); - } - return parameters_; - } - - public int getParametersCount() { - return internalGetParameters().getMap().size(); - } - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParameters().getMap().containsKey(key); - } - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParameters() { - return getParametersMap(); - } - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getParametersMap() { - return internalGetParameters().getMap(); - } - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getParametersOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getParametersOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 6); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); - } - for (java.util.Map.Entry entry : - internalGetParameters().getMap().entrySet()) { - com.google.protobuf.MapEntry parameters__ = - ParametersDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, parameters__); - } - 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.dataproc.v1.InstantiateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (getVersion() != other.getVersion()) return false; - if (!getRequestId().equals(other.getRequestId())) return false; - if (!internalGetParameters().equals(other.internalGetParameters())) 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) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - if (!internalGetParameters().getMap().isEmpty()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParameters().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest 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.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest 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.dataproc.v1.InstantiateWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest 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.dataproc.v1.InstantiateWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest 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.dataproc.v1.InstantiateWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to instantiate a workflow template.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 6: - return internalGetMutableParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.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_ = ""; - - version_ = 0; - - requestId_ = ""; - - internalGetMutableParameters().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.version_ = version_; - result.requestId_ = requestId_; - result.parameters_ = internalGetParameters(); - result.parameters_.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.dataproc.v1.InstantiateWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - onChanged(); - } - internalGetMutableParameters().mergeFrom(other.internalGetParameters()); - 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.dataproc.v1.InstantiateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-     * of the template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-     *   of the template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int version_; - /** - * - * - *
-     * Optional. The version of workflow template to instantiate. If specified,
-     * the workflow will be instantiated only if the current version of
-     * the workflow template has the supplied version.
-     * This option cannot be used to instantiate a previous version of
-     * workflow template.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - * - * - *
-     * Optional. The version of workflow template to instantiate. If specified,
-     * the workflow will be instantiated only if the current version of
-     * the workflow template has the supplied version.
-     * This option cannot be used to instantiate a previous version of
-     * workflow template.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The version of workflow template to instantiate. If specified,
-     * the workflow will be instantiated only if the current version of
-     * the workflow template has the supplied version.
-     * This option cannot be used to instantiate a previous version of
-     * workflow template.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A tag that prevents multiple concurrent workflow
-     * instances with the same tag from running. This mitigates risk of
-     * concurrent instances started due to retries.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField parameters_; - - private com.google.protobuf.MapField - internalGetParameters() { - if (parameters_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ParametersDefaultEntryHolder.defaultEntry); - } - return parameters_; - } - - private com.google.protobuf.MapField - internalGetMutableParameters() { - onChanged(); - ; - if (parameters_ == null) { - parameters_ = - com.google.protobuf.MapField.newMapField(ParametersDefaultEntryHolder.defaultEntry); - } - if (!parameters_.isMutable()) { - parameters_ = parameters_.copy(); - } - return parameters_; - } - - public int getParametersCount() { - return internalGetParameters().getMap().size(); - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParameters().getMap().containsKey(key); - } - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParameters() { - return getParametersMap(); - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getParametersMap() { - return internalGetParameters().getMap(); - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getParametersOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getParametersOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParameters() { - internalGetMutableParameters().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParameters().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParameters() { - return internalGetMutableParameters().getMutableMap(); - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putParameters(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParameters().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Map from parameter names to values that should be used for those
-     * parameters. Values may not exceed 1000 characters.
-     * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllParameters(java.util.Map values) { - internalGetMutableParameters().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.dataproc.v1.InstantiateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InstantiateWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InstantiateWorkflowTemplateRequest(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.dataproc.v1.InstantiateWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index cd7510b5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface InstantiateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates.instantiate`, the resource name
-   * of the template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates.instantiate`, the resource name
-   *   of the template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. The version of workflow template to instantiate. If specified,
-   * the workflow will be instantiated only if the current version of
-   * the workflow template has the supplied version.
-   * This option cannot be used to instantiate a previous version of
-   * workflow template.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - int getVersion(); - - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A tag that prevents multiple concurrent workflow
-   * instances with the same tag from running. This mitigates risk of
-   * concurrent instances started due to retries.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The tag must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); - - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getParametersCount(); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsParameters(java.lang.String key); - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParameters(); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getParametersMap(); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getParametersOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 1000 characters.
-   * 
- * - * map<string, string> parameters = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getParametersOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java deleted file mode 100644 index 44b4de43..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java +++ /dev/null @@ -1,6621 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Job} - */ -public final class Job extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Job) - JobOrBuilder { - private static final long serialVersionUID = 0L; - // Use Job.newBuilder() to construct. - private Job(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Job() { - statusHistory_ = java.util.Collections.emptyList(); - yarnApplications_ = java.util.Collections.emptyList(); - driverOutputResourceUri_ = ""; - driverControlFilesUri_ = ""; - jobUuid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Job(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Job( - 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.cloud.dataproc.v1.JobReference.Builder subBuilder = null; - if (reference_ != null) { - subBuilder = reference_.toBuilder(); - } - reference_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reference_); - reference_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataproc.v1.JobPlacement.Builder subBuilder = null; - if (placement_ != null) { - subBuilder = placement_.toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobPlacement.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(placement_); - placement_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.dataproc.v1.HadoopJob.Builder subBuilder = null; - if (typeJobCase_ == 3) { - subBuilder = ((com.google.cloud.dataproc.v1.HadoopJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.HadoopJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HadoopJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1.SparkJob.Builder subBuilder = null; - if (typeJobCase_ == 4) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 4; - break; - } - case 42: - { - com.google.cloud.dataproc.v1.PySparkJob.Builder subBuilder = null; - if (typeJobCase_ == 5) { - subBuilder = ((com.google.cloud.dataproc.v1.PySparkJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.PySparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PySparkJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 5; - break; - } - case 50: - { - com.google.cloud.dataproc.v1.HiveJob.Builder subBuilder = null; - if (typeJobCase_ == 6) { - subBuilder = ((com.google.cloud.dataproc.v1.HiveJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.HiveJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HiveJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1.PigJob.Builder subBuilder = null; - if (typeJobCase_ == 7) { - subBuilder = ((com.google.cloud.dataproc.v1.PigJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.PigJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PigJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 7; - break; - } - case 66: - { - com.google.cloud.dataproc.v1.JobStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - yarnApplications_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - yarnApplications_.add( - input.readMessage( - com.google.cloud.dataproc.v1.YarnApplication.parser(), extensionRegistry)); - break; - } - case 98: - { - com.google.cloud.dataproc.v1.SparkSqlJob.Builder subBuilder = null; - if (typeJobCase_ == 12) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkSqlJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 12; - break; - } - case 106: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - statusHistory_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - statusHistory_.add( - input.readMessage( - com.google.cloud.dataproc.v1.JobStatus.parser(), extensionRegistry)); - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - driverControlFilesUri_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - driverOutputResourceUri_ = s; - break; - } - case 146: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 162: - { - com.google.cloud.dataproc.v1.JobScheduling.Builder subBuilder = null; - if (scheduling_ != null) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobScheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - com.google.cloud.dataproc.v1.SparkRJob.Builder subBuilder = null; - if (typeJobCase_ == 21) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkRJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkRJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkRJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 21; - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobUuid_ = s; - break; - } - case 186: - { - com.google.cloud.dataproc.v1.PrestoJob.Builder subBuilder = null; - if (typeJobCase_ == 23) { - subBuilder = ((com.google.cloud.dataproc.v1.PrestoJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1.PrestoJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PrestoJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 23; - break; - } - case 192: - { - done_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - yarnApplications_ = java.util.Collections.unmodifiableList(yarnApplications_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 18: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Job.class, com.google.cloud.dataproc.v1.Job.Builder.class); - } - - private int typeJobCase_ = 0; - private java.lang.Object typeJob_; - - public enum TypeJobCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HADOOP_JOB(3), - SPARK_JOB(4), - PYSPARK_JOB(5), - HIVE_JOB(6), - PIG_JOB(7), - SPARK_R_JOB(21), - SPARK_SQL_JOB(12), - PRESTO_JOB(23), - TYPEJOB_NOT_SET(0); - private final int value; - - private TypeJobCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeJobCase valueOf(int value) { - return forNumber(value); - } - - public static TypeJobCase forNumber(int value) { - switch (value) { - case 3: - return HADOOP_JOB; - case 4: - return SPARK_JOB; - case 5: - return PYSPARK_JOB; - case 6: - return HIVE_JOB; - case 7: - return PIG_JOB; - case 21: - return SPARK_R_JOB; - case 12: - return SPARK_SQL_JOB; - case 23: - return PRESTO_JOB; - case 0: - return TYPEJOB_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public TypeJobCase getTypeJobCase() { - return TypeJobCase.forNumber(typeJobCase_); - } - - public static final int REFERENCE_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.JobReference reference_; - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reference field is set. - */ - @java.lang.Override - public boolean hasReference() { - return reference_ != null; - } - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobReference getReference() { - return reference_ == null - ? com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() - : reference_; - } - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobReferenceOrBuilder getReferenceOrBuilder() { - return getReference(); - } - - public static final int PLACEMENT_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.JobPlacement placement_; - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - @java.lang.Override - public boolean hasPlacement() { - return placement_ != null; - } - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobPlacement getPlacement() { - return placement_ == null - ? com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() - : placement_; - } - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobPlacementOrBuilder getPlacementOrBuilder() { - return getPlacement(); - } - - public static final int HADOOP_JOB_FIELD_NUMBER = 3; - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return typeJobCase_ == 3; - } - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - - public static final int SPARK_JOB_FIELD_NUMBER = 4; - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return typeJobCase_ == 4; - } - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob getSparkJob() { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - - public static final int PYSPARK_JOB_FIELD_NUMBER = 5; - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return typeJobCase_ == 5; - } - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - - public static final int HIVE_JOB_FIELD_NUMBER = 6; - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return typeJobCase_ == 6; - } - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob getHiveJob() { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - - public static final int PIG_JOB_FIELD_NUMBER = 7; - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return typeJobCase_ == 7; - } - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob getPigJob() { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - - public static final int SPARK_R_JOB_FIELD_NUMBER = 21; - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return typeJobCase_ == 21; - } - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob getSparkRJob() { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - - public static final int SPARK_SQL_JOB_FIELD_NUMBER = 12; - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return typeJobCase_ == 12; - } - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - - public static final int PRESTO_JOB_FIELD_NUMBER = 23; - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return typeJobCase_ == 23; - } - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob getPrestoJob() { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - - public static final int STATUS_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.JobStatus status_; - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus getStatus() { - return status_ == null ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() : status_; - } - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - public static final int STATUS_HISTORY_FIELD_NUMBER = 13; - private java.util.List statusHistory_; - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getStatusHistoryList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryOrBuilderList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getStatusHistoryCount() { - return statusHistory_.size(); - } - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusHistoryOrBuilder(int index) { - return statusHistory_.get(index); - } - - public static final int YARN_APPLICATIONS_FIELD_NUMBER = 9; - private java.util.List yarnApplications_; - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getYarnApplicationsList() { - return yarnApplications_; - } - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getYarnApplicationsOrBuilderList() { - return yarnApplications_; - } - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getYarnApplicationsCount() { - return yarnApplications_.size(); - } - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication getYarnApplications(int index) { - return yarnApplications_.get(index); - } - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplicationOrBuilder getYarnApplicationsOrBuilder( - int index) { - return yarnApplications_.get(index); - } - - public static final int DRIVER_OUTPUT_RESOURCE_URI_FIELD_NUMBER = 17; - private volatile java.lang.Object driverOutputResourceUri_; - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout of the job's
-   * driver program.
-   * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The driverOutputResourceUri. - */ - @java.lang.Override - public java.lang.String getDriverOutputResourceUri() { - java.lang.Object ref = driverOutputResourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - driverOutputResourceUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout of the job's
-   * driver program.
-   * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for driverOutputResourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDriverOutputResourceUriBytes() { - java.lang.Object ref = driverOutputResourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - driverOutputResourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DRIVER_CONTROL_FILES_URI_FIELD_NUMBER = 15; - private volatile java.lang.Object driverControlFilesUri_; - /** - * - * - *
-   * Output only. If present, the location of miscellaneous control files
-   * which may be used as part of job setup and handling. If not present,
-   * control files may be placed in the same location as `driver_output_uri`.
-   * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The driverControlFilesUri. - */ - @java.lang.Override - public java.lang.String getDriverControlFilesUri() { - java.lang.Object ref = driverControlFilesUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - driverControlFilesUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. If present, the location of miscellaneous control files
-   * which may be used as part of job setup and handling. If not present,
-   * control files may be placed in the same location as `driver_output_uri`.
-   * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for driverControlFilesUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDriverControlFilesUriBytes() { - java.lang.Object ref = driverControlFilesUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - driverControlFilesUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 18; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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 SCHEDULING_FIELD_NUMBER = 20; - private com.google.cloud.dataproc.v1.JobScheduling scheduling_; - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - @java.lang.Override - public boolean hasScheduling() { - return scheduling_ != null; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobScheduling getScheduling() { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() { - return getScheduling(); - } - - public static final int JOB_UUID_FIELD_NUMBER = 22; - private volatile java.lang.Object jobUuid_; - /** - * - * - *
-   * Output only. A UUID that uniquely identifies a job within the project
-   * over time. This is in contrast to a user-settable reference.job_id that
-   * may be reused over time.
-   * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobUuid. - */ - @java.lang.Override - public java.lang.String getJobUuid() { - java.lang.Object ref = jobUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A UUID that uniquely identifies a job within the project
-   * over time. This is in contrast to a user-settable reference.job_id that
-   * may be reused over time.
-   * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobUuidBytes() { - java.lang.Object ref = jobUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DONE_FIELD_NUMBER = 24; - private boolean done_; - /** - * - * - *
-   * Output only. Indicates whether the job is completed. If the value is `false`,
-   * the job is still in progress. If `true`, the job is completed, and
-   * `status.state` field will indicate if it was successful, failed,
-   * or cancelled.
-   * 
- * - * bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (reference_ != null) { - output.writeMessage(1, getReference()); - } - if (placement_ != null) { - output.writeMessage(2, getPlacement()); - } - if (typeJobCase_ == 3) { - output.writeMessage(3, (com.google.cloud.dataproc.v1.HadoopJob) typeJob_); - } - if (typeJobCase_ == 4) { - output.writeMessage(4, (com.google.cloud.dataproc.v1.SparkJob) typeJob_); - } - if (typeJobCase_ == 5) { - output.writeMessage(5, (com.google.cloud.dataproc.v1.PySparkJob) typeJob_); - } - if (typeJobCase_ == 6) { - output.writeMessage(6, (com.google.cloud.dataproc.v1.HiveJob) typeJob_); - } - if (typeJobCase_ == 7) { - output.writeMessage(7, (com.google.cloud.dataproc.v1.PigJob) typeJob_); - } - if (status_ != null) { - output.writeMessage(8, getStatus()); - } - for (int i = 0; i < yarnApplications_.size(); i++) { - output.writeMessage(9, yarnApplications_.get(i)); - } - if (typeJobCase_ == 12) { - output.writeMessage(12, (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - output.writeMessage(13, statusHistory_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(driverControlFilesUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, driverControlFilesUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(driverOutputResourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, driverOutputResourceUri_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 18); - if (scheduling_ != null) { - output.writeMessage(20, getScheduling()); - } - if (typeJobCase_ == 21) { - output.writeMessage(21, (com.google.cloud.dataproc.v1.SparkRJob) typeJob_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 22, jobUuid_); - } - if (typeJobCase_ == 23) { - output.writeMessage(23, (com.google.cloud.dataproc.v1.PrestoJob) typeJob_); - } - if (done_ != false) { - output.writeBool(24, done_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (reference_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReference()); - } - if (placement_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlacement()); - } - if (typeJobCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.dataproc.v1.HadoopJob) typeJob_); - } - if (typeJobCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.dataproc.v1.SparkJob) typeJob_); - } - if (typeJobCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.dataproc.v1.PySparkJob) typeJob_); - } - if (typeJobCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1.HiveJob) typeJob_); - } - if (typeJobCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.dataproc.v1.PigJob) typeJob_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStatus()); - } - for (int i = 0; i < yarnApplications_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, yarnApplications_.get(i)); - } - if (typeJobCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, statusHistory_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(driverControlFilesUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, driverControlFilesUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(driverOutputResourceUri_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(17, driverOutputResourceUri_); - } - 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(18, labels__); - } - if (scheduling_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getScheduling()); - } - if (typeJobCase_ == 21) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 21, (com.google.cloud.dataproc.v1.SparkRJob) typeJob_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, jobUuid_); - } - if (typeJobCase_ == 23) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 23, (com.google.cloud.dataproc.v1.PrestoJob) typeJob_); - } - if (done_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, done_); - } - 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.dataproc.v1.Job)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.Job other = (com.google.cloud.dataproc.v1.Job) obj; - - if (hasReference() != other.hasReference()) return false; - if (hasReference()) { - if (!getReference().equals(other.getReference())) return false; - } - if (hasPlacement() != other.hasPlacement()) return false; - if (hasPlacement()) { - if (!getPlacement().equals(other.getPlacement())) return false; - } - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } - if (!getStatusHistoryList().equals(other.getStatusHistoryList())) return false; - if (!getYarnApplicationsList().equals(other.getYarnApplicationsList())) return false; - if (!getDriverOutputResourceUri().equals(other.getDriverOutputResourceUri())) return false; - if (!getDriverControlFilesUri().equals(other.getDriverControlFilesUri())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasScheduling() != other.hasScheduling()) return false; - if (hasScheduling()) { - if (!getScheduling().equals(other.getScheduling())) return false; - } - if (!getJobUuid().equals(other.getJobUuid())) return false; - if (getDone() != other.getDone()) return false; - if (!getTypeJobCase().equals(other.getTypeJobCase())) return false; - switch (typeJobCase_) { - case 3: - if (!getHadoopJob().equals(other.getHadoopJob())) return false; - break; - case 4: - if (!getSparkJob().equals(other.getSparkJob())) return false; - break; - case 5: - if (!getPysparkJob().equals(other.getPysparkJob())) return false; - break; - case 6: - if (!getHiveJob().equals(other.getHiveJob())) return false; - break; - case 7: - if (!getPigJob().equals(other.getPigJob())) return false; - break; - case 21: - if (!getSparkRJob().equals(other.getSparkRJob())) return false; - break; - case 12: - if (!getSparkSqlJob().equals(other.getSparkSqlJob())) return false; - break; - case 23: - if (!getPrestoJob().equals(other.getPrestoJob())) return false; - break; - case 0: - default: - } - 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 (hasReference()) { - hash = (37 * hash) + REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getReference().hashCode(); - } - if (hasPlacement()) { - hash = (37 * hash) + PLACEMENT_FIELD_NUMBER; - hash = (53 * hash) + getPlacement().hashCode(); - } - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - if (getStatusHistoryCount() > 0) { - hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER; - hash = (53 * hash) + getStatusHistoryList().hashCode(); - } - if (getYarnApplicationsCount() > 0) { - hash = (37 * hash) + YARN_APPLICATIONS_FIELD_NUMBER; - hash = (53 * hash) + getYarnApplicationsList().hashCode(); - } - hash = (37 * hash) + DRIVER_OUTPUT_RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getDriverOutputResourceUri().hashCode(); - hash = (37 * hash) + DRIVER_CONTROL_FILES_URI_FIELD_NUMBER; - hash = (53 * hash) + getDriverControlFilesUri().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasScheduling()) { - hash = (37 * hash) + SCHEDULING_FIELD_NUMBER; - hash = (53 * hash) + getScheduling().hashCode(); - } - hash = (37 * hash) + JOB_UUID_FIELD_NUMBER; - hash = (53 * hash) + getJobUuid().hashCode(); - hash = (37 * hash) + DONE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDone()); - switch (typeJobCase_) { - case 3: - hash = (37 * hash) + HADOOP_JOB_FIELD_NUMBER; - hash = (53 * hash) + getHadoopJob().hashCode(); - break; - case 4: - hash = (37 * hash) + SPARK_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkJob().hashCode(); - break; - case 5: - hash = (37 * hash) + PYSPARK_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPysparkJob().hashCode(); - break; - case 6: - hash = (37 * hash) + HIVE_JOB_FIELD_NUMBER; - hash = (53 * hash) + getHiveJob().hashCode(); - break; - case 7: - hash = (37 * hash) + PIG_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPigJob().hashCode(); - break; - case 21: - hash = (37 * hash) + SPARK_R_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkRJob().hashCode(); - break; - case 12: - hash = (37 * hash) + SPARK_SQL_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkSqlJob().hashCode(); - break; - case 23: - hash = (37 * hash) + PRESTO_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPrestoJob().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.Job parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Job 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.dataproc.v1.Job parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Job parseFrom( - 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.dataproc.v1.Job parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.Job parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.Job parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Job 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.dataproc.v1.Job parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Job 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.dataproc.v1.Job parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.Job 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.dataproc.v1.Job prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job resource.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.Job} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Job) - com.google.cloud.dataproc.v1.JobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 18: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 18: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.Job.class, - com.google.cloud.dataproc.v1.Job.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.Job.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusHistoryFieldBuilder(); - getYarnApplicationsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (referenceBuilder_ == null) { - reference_ = null; - } else { - reference_ = null; - referenceBuilder_ = null; - } - if (placementBuilder_ == null) { - placement_ = null; - } else { - placement_ = null; - placementBuilder_ = null; - } - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - statusHistoryBuilder_.clear(); - } - if (yarnApplicationsBuilder_ == null) { - yarnApplications_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - yarnApplicationsBuilder_.clear(); - } - driverOutputResourceUri_ = ""; - - driverControlFilesUri_ = ""; - - internalGetMutableLabels().clear(); - if (schedulingBuilder_ == null) { - scheduling_ = null; - } else { - scheduling_ = null; - schedulingBuilder_ = null; - } - jobUuid_ = ""; - - done_ = false; - - typeJobCase_ = 0; - typeJob_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_Job_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Job getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.Job.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Job build() { - com.google.cloud.dataproc.v1.Job result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.Job buildPartial() { - com.google.cloud.dataproc.v1.Job result = new com.google.cloud.dataproc.v1.Job(this); - int from_bitField0_ = bitField0_; - if (referenceBuilder_ == null) { - result.reference_ = reference_; - } else { - result.reference_ = referenceBuilder_.build(); - } - if (placementBuilder_ == null) { - result.placement_ = placement_; - } else { - result.placement_ = placementBuilder_.build(); - } - if (typeJobCase_ == 3) { - if (hadoopJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = hadoopJobBuilder_.build(); - } - } - if (typeJobCase_ == 4) { - if (sparkJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = sparkJobBuilder_.build(); - } - } - if (typeJobCase_ == 5) { - if (pysparkJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = pysparkJobBuilder_.build(); - } - } - if (typeJobCase_ == 6) { - if (hiveJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = hiveJobBuilder_.build(); - } - } - if (typeJobCase_ == 7) { - if (pigJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = pigJobBuilder_.build(); - } - } - if (typeJobCase_ == 21) { - if (sparkRJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = sparkRJobBuilder_.build(); - } - } - if (typeJobCase_ == 12) { - if (sparkSqlJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = sparkSqlJobBuilder_.build(); - } - } - if (typeJobCase_ == 23) { - if (prestoJobBuilder_ == null) { - result.typeJob_ = typeJob_; - } else { - result.typeJob_ = prestoJobBuilder_.build(); - } - } - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } - if (statusHistoryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.statusHistory_ = statusHistory_; - } else { - result.statusHistory_ = statusHistoryBuilder_.build(); - } - if (yarnApplicationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - yarnApplications_ = java.util.Collections.unmodifiableList(yarnApplications_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.yarnApplications_ = yarnApplications_; - } else { - result.yarnApplications_ = yarnApplicationsBuilder_.build(); - } - result.driverOutputResourceUri_ = driverOutputResourceUri_; - result.driverControlFilesUri_ = driverControlFilesUri_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (schedulingBuilder_ == null) { - result.scheduling_ = scheduling_; - } else { - result.scheduling_ = schedulingBuilder_.build(); - } - result.jobUuid_ = jobUuid_; - result.done_ = done_; - result.typeJobCase_ = typeJobCase_; - 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.dataproc.v1.Job) { - return mergeFrom((com.google.cloud.dataproc.v1.Job) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.Job other) { - if (other == com.google.cloud.dataproc.v1.Job.getDefaultInstance()) return this; - if (other.hasReference()) { - mergeReference(other.getReference()); - } - if (other.hasPlacement()) { - mergePlacement(other.getPlacement()); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - if (statusHistoryBuilder_ == null) { - if (!other.statusHistory_.isEmpty()) { - if (statusHistory_.isEmpty()) { - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStatusHistoryIsMutable(); - statusHistory_.addAll(other.statusHistory_); - } - onChanged(); - } - } else { - if (!other.statusHistory_.isEmpty()) { - if (statusHistoryBuilder_.isEmpty()) { - statusHistoryBuilder_.dispose(); - statusHistoryBuilder_ = null; - statusHistory_ = other.statusHistory_; - bitField0_ = (bitField0_ & ~0x00000001); - statusHistoryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStatusHistoryFieldBuilder() - : null; - } else { - statusHistoryBuilder_.addAllMessages(other.statusHistory_); - } - } - } - if (yarnApplicationsBuilder_ == null) { - if (!other.yarnApplications_.isEmpty()) { - if (yarnApplications_.isEmpty()) { - yarnApplications_ = other.yarnApplications_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureYarnApplicationsIsMutable(); - yarnApplications_.addAll(other.yarnApplications_); - } - onChanged(); - } - } else { - if (!other.yarnApplications_.isEmpty()) { - if (yarnApplicationsBuilder_.isEmpty()) { - yarnApplicationsBuilder_.dispose(); - yarnApplicationsBuilder_ = null; - yarnApplications_ = other.yarnApplications_; - bitField0_ = (bitField0_ & ~0x00000002); - yarnApplicationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getYarnApplicationsFieldBuilder() - : null; - } else { - yarnApplicationsBuilder_.addAllMessages(other.yarnApplications_); - } - } - } - if (!other.getDriverOutputResourceUri().isEmpty()) { - driverOutputResourceUri_ = other.driverOutputResourceUri_; - onChanged(); - } - if (!other.getDriverControlFilesUri().isEmpty()) { - driverControlFilesUri_ = other.driverControlFilesUri_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasScheduling()) { - mergeScheduling(other.getScheduling()); - } - if (!other.getJobUuid().isEmpty()) { - jobUuid_ = other.jobUuid_; - onChanged(); - } - if (other.getDone() != false) { - setDone(other.getDone()); - } - switch (other.getTypeJobCase()) { - case HADOOP_JOB: - { - mergeHadoopJob(other.getHadoopJob()); - break; - } - case SPARK_JOB: - { - mergeSparkJob(other.getSparkJob()); - break; - } - case PYSPARK_JOB: - { - mergePysparkJob(other.getPysparkJob()); - break; - } - case HIVE_JOB: - { - mergeHiveJob(other.getHiveJob()); - break; - } - case PIG_JOB: - { - mergePigJob(other.getPigJob()); - break; - } - case SPARK_R_JOB: - { - mergeSparkRJob(other.getSparkRJob()); - break; - } - case SPARK_SQL_JOB: - { - mergeSparkSqlJob(other.getSparkSqlJob()); - break; - } - case PRESTO_JOB: - { - mergePrestoJob(other.getPrestoJob()); - break; - } - case TYPEJOB_NOT_SET: - { - break; - } - } - 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.dataproc.v1.Job parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.Job) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int typeJobCase_ = 0; - private java.lang.Object typeJob_; - - public TypeJobCase getTypeJobCase() { - return TypeJobCase.forNumber(typeJobCase_); - } - - public Builder clearTypeJob() { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.cloud.dataproc.v1.JobReference reference_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobReference, - com.google.cloud.dataproc.v1.JobReference.Builder, - com.google.cloud.dataproc.v1.JobReferenceOrBuilder> - referenceBuilder_; - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reference field is set. - */ - public boolean hasReference() { - return referenceBuilder_ != null || reference_ != null; - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - public com.google.cloud.dataproc.v1.JobReference getReference() { - if (referenceBuilder_ == null) { - return reference_ == null - ? com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() - : reference_; - } else { - return referenceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReference(com.google.cloud.dataproc.v1.JobReference value) { - if (referenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reference_ = value; - onChanged(); - } else { - referenceBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReference(com.google.cloud.dataproc.v1.JobReference.Builder builderForValue) { - if (referenceBuilder_ == null) { - reference_ = builderForValue.build(); - onChanged(); - } else { - referenceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReference(com.google.cloud.dataproc.v1.JobReference value) { - if (referenceBuilder_ == null) { - if (reference_ != null) { - reference_ = - com.google.cloud.dataproc.v1.JobReference.newBuilder(reference_) - .mergeFrom(value) - .buildPartial(); - } else { - reference_ = value; - } - onChanged(); - } else { - referenceBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearReference() { - if (referenceBuilder_ == null) { - reference_ = null; - onChanged(); - } else { - reference_ = null; - referenceBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobReference.Builder getReferenceBuilder() { - - onChanged(); - return getReferenceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobReferenceOrBuilder getReferenceOrBuilder() { - if (referenceBuilder_ != null) { - return referenceBuilder_.getMessageOrBuilder(); - } else { - return reference_ == null - ? com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() - : reference_; - } - } - /** - * - * - *
-     * Optional. The fully qualified reference to the job, which can be used to
-     * obtain the equivalent REST path of the job resource. If this property
-     * is not specified when a job is created, the server generates a
-     * <code>job_id</code>.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobReference, - com.google.cloud.dataproc.v1.JobReference.Builder, - com.google.cloud.dataproc.v1.JobReferenceOrBuilder> - getReferenceFieldBuilder() { - if (referenceBuilder_ == null) { - referenceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobReference, - com.google.cloud.dataproc.v1.JobReference.Builder, - com.google.cloud.dataproc.v1.JobReferenceOrBuilder>( - getReference(), getParentForChildren(), isClean()); - reference_ = null; - } - return referenceBuilder_; - } - - private com.google.cloud.dataproc.v1.JobPlacement placement_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobPlacement, - com.google.cloud.dataproc.v1.JobPlacement.Builder, - com.google.cloud.dataproc.v1.JobPlacementOrBuilder> - placementBuilder_; - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - public boolean hasPlacement() { - return placementBuilder_ != null || placement_ != null; - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - public com.google.cloud.dataproc.v1.JobPlacement getPlacement() { - if (placementBuilder_ == null) { - return placement_ == null - ? com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() - : placement_; - } else { - return placementBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement(com.google.cloud.dataproc.v1.JobPlacement value) { - if (placementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placement_ = value; - onChanged(); - } else { - placementBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement(com.google.cloud.dataproc.v1.JobPlacement.Builder builderForValue) { - if (placementBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - placementBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePlacement(com.google.cloud.dataproc.v1.JobPlacement value) { - if (placementBuilder_ == null) { - if (placement_ != null) { - placement_ = - com.google.cloud.dataproc.v1.JobPlacement.newBuilder(placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - placementBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPlacement() { - if (placementBuilder_ == null) { - placement_ = null; - onChanged(); - } else { - placement_ = null; - placementBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.JobPlacement.Builder getPlacementBuilder() { - - onChanged(); - return getPlacementFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.JobPlacementOrBuilder getPlacementOrBuilder() { - if (placementBuilder_ != null) { - return placementBuilder_.getMessageOrBuilder(); - } else { - return placement_ == null - ? com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() - : placement_; - } - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobPlacement, - com.google.cloud.dataproc.v1.JobPlacement.Builder, - com.google.cloud.dataproc.v1.JobPlacementOrBuilder> - getPlacementFieldBuilder() { - if (placementBuilder_ == null) { - placementBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobPlacement, - com.google.cloud.dataproc.v1.JobPlacement.Builder, - com.google.cloud.dataproc.v1.JobPlacementOrBuilder>( - getPlacement(), getParentForChildren(), isClean()); - placement_ = null; - } - return placementBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder> - hadoopJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return typeJobCase_ == 3; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 3) { - return hadoopJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - hadoopJobBuilder_.setMessage(value); - } - typeJobCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1.HadoopJob.Builder builderForValue) { - if (hadoopJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - hadoopJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (typeJobCase_ == 3 - && typeJob_ != com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.HadoopJob.newBuilder( - (com.google.cloud.dataproc.v1.HadoopJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 3) { - hadoopJobBuilder_.mergeFrom(value); - } - hadoopJobBuilder_.setMessage(value); - } - typeJobCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (typeJobCase_ == 3) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 3) { - typeJobCase_ = 0; - typeJob_ = null; - } - hadoopJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.HadoopJob.Builder getHadoopJobBuilder() { - return getHadoopJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if ((typeJobCase_ == 3) && (hadoopJobBuilder_ != null)) { - return hadoopJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder> - getHadoopJobFieldBuilder() { - if (hadoopJobBuilder_ == null) { - if (!(typeJobCase_ == 3)) { - typeJob_ = com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - hadoopJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder>( - (com.google.cloud.dataproc.v1.HadoopJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 3; - onChanged(); - ; - return hadoopJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder> - sparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return typeJobCase_ == 4; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob getSparkJob() { - if (sparkJobBuilder_ == null) { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 4) { - return sparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - sparkJobBuilder_.setMessage(value); - } - typeJobCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1.SparkJob.Builder builderForValue) { - if (sparkJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - sparkJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkJob(com.google.cloud.dataproc.v1.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (typeJobCase_ == 4 - && typeJob_ != com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.SparkJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 4) { - sparkJobBuilder_.mergeFrom(value); - } - sparkJobBuilder_.setMessage(value); - } - typeJobCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkJob() { - if (sparkJobBuilder_ == null) { - if (typeJobCase_ == 4) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 4) { - typeJobCase_ = 0; - typeJob_ = null; - } - sparkJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkJob.Builder getSparkJobBuilder() { - return getSparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() { - if ((typeJobCase_ == 4) && (sparkJobBuilder_ != null)) { - return sparkJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder> - getSparkJobFieldBuilder() { - if (sparkJobBuilder_ == null) { - if (!(typeJobCase_ == 4)) { - typeJob_ = com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - sparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 4; - onChanged(); - ; - return sparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder> - pysparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return typeJobCase_ == 5; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 5) { - return pysparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - pysparkJobBuilder_.setMessage(value); - } - typeJobCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1.PySparkJob.Builder builderForValue) { - if (pysparkJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - pysparkJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (typeJobCase_ == 5 - && typeJob_ != com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.PySparkJob.newBuilder( - (com.google.cloud.dataproc.v1.PySparkJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 5) { - pysparkJobBuilder_.mergeFrom(value); - } - pysparkJobBuilder_.setMessage(value); - } - typeJobCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (typeJobCase_ == 5) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 5) { - typeJobCase_ = 0; - typeJob_ = null; - } - pysparkJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PySparkJob.Builder getPysparkJobBuilder() { - return getPysparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if ((typeJobCase_ == 5) && (pysparkJobBuilder_ != null)) { - return pysparkJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder> - getPysparkJobFieldBuilder() { - if (pysparkJobBuilder_ == null) { - if (!(typeJobCase_ == 5)) { - typeJob_ = com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - pysparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder>( - (com.google.cloud.dataproc.v1.PySparkJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 5; - onChanged(); - ; - return pysparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder> - hiveJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return typeJobCase_ == 6; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob getHiveJob() { - if (hiveJobBuilder_ == null) { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 6) { - return hiveJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - hiveJobBuilder_.setMessage(value); - } - typeJobCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1.HiveJob.Builder builderForValue) { - if (hiveJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - hiveJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHiveJob(com.google.cloud.dataproc.v1.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (typeJobCase_ == 6 - && typeJob_ != com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.HiveJob.newBuilder( - (com.google.cloud.dataproc.v1.HiveJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 6) { - hiveJobBuilder_.mergeFrom(value); - } - hiveJobBuilder_.setMessage(value); - } - typeJobCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearHiveJob() { - if (hiveJobBuilder_ == null) { - if (typeJobCase_ == 6) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 6) { - typeJobCase_ = 0; - typeJob_ = null; - } - hiveJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.HiveJob.Builder getHiveJobBuilder() { - return getHiveJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() { - if ((typeJobCase_ == 6) && (hiveJobBuilder_ != null)) { - return hiveJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder> - getHiveJobFieldBuilder() { - if (hiveJobBuilder_ == null) { - if (!(typeJobCase_ == 6)) { - typeJob_ = com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - hiveJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder>( - (com.google.cloud.dataproc.v1.HiveJob) typeJob_, getParentForChildren(), isClean()); - typeJob_ = null; - } - typeJobCase_ = 6; - onChanged(); - ; - return hiveJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder> - pigJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return typeJobCase_ == 7; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob getPigJob() { - if (pigJobBuilder_ == null) { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 7) { - return pigJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1.PigJob value) { - if (pigJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - pigJobBuilder_.setMessage(value); - } - typeJobCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1.PigJob.Builder builderForValue) { - if (pigJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - pigJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePigJob(com.google.cloud.dataproc.v1.PigJob value) { - if (pigJobBuilder_ == null) { - if (typeJobCase_ == 7 - && typeJob_ != com.google.cloud.dataproc.v1.PigJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.PigJob.newBuilder( - (com.google.cloud.dataproc.v1.PigJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 7) { - pigJobBuilder_.mergeFrom(value); - } - pigJobBuilder_.setMessage(value); - } - typeJobCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPigJob() { - if (pigJobBuilder_ == null) { - if (typeJobCase_ == 7) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 7) { - typeJobCase_ = 0; - typeJob_ = null; - } - pigJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PigJob.Builder getPigJobBuilder() { - return getPigJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() { - if ((typeJobCase_ == 7) && (pigJobBuilder_ != null)) { - return pigJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder> - getPigJobFieldBuilder() { - if (pigJobBuilder_ == null) { - if (!(typeJobCase_ == 7)) { - typeJob_ = com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - pigJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder>( - (com.google.cloud.dataproc.v1.PigJob) typeJob_, getParentForChildren(), isClean()); - typeJob_ = null; - } - typeJobCase_ = 7; - onChanged(); - ; - return pigJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder> - sparkRJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return typeJobCase_ == 21; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob getSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 21) { - return sparkRJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - sparkRJobBuilder_.setMessage(value); - } - typeJobCase_ = 21; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1.SparkRJob.Builder builderForValue) { - if (sparkRJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - sparkRJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 21; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkRJob(com.google.cloud.dataproc.v1.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (typeJobCase_ == 21 - && typeJob_ != com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.SparkRJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkRJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 21) { - sparkRJobBuilder_.mergeFrom(value); - } - sparkRJobBuilder_.setMessage(value); - } - typeJobCase_ = 21; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (typeJobCase_ == 21) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 21) { - typeJobCase_ = 0; - typeJob_ = null; - } - sparkRJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkRJob.Builder getSparkRJobBuilder() { - return getSparkRJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if ((typeJobCase_ == 21) && (sparkRJobBuilder_ != null)) { - return sparkRJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder> - getSparkRJobFieldBuilder() { - if (sparkRJobBuilder_ == null) { - if (!(typeJobCase_ == 21)) { - typeJob_ = com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - sparkRJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkRJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 21; - onChanged(); - ; - return sparkRJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> - sparkSqlJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return typeJobCase_ == 12; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 12) { - return sparkSqlJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(value); - } - typeJobCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob( - com.google.cloud.dataproc.v1.SparkSqlJob.Builder builderForValue) { - if (sparkSqlJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (typeJobCase_ == 12 - && typeJob_ != com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.SparkSqlJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 12) { - sparkSqlJobBuilder_.mergeFrom(value); - } - sparkSqlJobBuilder_.setMessage(value); - } - typeJobCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (typeJobCase_ == 12) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 12) { - typeJobCase_ = 0; - typeJob_ = null; - } - sparkSqlJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkSqlJob.Builder getSparkSqlJobBuilder() { - return getSparkSqlJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if ((typeJobCase_ == 12) && (sparkSqlJobBuilder_ != null)) { - return sparkSqlJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> - getSparkSqlJobFieldBuilder() { - if (sparkSqlJobBuilder_ == null) { - if (!(typeJobCase_ == 12)) { - typeJob_ = com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - sparkSqlJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 12; - onChanged(); - ; - return sparkSqlJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder> - prestoJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return typeJobCase_ == 23; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob getPrestoJob() { - if (prestoJobBuilder_ == null) { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 23) { - return prestoJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - typeJob_ = value; - onChanged(); - } else { - prestoJobBuilder_.setMessage(value); - } - typeJobCase_ = 23; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1.PrestoJob.Builder builderForValue) { - if (prestoJobBuilder_ == null) { - typeJob_ = builderForValue.build(); - onChanged(); - } else { - prestoJobBuilder_.setMessage(builderForValue.build()); - } - typeJobCase_ = 23; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePrestoJob(com.google.cloud.dataproc.v1.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (typeJobCase_ == 23 - && typeJob_ != com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1.PrestoJob.newBuilder( - (com.google.cloud.dataproc.v1.PrestoJob) typeJob_) - .mergeFrom(value) - .buildPartial(); - } else { - typeJob_ = value; - } - onChanged(); - } else { - if (typeJobCase_ == 23) { - prestoJobBuilder_.mergeFrom(value); - } - prestoJobBuilder_.setMessage(value); - } - typeJobCase_ = 23; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPrestoJob() { - if (prestoJobBuilder_ == null) { - if (typeJobCase_ == 23) { - typeJobCase_ = 0; - typeJob_ = null; - onChanged(); - } - } else { - if (typeJobCase_ == 23) { - typeJobCase_ = 0; - typeJob_ = null; - } - prestoJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PrestoJob.Builder getPrestoJobBuilder() { - return getPrestoJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if ((typeJobCase_ == 23) && (prestoJobBuilder_ != null)) { - return prestoJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder> - getPrestoJobFieldBuilder() { - if (prestoJobBuilder_ == null) { - if (!(typeJobCase_ == 23)) { - typeJob_ = com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - prestoJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder>( - (com.google.cloud.dataproc.v1.PrestoJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 23; - onChanged(); - ; - return prestoJobBuilder_; - } - - private com.google.cloud.dataproc.v1.JobStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1.JobStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.JobStatus value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1.JobStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1.JobStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. The job status. Additional application-specific
-     * status information may be contained in the <code>type_job</code>
-     * and <code>yarn_applications</code> fields.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder>( - getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - private java.util.List statusHistory_ = - java.util.Collections.emptyList(); - - private void ensureStatusHistoryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - statusHistory_ = - new java.util.ArrayList(statusHistory_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getStatusHistoryList() { - if (statusHistoryBuilder_ == null) { - return java.util.Collections.unmodifiableList(statusHistory_); - } else { - return statusHistoryBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getStatusHistoryCount() { - if (statusHistoryBuilder_ == null) { - return statusHistory_.size(); - } else { - return statusHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus getStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory(int index, com.google.cloud.dataproc.v1.JobStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, value); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.set(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(com.google.cloud.dataproc.v1.JobStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(int index, com.google.cloud.dataproc.v1.JobStatus value) { - if (statusHistoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, value); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.add(index, builderForValue.build()); - onChanged(); - } else { - statusHistoryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllStatusHistory( - java.lang.Iterable values) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusHistory_); - onChanged(); - } else { - statusHistoryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatusHistory() { - if (statusHistoryBuilder_ == null) { - statusHistory_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - statusHistoryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeStatusHistory(int index) { - if (statusHistoryBuilder_ == null) { - ensureStatusHistoryIsMutable(); - statusHistory_.remove(index); - onChanged(); - } else { - statusHistoryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus.Builder getStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusHistoryOrBuilder(int index) { - if (statusHistoryBuilder_ == null) { - return statusHistory_.get(index); - } else { - return statusHistoryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryOrBuilderList() { - if (statusHistoryBuilder_ != null) { - return statusHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statusHistory_); - } - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus.Builder addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus.Builder addStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getStatusHistoryBuilderList() { - return getStatusHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder>( - statusHistory_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - statusHistory_ = null; - } - return statusHistoryBuilder_; - } - - private java.util.List yarnApplications_ = - java.util.Collections.emptyList(); - - private void ensureYarnApplicationsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - yarnApplications_ = - new java.util.ArrayList( - yarnApplications_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.YarnApplication, - com.google.cloud.dataproc.v1.YarnApplication.Builder, - com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> - yarnApplicationsBuilder_; - - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getYarnApplicationsList() { - if (yarnApplicationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(yarnApplications_); - } else { - return yarnApplicationsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getYarnApplicationsCount() { - if (yarnApplicationsBuilder_ == null) { - return yarnApplications_.size(); - } else { - return yarnApplicationsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.YarnApplication getYarnApplications(int index) { - if (yarnApplicationsBuilder_ == null) { - return yarnApplications_.get(index); - } else { - return yarnApplicationsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setYarnApplications( - int index, com.google.cloud.dataproc.v1.YarnApplication value) { - if (yarnApplicationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureYarnApplicationsIsMutable(); - yarnApplications_.set(index, value); - onChanged(); - } else { - yarnApplicationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setYarnApplications( - int index, com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) { - if (yarnApplicationsBuilder_ == null) { - ensureYarnApplicationsIsMutable(); - yarnApplications_.set(index, builderForValue.build()); - onChanged(); - } else { - yarnApplicationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications(com.google.cloud.dataproc.v1.YarnApplication value) { - if (yarnApplicationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureYarnApplicationsIsMutable(); - yarnApplications_.add(value); - onChanged(); - } else { - yarnApplicationsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - int index, com.google.cloud.dataproc.v1.YarnApplication value) { - if (yarnApplicationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureYarnApplicationsIsMutable(); - yarnApplications_.add(index, value); - onChanged(); - } else { - yarnApplicationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) { - if (yarnApplicationsBuilder_ == null) { - ensureYarnApplicationsIsMutable(); - yarnApplications_.add(builderForValue.build()); - onChanged(); - } else { - yarnApplicationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - int index, com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) { - if (yarnApplicationsBuilder_ == null) { - ensureYarnApplicationsIsMutable(); - yarnApplications_.add(index, builderForValue.build()); - onChanged(); - } else { - yarnApplicationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllYarnApplications( - java.lang.Iterable values) { - if (yarnApplicationsBuilder_ == null) { - ensureYarnApplicationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, yarnApplications_); - onChanged(); - } else { - yarnApplicationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearYarnApplications() { - if (yarnApplicationsBuilder_ == null) { - yarnApplications_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - yarnApplicationsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeYarnApplications(int index) { - if (yarnApplicationsBuilder_ == null) { - ensureYarnApplicationsIsMutable(); - yarnApplications_.remove(index); - onChanged(); - } else { - yarnApplicationsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.YarnApplication.Builder getYarnApplicationsBuilder( - int index) { - return getYarnApplicationsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.YarnApplicationOrBuilder getYarnApplicationsOrBuilder( - int index) { - if (yarnApplicationsBuilder_ == null) { - return yarnApplications_.get(index); - } else { - return yarnApplicationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getYarnApplicationsOrBuilderList() { - if (yarnApplicationsBuilder_ != null) { - return yarnApplicationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(yarnApplications_); - } - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.YarnApplication.Builder addYarnApplicationsBuilder() { - return getYarnApplicationsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.YarnApplication.Builder addYarnApplicationsBuilder( - int index) { - return getYarnApplicationsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The collection of YARN applications spun up by this job.
-     * **Beta** Feature: This report is available for testing purposes only. It
-     * may be changed before final release.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getYarnApplicationsBuilderList() { - return getYarnApplicationsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.YarnApplication, - com.google.cloud.dataproc.v1.YarnApplication.Builder, - com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> - getYarnApplicationsFieldBuilder() { - if (yarnApplicationsBuilder_ == null) { - yarnApplicationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.YarnApplication, - com.google.cloud.dataproc.v1.YarnApplication.Builder, - com.google.cloud.dataproc.v1.YarnApplicationOrBuilder>( - yarnApplications_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - yarnApplications_ = null; - } - return yarnApplicationsBuilder_; - } - - private java.lang.Object driverOutputResourceUri_ = ""; - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout of the job's
-     * driver program.
-     * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The driverOutputResourceUri. - */ - public java.lang.String getDriverOutputResourceUri() { - java.lang.Object ref = driverOutputResourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - driverOutputResourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout of the job's
-     * driver program.
-     * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for driverOutputResourceUri. - */ - public com.google.protobuf.ByteString getDriverOutputResourceUriBytes() { - java.lang.Object ref = driverOutputResourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - driverOutputResourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout of the job's
-     * driver program.
-     * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The driverOutputResourceUri to set. - * @return This builder for chaining. - */ - public Builder setDriverOutputResourceUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - driverOutputResourceUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout of the job's
-     * driver program.
-     * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDriverOutputResourceUri() { - - driverOutputResourceUri_ = getDefaultInstance().getDriverOutputResourceUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout of the job's
-     * driver program.
-     * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for driverOutputResourceUri to set. - * @return This builder for chaining. - */ - public Builder setDriverOutputResourceUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - driverOutputResourceUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object driverControlFilesUri_ = ""; - /** - * - * - *
-     * Output only. If present, the location of miscellaneous control files
-     * which may be used as part of job setup and handling. If not present,
-     * control files may be placed in the same location as `driver_output_uri`.
-     * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The driverControlFilesUri. - */ - public java.lang.String getDriverControlFilesUri() { - java.lang.Object ref = driverControlFilesUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - driverControlFilesUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. If present, the location of miscellaneous control files
-     * which may be used as part of job setup and handling. If not present,
-     * control files may be placed in the same location as `driver_output_uri`.
-     * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for driverControlFilesUri. - */ - public com.google.protobuf.ByteString getDriverControlFilesUriBytes() { - java.lang.Object ref = driverControlFilesUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - driverControlFilesUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. If present, the location of miscellaneous control files
-     * which may be used as part of job setup and handling. If not present,
-     * control files may be placed in the same location as `driver_output_uri`.
-     * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The driverControlFilesUri to set. - * @return This builder for chaining. - */ - public Builder setDriverControlFilesUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - driverControlFilesUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. If present, the location of miscellaneous control files
-     * which may be used as part of job setup and handling. If not present,
-     * control files may be placed in the same location as `driver_output_uri`.
-     * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDriverControlFilesUri() { - - driverControlFilesUri_ = getDefaultInstance().getDriverControlFilesUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. If present, the location of miscellaneous control files
-     * which may be used as part of job setup and handling. If not present,
-     * control files may be placed in the same location as `driver_output_uri`.
-     * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for driverControlFilesUri to set. - * @return This builder for chaining. - */ - public Builder setDriverControlFilesUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - driverControlFilesUri_ = value; - onChanged(); - return this; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to [RFC
-     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-     * associated with a job.
-     * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.JobScheduling scheduling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> - schedulingBuilder_; - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - public boolean hasScheduling() { - return schedulingBuilder_ != null || scheduling_ != null; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - public com.google.cloud.dataproc.v1.JobScheduling getScheduling() { - if (schedulingBuilder_ == null) { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } else { - return schedulingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling(com.google.cloud.dataproc.v1.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - scheduling_ = value; - onChanged(); - } else { - schedulingBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling( - com.google.cloud.dataproc.v1.JobScheduling.Builder builderForValue) { - if (schedulingBuilder_ == null) { - scheduling_ = builderForValue.build(); - onChanged(); - } else { - schedulingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeScheduling(com.google.cloud.dataproc.v1.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (scheduling_ != null) { - scheduling_ = - com.google.cloud.dataproc.v1.JobScheduling.newBuilder(scheduling_) - .mergeFrom(value) - .buildPartial(); - } else { - scheduling_ = value; - } - onChanged(); - } else { - schedulingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearScheduling() { - if (schedulingBuilder_ == null) { - scheduling_ = null; - onChanged(); - } else { - scheduling_ = null; - schedulingBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobScheduling.Builder getSchedulingBuilder() { - - onChanged(); - return getSchedulingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() { - if (schedulingBuilder_ != null) { - return schedulingBuilder_.getMessageOrBuilder(); - } else { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> - getSchedulingFieldBuilder() { - if (schedulingBuilder_ == null) { - schedulingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder>( - getScheduling(), getParentForChildren(), isClean()); - scheduling_ = null; - } - return schedulingBuilder_; - } - - private java.lang.Object jobUuid_ = ""; - /** - * - * - *
-     * Output only. A UUID that uniquely identifies a job within the project
-     * over time. This is in contrast to a user-settable reference.job_id that
-     * may be reused over time.
-     * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobUuid. - */ - public java.lang.String getJobUuid() { - java.lang.Object ref = jobUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A UUID that uniquely identifies a job within the project
-     * over time. This is in contrast to a user-settable reference.job_id that
-     * may be reused over time.
-     * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobUuid. - */ - public com.google.protobuf.ByteString getJobUuidBytes() { - java.lang.Object ref = jobUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A UUID that uniquely identifies a job within the project
-     * over time. This is in contrast to a user-settable reference.job_id that
-     * may be reused over time.
-     * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The jobUuid to set. - * @return This builder for chaining. - */ - public Builder setJobUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A UUID that uniquely identifies a job within the project
-     * over time. This is in contrast to a user-settable reference.job_id that
-     * may be reused over time.
-     * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearJobUuid() { - - jobUuid_ = getDefaultInstance().getJobUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A UUID that uniquely identifies a job within the project
-     * over time. This is in contrast to a user-settable reference.job_id that
-     * may be reused over time.
-     * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for jobUuid to set. - * @return This builder for chaining. - */ - public Builder setJobUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobUuid_ = value; - onChanged(); - return this; - } - - private boolean done_; - /** - * - * - *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
-     * `status.state` field will indicate if it was successful, failed,
-     * or cancelled.
-     * 
- * - * bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - /** - * - * - *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
-     * `status.state` field will indicate if it was successful, failed,
-     * or cancelled.
-     * 
- * - * bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The done to set. - * @return This builder for chaining. - */ - public Builder setDone(boolean value) { - - done_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Indicates whether the job is completed. If the value is `false`,
-     * the job is still in progress. If `true`, the job is completed, and
-     * `status.state` field will indicate if it was successful, failed,
-     * or cancelled.
-     * 
- * - * bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDone() { - - done_ = 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.dataproc.v1.Job) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.Job) - private static final com.google.cloud.dataproc.v1.Job DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.Job(); - } - - public static com.google.cloud.dataproc.v1.Job getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Job parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Job(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.dataproc.v1.Job getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadata.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadata.java deleted file mode 100644 index 2c6d86a9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadata.java +++ /dev/null @@ -1,1391 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Job Operation metadata.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobMetadata} - */ -public final class JobMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobMetadata) - JobMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobMetadata.newBuilder() to construct. - private JobMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private JobMetadata() { - jobId_ = ""; - operationType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new JobMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private JobMetadata( - 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(); - - jobId_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.JobStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - operationType_ = s; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobMetadata.class, - com.google.cloud.dataproc.v1.JobMetadata.Builder.class); - } - - public static final int JOB_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Output only. The job id.
-   * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The job id.
-   * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATUS_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.JobStatus status_; - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus getStatus() { - return status_ == null ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() : status_; - } - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - public static final int OPERATION_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object operationType_; - /** - * - * - *
-   * Output only. Operation type.
-   * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - @java.lang.Override - public java.lang.String getOperationType() { - java.lang.Object ref = operationType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationType_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Operation type.
-   * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOperationTypeBytes() { - java.lang.Object ref = operationType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int START_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobId_); - } - if (status_ != null) { - output.writeMessage(2, getStatus()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operationType_); - } - if (startTime_ != null) { - output.writeMessage(4, getStartTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobId_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operationType_); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); - } - 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.dataproc.v1.JobMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.JobMetadata other = (com.google.cloud.dataproc.v1.JobMetadata) obj; - - if (!getJobId().equals(other.getJobId())) return false; - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } - if (!getOperationType().equals(other.getOperationType())) return false; - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) 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) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getOperationType().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.JobMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobMetadata 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.dataproc.v1.JobMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobMetadata parseFrom( - 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.dataproc.v1.JobMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.JobMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobMetadata 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.dataproc.v1.JobMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobMetadata 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.dataproc.v1.JobMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobMetadata 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.dataproc.v1.JobMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Job Operation metadata.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobMetadata) - com.google.cloud.dataproc.v1.JobMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobMetadata.class, - com.google.cloud.dataproc.v1.JobMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.JobMetadata.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(); - jobId_ = ""; - - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - operationType_ = ""; - - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.JobMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobMetadata build() { - com.google.cloud.dataproc.v1.JobMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobMetadata buildPartial() { - com.google.cloud.dataproc.v1.JobMetadata result = - new com.google.cloud.dataproc.v1.JobMetadata(this); - result.jobId_ = jobId_; - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } - result.operationType_ = operationType_; - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.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.dataproc.v1.JobMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1.JobMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.JobMetadata other) { - if (other == com.google.cloud.dataproc.v1.JobMetadata.getDefaultInstance()) return this; - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - onChanged(); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - if (!other.getOperationType().isEmpty()) { - operationType_ = other.operationType_; - onChanged(); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - 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.dataproc.v1.JobMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.JobMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Output only. The job id.
-     * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The job id.
-     * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The job id.
-     * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The job id.
-     * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The job id.
-     * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.JobStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1.JobStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.JobStatus value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1.JobStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1.JobStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobStatus, - com.google.cloud.dataproc.v1.JobStatus.Builder, - com.google.cloud.dataproc.v1.JobStatusOrBuilder>( - getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - private java.lang.Object operationType_ = ""; - /** - * - * - *
-     * Output only. Operation type.
-     * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - public java.lang.String getOperationType() { - java.lang.Object ref = operationType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - operationType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Operation type.
-     * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - public com.google.protobuf.ByteString getOperationTypeBytes() { - java.lang.Object ref = operationType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - operationType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Operation type.
-     * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - operationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Operation type.
-     * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOperationType() { - - operationType_ = getDefaultInstance().getOperationType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Operation type.
-     * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for operationType to set. - * @return This builder for chaining. - */ - public Builder setOperationTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - operationType_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. Job submission time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.JobMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobMetadata) - private static final com.google.cloud.dataproc.v1.JobMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobMetadata(); - } - - public static com.google.cloud.dataproc.v1.JobMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobMetadata(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.dataproc.v1.JobMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadataOrBuilder.java deleted file mode 100644 index f1343e20..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadataOrBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.JobMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The job id.
-   * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Output only. The job id.
-   * 
- * - * string job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); - - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1.JobStatus getStatus(); - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. Operation type.
-   * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The operationType. - */ - java.lang.String getOperationType(); - /** - * - * - *
-   * Output only. Operation type.
-   * 
- * - * string operation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for operationType. - */ - com.google.protobuf.ByteString getOperationTypeBytes(); - - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. Job submission time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java deleted file mode 100644 index f70e389f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java +++ /dev/null @@ -1,852 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.Job) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the reference field is set. - */ - boolean hasReference(); - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - com.google.cloud.dataproc.v1.JobReference getReference(); - /** - * - * - *
-   * Optional. The fully qualified reference to the job, which can be used to
-   * obtain the equivalent REST path of the job resource. If this property
-   * is not specified when a job is created, the server generates a
-   * <code>job_id</code>.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.JobReferenceOrBuilder getReferenceOrBuilder(); - - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - boolean hasPlacement(); - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - com.google.cloud.dataproc.v1.JobPlacement getPlacement(); - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.JobPlacementOrBuilder getPlacementOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - boolean hasHadoopJob(); - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - com.google.cloud.dataproc.v1.HadoopJob getHadoopJob(); - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - boolean hasSparkJob(); - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - com.google.cloud.dataproc.v1.SparkJob getSparkJob(); - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - boolean hasPysparkJob(); - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - com.google.cloud.dataproc.v1.PySparkJob getPysparkJob(); - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - boolean hasHiveJob(); - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - com.google.cloud.dataproc.v1.HiveJob getHiveJob(); - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - boolean hasPigJob(); - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - com.google.cloud.dataproc.v1.PigJob getPigJob(); - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - boolean hasSparkRJob(); - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - com.google.cloud.dataproc.v1.SparkRJob getSparkRJob(); - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - boolean hasSparkSqlJob(); - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob(); - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - boolean hasPrestoJob(); - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - com.google.cloud.dataproc.v1.PrestoJob getPrestoJob(); - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder(); - - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1.JobStatus getStatus(); - /** - * - * - *
-   * Output only. The job status. Additional application-specific
-   * status information may be contained in the <code>type_job</code>
-   * and <code>yarn_applications</code> fields.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.JobStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusHistoryOrBuilder(int index); - - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getYarnApplicationsList(); - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.YarnApplication getYarnApplications(int index); - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getYarnApplicationsCount(); - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getYarnApplicationsOrBuilderList(); - /** - * - * - *
-   * Output only. The collection of YARN applications spun up by this job.
-   * **Beta** Feature: This report is available for testing purposes only. It
-   * may be changed before final release.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.YarnApplicationOrBuilder getYarnApplicationsOrBuilder(int index); - - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout of the job's
-   * driver program.
-   * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The driverOutputResourceUri. - */ - java.lang.String getDriverOutputResourceUri(); - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout of the job's
-   * driver program.
-   * 
- * - * string driver_output_resource_uri = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for driverOutputResourceUri. - */ - com.google.protobuf.ByteString getDriverOutputResourceUriBytes(); - - /** - * - * - *
-   * Output only. If present, the location of miscellaneous control files
-   * which may be used as part of job setup and handling. If not present,
-   * control files may be placed in the same location as `driver_output_uri`.
-   * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The driverControlFilesUri. - */ - java.lang.String getDriverControlFilesUri(); - /** - * - * - *
-   * Output only. If present, the location of miscellaneous control files
-   * which may be used as part of job setup and handling. If not present,
-   * control files may be placed in the same location as `driver_output_uri`.
-   * 
- * - * string driver_control_files_uri = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for driverControlFilesUri. - */ - com.google.protobuf.ByteString getDriverControlFilesUriBytes(); - - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to [RFC
-   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
-   * associated with a job.
-   * 
- * - * map<string, string> labels = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - boolean hasScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - com.google.cloud.dataproc.v1.JobScheduling getScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder(); - - /** - * - * - *
-   * Output only. A UUID that uniquely identifies a job within the project
-   * over time. This is in contrast to a user-settable reference.job_id that
-   * may be reused over time.
-   * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobUuid. - */ - java.lang.String getJobUuid(); - /** - * - * - *
-   * Output only. A UUID that uniquely identifies a job within the project
-   * over time. This is in contrast to a user-settable reference.job_id that
-   * may be reused over time.
-   * 
- * - * string job_uuid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobUuid. - */ - com.google.protobuf.ByteString getJobUuidBytes(); - - /** - * - * - *
-   * Output only. Indicates whether the job is completed. If the value is `false`,
-   * the job is still in progress. If `true`, the job is completed, and
-   * `status.state` field will indicate if it was successful, failed,
-   * or cancelled.
-   * 
- * - * bool done = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The done. - */ - boolean getDone(); - - public com.google.cloud.dataproc.v1.Job.TypeJobCase getTypeJobCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java deleted file mode 100644 index 70878de8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java +++ /dev/null @@ -1,1165 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Dataproc job config.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobPlacement} - */ -public final class JobPlacement extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobPlacement) - JobPlacementOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobPlacement.newBuilder() to construct. - private JobPlacement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private JobPlacement() { - clusterName_ = ""; - clusterUuid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new JobPlacement(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private JobPlacement( - 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(); - - clusterName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusterLabels_ = - com.google.protobuf.MapField.newMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry clusterLabels__ = - input.readMessage( - ClusterLabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusterLabels_ - .getMutableMap() - .put(clusterLabels__.getKey(), clusterLabels__.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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobPlacement.class, - com.google.cloud.dataproc.v1.JobPlacement.Builder.class); - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The name of the cluster where the job will be submitted.
-   * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the cluster where the job will be submitted.
-   * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Output only. A cluster UUID generated by the Dataproc service when
-   * the job is submitted.
-   * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A cluster UUID generated by the Dataproc service when
-   * the job is submitted.
-   * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_LABELS_FIELD_NUMBER = 3; - - private static final class ClusterLabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField clusterLabels_; - - private com.google.protobuf.MapField - internalGetClusterLabels() { - if (clusterLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - } - return clusterLabels_; - } - - public int getClusterLabelsCount() { - return internalGetClusterLabels().getMap().size(); - } - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetClusterLabels().getMap().containsKey(key); - } - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getClusterLabels() { - return getClusterLabelsMap(); - } - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getClusterLabelsMap() { - return internalGetClusterLabels().getMap(); - } - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUuid_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetClusterLabels(), ClusterLabelsDefaultEntryHolder.defaultEntry, 3); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUuid_); - } - for (java.util.Map.Entry entry : - internalGetClusterLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry clusterLabels__ = - ClusterLabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, clusterLabels__); - } - 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.dataproc.v1.JobPlacement)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.JobPlacement other = - (com.google.cloud.dataproc.v1.JobPlacement) obj; - - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (!internalGetClusterLabels().equals(other.internalGetClusterLabels())) 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) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - if (!internalGetClusterLabels().getMap().isEmpty()) { - hash = (37 * hash) + CLUSTER_LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetClusterLabels().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.JobPlacement parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobPlacement 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.dataproc.v1.JobPlacement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobPlacement parseFrom( - 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.dataproc.v1.JobPlacement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobPlacement parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.JobPlacement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobPlacement 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.dataproc.v1.JobPlacement parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobPlacement 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.dataproc.v1.JobPlacement parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobPlacement 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.dataproc.v1.JobPlacement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Dataproc job config.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobPlacement} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobPlacement) - com.google.cloud.dataproc.v1.JobPlacementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableClusterLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobPlacement.class, - com.google.cloud.dataproc.v1.JobPlacement.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.JobPlacement.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(); - clusterName_ = ""; - - clusterUuid_ = ""; - - internalGetMutableClusterLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobPlacement getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobPlacement build() { - com.google.cloud.dataproc.v1.JobPlacement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobPlacement buildPartial() { - com.google.cloud.dataproc.v1.JobPlacement result = - new com.google.cloud.dataproc.v1.JobPlacement(this); - int from_bitField0_ = bitField0_; - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - result.clusterLabels_ = internalGetClusterLabels(); - result.clusterLabels_.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.dataproc.v1.JobPlacement) { - return mergeFrom((com.google.cloud.dataproc.v1.JobPlacement) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.JobPlacement other) { - if (other == com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance()) return this; - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - internalGetMutableClusterLabels().mergeFrom(other.internalGetClusterLabels()); - 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.dataproc.v1.JobPlacement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.JobPlacement) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The name of the cluster where the job will be submitted.
-     * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The name of the cluster where the job will be submitted.
-     * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The name of the cluster where the job will be submitted.
-     * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the cluster where the job will be submitted.
-     * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the cluster where the job will be submitted.
-     * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Output only. A cluster UUID generated by the Dataproc service when
-     * the job is submitted.
-     * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A cluster UUID generated by the Dataproc service when
-     * the job is submitted.
-     * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A cluster UUID generated by the Dataproc service when
-     * the job is submitted.
-     * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A cluster UUID generated by the Dataproc service when
-     * the job is submitted.
-     * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A cluster UUID generated by the Dataproc service when
-     * the job is submitted.
-     * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField clusterLabels_; - - private com.google.protobuf.MapField - internalGetClusterLabels() { - if (clusterLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterLabelsDefaultEntryHolder.defaultEntry); - } - return clusterLabels_; - } - - private com.google.protobuf.MapField - internalGetMutableClusterLabels() { - onChanged(); - ; - if (clusterLabels_ == null) { - clusterLabels_ = - com.google.protobuf.MapField.newMapField(ClusterLabelsDefaultEntryHolder.defaultEntry); - } - if (!clusterLabels_.isMutable()) { - clusterLabels_ = clusterLabels_.copy(); - } - return clusterLabels_; - } - - public int getClusterLabelsCount() { - return internalGetClusterLabels().getMap().size(); - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetClusterLabels().getMap().containsKey(key); - } - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getClusterLabels() { - return getClusterLabelsMap(); - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getClusterLabelsMap() { - return internalGetClusterLabels().getMap(); - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getClusterLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetClusterLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearClusterLabels() { - internalGetMutableClusterLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeClusterLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableClusterLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableClusterLabels() { - return internalGetMutableClusterLabels().getMutableMap(); - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putClusterLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableClusterLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Cluster labels to identify a cluster where the job will be submitted.
-     * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllClusterLabels(java.util.Map values) { - internalGetMutableClusterLabels().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.dataproc.v1.JobPlacement) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobPlacement) - private static final com.google.cloud.dataproc.v1.JobPlacement DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobPlacement(); - } - - public static com.google.cloud.dataproc.v1.JobPlacement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobPlacement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobPlacement(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.dataproc.v1.JobPlacement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java deleted file mode 100644 index d6e90b3e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobPlacementOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.JobPlacement) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the cluster where the job will be submitted.
-   * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The name of the cluster where the job will be submitted.
-   * 
- * - * string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Output only. A cluster UUID generated by the Dataproc service when
-   * the job is submitted.
-   * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Output only. A cluster UUID generated by the Dataproc service when
-   * the job is submitted.
-   * 
- * - * string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getClusterLabelsCount(); - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsClusterLabels(java.lang.String key); - /** Use {@link #getClusterLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getClusterLabels(); - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getClusterLabelsMap(); - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getClusterLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Cluster labels to identify a cluster where the job will be submitted.
-   * 
- * - * map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getClusterLabelsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java deleted file mode 100644 index 315aa424..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java +++ /dev/null @@ -1,841 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Encapsulates the full scoping used to reference a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobReference} - */ -public final class JobReference extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobReference) - JobReferenceOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobReference.newBuilder() to construct. - private JobReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private JobReference() { - projectId_ = ""; - jobId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new JobReference(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private JobReference( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobReference.class, - com.google.cloud.dataproc.v1.JobReference.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Optional. The job ID, which must be unique within the project.
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), or hyphens (-). The maximum length is 100 characters.
-   * If not specified by the caller, the job ID will be provided by the server.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The job ID, which must be unique within the project.
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), or hyphens (-). The maximum length is 100 characters.
-   * If not specified by the caller, the job ID will be provided by the server.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - 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.dataproc.v1.JobReference)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.JobReference other = - (com.google.cloud.dataproc.v1.JobReference) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getJobId().equals(other.getJobId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.JobReference parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobReference 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.dataproc.v1.JobReference parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobReference parseFrom( - 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.dataproc.v1.JobReference parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobReference parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.JobReference parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobReference 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.dataproc.v1.JobReference parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobReference 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.dataproc.v1.JobReference parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobReference 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.dataproc.v1.JobReference prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Encapsulates the full scoping used to reference a job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobReference} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobReference) - com.google.cloud.dataproc.v1.JobReferenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobReference.class, - com.google.cloud.dataproc.v1.JobReference.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.JobReference.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(); - projectId_ = ""; - - jobId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobReference_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobReference getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.JobReference.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobReference build() { - com.google.cloud.dataproc.v1.JobReference result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobReference buildPartial() { - com.google.cloud.dataproc.v1.JobReference result = - new com.google.cloud.dataproc.v1.JobReference(this); - result.projectId_ = projectId_; - result.jobId_ = jobId_; - 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.dataproc.v1.JobReference) { - return mergeFrom((com.google.cloud.dataproc.v1.JobReference) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.JobReference other) { - if (other == com.google.cloud.dataproc.v1.JobReference.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - 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.dataproc.v1.JobReference parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.JobReference) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-     * specified, must match the request project ID.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Optional. The job ID, which must be unique within the project.
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), or hyphens (-). The maximum length is 100 characters.
-     * If not specified by the caller, the job ID will be provided by the server.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The job ID, which must be unique within the project.
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), or hyphens (-). The maximum length is 100 characters.
-     * If not specified by the caller, the job ID will be provided by the server.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The job ID, which must be unique within the project.
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), or hyphens (-). The maximum length is 100 characters.
-     * If not specified by the caller, the job ID will be provided by the server.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The job ID, which must be unique within the project.
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), or hyphens (-). The maximum length is 100 characters.
-     * If not specified by the caller, the job ID will be provided by the server.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The job ID, which must be unique within the project.
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), or hyphens (-). The maximum length is 100 characters.
-     * If not specified by the caller, the job ID will be provided by the server.
-     * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = 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.dataproc.v1.JobReference) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobReference) - private static final com.google.cloud.dataproc.v1.JobReference DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobReference(); - } - - public static com.google.cloud.dataproc.v1.JobReference getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobReference parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobReference(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.dataproc.v1.JobReference getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java deleted file mode 100644 index df102fa4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobReferenceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.JobReference) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Optional. The ID of the Google Cloud Platform project that the job belongs to. If
-   * specified, must match the request project ID.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Optional. The job ID, which must be unique within the project.
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), or hyphens (-). The maximum length is 100 characters.
-   * If not specified by the caller, the job ID will be provided by the server.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Optional. The job ID, which must be unique within the project.
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), or hyphens (-). The maximum length is 100 characters.
-   * If not specified by the caller, the job ID will be provided by the server.
-   * 
- * - * string job_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java deleted file mode 100644 index 9d61996c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java +++ /dev/null @@ -1,702 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Job scheduling options.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobScheduling} - */ -public final class JobScheduling extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobScheduling) - JobSchedulingOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobScheduling.newBuilder() to construct. - private JobScheduling(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private JobScheduling() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new JobScheduling(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private JobScheduling( - 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: - { - maxFailuresPerHour_ = input.readInt32(); - break; - } - case 16: - { - maxFailuresTotal_ = input.readInt32(); - 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobScheduling.class, - com.google.cloud.dataproc.v1.JobScheduling.Builder.class); - } - - public static final int MAX_FAILURES_PER_HOUR_FIELD_NUMBER = 1; - private int maxFailuresPerHour_; - /** - * - * - *
-   * Optional. Maximum number of times per hour a driver may be restarted as
-   * a result of driver exiting with non-zero code before job is
-   * reported failed.
-   * A job may be reported as thrashing if driver exits with non-zero code
-   * 4 times within 10 minute window.
-   * Maximum value is 10.
-   * **Note:** Currently, this restartable job option is
-   * not supported in Dataproc
-   * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - @java.lang.Override - public int getMaxFailuresPerHour() { - return maxFailuresPerHour_; - } - - public static final int MAX_FAILURES_TOTAL_FIELD_NUMBER = 2; - private int maxFailuresTotal_; - /** - * - * - *
-   * Optional. Maximum number of times in total a driver may be restarted as a result of
-   * driver exiting with non-zero code before job is reported failed.
-   * Maximum value is 240.
-   * **Note:** Currently, this restartable job option is
-   * not supported in Dataproc
-   * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
-   * 
- * - * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresTotal. - */ - @java.lang.Override - public int getMaxFailuresTotal() { - return maxFailuresTotal_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (maxFailuresPerHour_ != 0) { - output.writeInt32(1, maxFailuresPerHour_); - } - if (maxFailuresTotal_ != 0) { - output.writeInt32(2, maxFailuresTotal_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (maxFailuresPerHour_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxFailuresPerHour_); - } - if (maxFailuresTotal_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxFailuresTotal_); - } - 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.dataproc.v1.JobScheduling)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.JobScheduling other = - (com.google.cloud.dataproc.v1.JobScheduling) obj; - - if (getMaxFailuresPerHour() != other.getMaxFailuresPerHour()) return false; - if (getMaxFailuresTotal() != other.getMaxFailuresTotal()) 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) + MAX_FAILURES_PER_HOUR_FIELD_NUMBER; - hash = (53 * hash) + getMaxFailuresPerHour(); - hash = (37 * hash) + MAX_FAILURES_TOTAL_FIELD_NUMBER; - hash = (53 * hash) + getMaxFailuresTotal(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.JobScheduling parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobScheduling 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.dataproc.v1.JobScheduling parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( - 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.dataproc.v1.JobScheduling parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobScheduling parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.JobScheduling parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobScheduling 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.dataproc.v1.JobScheduling parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobScheduling 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.dataproc.v1.JobScheduling parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobScheduling 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.dataproc.v1.JobScheduling prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Job scheduling options.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobScheduling} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobScheduling) - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobScheduling.class, - com.google.cloud.dataproc.v1.JobScheduling.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.JobScheduling.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(); - maxFailuresPerHour_ = 0; - - maxFailuresTotal_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobScheduling getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobScheduling build() { - com.google.cloud.dataproc.v1.JobScheduling result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobScheduling buildPartial() { - com.google.cloud.dataproc.v1.JobScheduling result = - new com.google.cloud.dataproc.v1.JobScheduling(this); - result.maxFailuresPerHour_ = maxFailuresPerHour_; - result.maxFailuresTotal_ = maxFailuresTotal_; - 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.dataproc.v1.JobScheduling) { - return mergeFrom((com.google.cloud.dataproc.v1.JobScheduling) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.JobScheduling other) { - if (other == com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance()) return this; - if (other.getMaxFailuresPerHour() != 0) { - setMaxFailuresPerHour(other.getMaxFailuresPerHour()); - } - if (other.getMaxFailuresTotal() != 0) { - setMaxFailuresTotal(other.getMaxFailuresTotal()); - } - 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.dataproc.v1.JobScheduling parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.JobScheduling) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int maxFailuresPerHour_; - /** - * - * - *
-     * Optional. Maximum number of times per hour a driver may be restarted as
-     * a result of driver exiting with non-zero code before job is
-     * reported failed.
-     * A job may be reported as thrashing if driver exits with non-zero code
-     * 4 times within 10 minute window.
-     * Maximum value is 10.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - @java.lang.Override - public int getMaxFailuresPerHour() { - return maxFailuresPerHour_; - } - /** - * - * - *
-     * Optional. Maximum number of times per hour a driver may be restarted as
-     * a result of driver exiting with non-zero code before job is
-     * reported failed.
-     * A job may be reported as thrashing if driver exits with non-zero code
-     * 4 times within 10 minute window.
-     * Maximum value is 10.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxFailuresPerHour to set. - * @return This builder for chaining. - */ - public Builder setMaxFailuresPerHour(int value) { - - maxFailuresPerHour_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Maximum number of times per hour a driver may be restarted as
-     * a result of driver exiting with non-zero code before job is
-     * reported failed.
-     * A job may be reported as thrashing if driver exits with non-zero code
-     * 4 times within 10 minute window.
-     * Maximum value is 10.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxFailuresPerHour() { - - maxFailuresPerHour_ = 0; - onChanged(); - return this; - } - - private int maxFailuresTotal_; - /** - * - * - *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
-     * Maximum value is 240.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresTotal. - */ - @java.lang.Override - public int getMaxFailuresTotal() { - return maxFailuresTotal_; - } - /** - * - * - *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
-     * Maximum value is 240.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxFailuresTotal to set. - * @return This builder for chaining. - */ - public Builder setMaxFailuresTotal(int value) { - - maxFailuresTotal_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Maximum number of times in total a driver may be restarted as a result of
-     * driver exiting with non-zero code before job is reported failed.
-     * Maximum value is 240.
-     * **Note:** Currently, this restartable job option is
-     * not supported in Dataproc
-     * [workflow
-     * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-     * jobs.
-     * 
- * - * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxFailuresTotal() { - - maxFailuresTotal_ = 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.dataproc.v1.JobScheduling) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobScheduling) - private static final com.google.cloud.dataproc.v1.JobScheduling DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobScheduling(); - } - - public static com.google.cloud.dataproc.v1.JobScheduling getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobScheduling parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobScheduling(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.dataproc.v1.JobScheduling getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java deleted file mode 100644 index a65b1cfc..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobSchedulingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.JobScheduling) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Maximum number of times per hour a driver may be restarted as
-   * a result of driver exiting with non-zero code before job is
-   * reported failed.
-   * A job may be reported as thrashing if driver exits with non-zero code
-   * 4 times within 10 minute window.
-   * Maximum value is 10.
-   * **Note:** Currently, this restartable job option is
-   * not supported in Dataproc
-   * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - int getMaxFailuresPerHour(); - - /** - * - * - *
-   * Optional. Maximum number of times in total a driver may be restarted as a result of
-   * driver exiting with non-zero code before job is reported failed.
-   * Maximum value is 240.
-   * **Note:** Currently, this restartable job option is
-   * not supported in Dataproc
-   * [workflow
-   * template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template)
-   * jobs.
-   * 
- * - * int32 max_failures_total = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresTotal. - */ - int getMaxFailuresTotal(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatus.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatus.java deleted file mode 100644 index 63b2e415..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatus.java +++ /dev/null @@ -1,1801 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Dataproc job status.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobStatus} - */ -public final class JobStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.JobStatus) - JobStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobStatus.newBuilder() to construct. - private JobStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private JobStatus() { - state_ = 0; - details_ = ""; - substate_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new JobStatus(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private JobStatus( - 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(); - - state_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - details_ = s; - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (stateStartTime_ != null) { - subBuilder = stateStartTime_.toBuilder(); - } - stateStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateStartTime_); - stateStartTime_ = subBuilder.buildPartial(); - } - - break; - } - case 56: - { - int rawValue = input.readEnum(); - - substate_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobStatus.class, - com.google.cloud.dataproc.v1.JobStatus.Builder.class); - } - - /** - * - * - *
-   * The job state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.JobStatus.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The job state is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The job is pending; it has been submitted, but is not yet running.
-     * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - * - * - *
-     * Job has been received by the service and completed initial setup;
-     * it will soon be submitted to the cluster.
-     * 
- * - * SETUP_DONE = 8; - */ - SETUP_DONE(8), - /** - * - * - *
-     * The job is running on the cluster.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * A CancelJob request has been received, but is pending.
-     * 
- * - * CANCEL_PENDING = 3; - */ - CANCEL_PENDING(3), - /** - * - * - *
-     * Transient in-flight resources have been canceled, and the request to
-     * cancel the running job has been issued to the cluster.
-     * 
- * - * CANCEL_STARTED = 7; - */ - CANCEL_STARTED(7), - /** - * - * - *
-     * The job cancellation was successful.
-     * 
- * - * CANCELLED = 4; - */ - CANCELLED(4), - /** - * - * - *
-     * The job has completed successfully.
-     * 
- * - * DONE = 5; - */ - DONE(5), - /** - * - * - *
-     * The job has completed, but encountered an error.
-     * 
- * - * ERROR = 6; - */ - ERROR(6), - /** - * - * - *
-     * Job attempt has failed. The detail field contains failure details for
-     * this attempt.
-     * Applies to restartable jobs only.
-     * 
- * - * ATTEMPT_FAILURE = 9; - */ - ATTEMPT_FAILURE(9), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The job state is unknown.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The job is pending; it has been submitted, but is not yet running.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - * - * - *
-     * Job has been received by the service and completed initial setup;
-     * it will soon be submitted to the cluster.
-     * 
- * - * SETUP_DONE = 8; - */ - public static final int SETUP_DONE_VALUE = 8; - /** - * - * - *
-     * The job is running on the cluster.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * A CancelJob request has been received, but is pending.
-     * 
- * - * CANCEL_PENDING = 3; - */ - public static final int CANCEL_PENDING_VALUE = 3; - /** - * - * - *
-     * Transient in-flight resources have been canceled, and the request to
-     * cancel the running job has been issued to the cluster.
-     * 
- * - * CANCEL_STARTED = 7; - */ - public static final int CANCEL_STARTED_VALUE = 7; - /** - * - * - *
-     * The job cancellation was successful.
-     * 
- * - * CANCELLED = 4; - */ - public static final int CANCELLED_VALUE = 4; - /** - * - * - *
-     * The job has completed successfully.
-     * 
- * - * DONE = 5; - */ - public static final int DONE_VALUE = 5; - /** - * - * - *
-     * The job has completed, but encountered an error.
-     * 
- * - * ERROR = 6; - */ - public static final int ERROR_VALUE = 6; - /** - * - * - *
-     * Job attempt has failed. The detail field contains failure details for
-     * this attempt.
-     * Applies to restartable jobs only.
-     * 
- * - * ATTEMPT_FAILURE = 9; - */ - public static final int ATTEMPT_FAILURE_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 PENDING; - case 8: - return SETUP_DONE; - case 2: - return RUNNING; - case 3: - return CANCEL_PENDING; - case 7: - return CANCEL_STARTED; - case 4: - return CANCELLED; - case 5: - return DONE; - case 6: - return ERROR; - case 9: - return ATTEMPT_FAILURE; - 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.dataproc.v1.JobStatus.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.JobStatus.State) - } - - /** - * - * - *
-   * The job substate.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.JobStatus.Substate} - */ - public enum Substate implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * The job substate is unknown.
-     * 
- * - * UNSPECIFIED = 0; - */ - UNSPECIFIED(0), - /** - * - * - *
-     * The Job is submitted to the agent.
-     * Applies to RUNNING state.
-     * 
- * - * SUBMITTED = 1; - */ - SUBMITTED(1), - /** - * - * - *
-     * The Job has been received and is awaiting execution (it may be waiting
-     * for a condition to be met). See the "details" field for the reason for
-     * the delay.
-     * Applies to RUNNING state.
-     * 
- * - * QUEUED = 2; - */ - QUEUED(2), - /** - * - * - *
-     * The agent-reported status is out of date, which may be caused by a
-     * loss of communication between the agent and Dataproc. If the
-     * agent does not send a timely update, the job will fail.
-     * Applies to RUNNING state.
-     * 
- * - * STALE_STATUS = 3; - */ - STALE_STATUS(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * The job substate is unknown.
-     * 
- * - * UNSPECIFIED = 0; - */ - public static final int UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The Job is submitted to the agent.
-     * Applies to RUNNING state.
-     * 
- * - * SUBMITTED = 1; - */ - public static final int SUBMITTED_VALUE = 1; - /** - * - * - *
-     * The Job has been received and is awaiting execution (it may be waiting
-     * for a condition to be met). See the "details" field for the reason for
-     * the delay.
-     * Applies to RUNNING state.
-     * 
- * - * QUEUED = 2; - */ - public static final int QUEUED_VALUE = 2; - /** - * - * - *
-     * The agent-reported status is out of date, which may be caused by a
-     * loss of communication between the agent and Dataproc. If the
-     * agent does not send a timely update, the job will fail.
-     * Applies to RUNNING state.
-     * 
- * - * STALE_STATUS = 3; - */ - public static final int STALE_STATUS_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 Substate 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 Substate forNumber(int value) { - switch (value) { - case 0: - return UNSPECIFIED; - case 1: - return SUBMITTED; - case 2: - return QUEUED; - case 3: - return STALE_STATUS; - 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 Substate findValueByNumber(int number) { - return Substate.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.dataproc.v1.JobStatus.getDescriptor().getEnumTypes().get(1); - } - - private static final Substate[] VALUES = values(); - - public static Substate 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 Substate(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.JobStatus.Substate) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-   * Output only. A state message specifying the overall job state.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. A state message specifying the overall job state.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.JobStatus.State result = - com.google.cloud.dataproc.v1.JobStatus.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.JobStatus.State.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 2; - private volatile java.lang.Object details_; - /** - * - * - *
-   * Optional. Output only. Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Output only. Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_START_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp stateStartTime_; - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - @java.lang.Override - public boolean hasStateStartTime() { - return stateStartTime_ != null; - } - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStateStartTime() { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - return getStateStartTime(); - } - - public static final int SUBSTATE_FIELD_NUMBER = 7; - private int substate_; - /** - * - * - *
-   * Output only. Additional state information, which includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - @java.lang.Override - public int getSubstateValue() { - return substate_; - } - /** - * - * - *
-   * Output only. Additional state information, which includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.JobStatus.Substate result = - com.google.cloud.dataproc.v1.JobStatus.Substate.valueOf(substate_); - return result == null ? com.google.cloud.dataproc.v1.JobStatus.Substate.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 (state_ != com.google.cloud.dataproc.v1.JobStatus.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); - } - if (stateStartTime_ != null) { - output.writeMessage(6, getStateStartTime()); - } - if (substate_ != com.google.cloud.dataproc.v1.JobStatus.Substate.UNSPECIFIED.getNumber()) { - output.writeEnum(7, substate_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (state_ != com.google.cloud.dataproc.v1.JobStatus.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, details_); - } - if (stateStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStateStartTime()); - } - if (substate_ != com.google.cloud.dataproc.v1.JobStatus.Substate.UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, substate_); - } - 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.dataproc.v1.JobStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.JobStatus other = (com.google.cloud.dataproc.v1.JobStatus) obj; - - if (state_ != other.state_) return false; - if (!getDetails().equals(other.getDetails())) return false; - if (hasStateStartTime() != other.hasStateStartTime()) return false; - if (hasStateStartTime()) { - if (!getStateStartTime().equals(other.getStateStartTime())) return false; - } - if (substate_ != other.substate_) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - if (hasStateStartTime()) { - hash = (37 * hash) + STATE_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStateStartTime().hashCode(); - } - hash = (37 * hash) + SUBSTATE_FIELD_NUMBER; - hash = (53 * hash) + substate_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.JobStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobStatus 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.dataproc.v1.JobStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobStatus parseFrom( - 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.dataproc.v1.JobStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.JobStatus parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.JobStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobStatus 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.dataproc.v1.JobStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobStatus 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.dataproc.v1.JobStatus parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.JobStatus 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.dataproc.v1.JobStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Dataproc job status.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.JobStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.JobStatus) - com.google.cloud.dataproc.v1.JobStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.JobStatus.class, - com.google.cloud.dataproc.v1.JobStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.JobStatus.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(); - state_ = 0; - - details_ = ""; - - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - substate_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_JobStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus build() { - com.google.cloud.dataproc.v1.JobStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus buildPartial() { - com.google.cloud.dataproc.v1.JobStatus result = - new com.google.cloud.dataproc.v1.JobStatus(this); - result.state_ = state_; - result.details_ = details_; - if (stateStartTimeBuilder_ == null) { - result.stateStartTime_ = stateStartTime_; - } else { - result.stateStartTime_ = stateStartTimeBuilder_.build(); - } - result.substate_ = substate_; - 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.dataproc.v1.JobStatus) { - return mergeFrom((com.google.cloud.dataproc.v1.JobStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.JobStatus other) { - if (other == com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance()) return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - onChanged(); - } - if (other.hasStateStartTime()) { - mergeStateStartTime(other.getStateStartTime()); - } - if (other.substate_ != 0) { - setSubstateValue(other.getSubstateValue()); - } - 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.dataproc.v1.JobStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.JobStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.JobStatus.State result = - com.google.cloud.dataproc.v1.JobStatus.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1.JobStatus.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.JobStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - * - * - *
-     * Optional. Output only. Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Output only. Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for details. - */ - public com.google.protobuf.ByteString getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Output only. Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - details_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Output only. Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - - details_ = getDefaultInstance().getDetails(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Output only. Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - details_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp stateStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - stateStartTimeBuilder_; - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - public boolean hasStateStartTime() { - return stateStartTimeBuilder_ != null || stateStartTime_ != null; - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - public com.google.protobuf.Timestamp getStateStartTime() { - if (stateStartTimeBuilder_ == null) { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } else { - return stateStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stateStartTime_ = value; - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStateStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = builderForValue.build(); - onChanged(); - } else { - stateStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStateStartTime(com.google.protobuf.Timestamp value) { - if (stateStartTimeBuilder_ == null) { - if (stateStartTime_ != null) { - stateStartTime_ = - com.google.protobuf.Timestamp.newBuilder(stateStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - stateStartTime_ = value; - } - onChanged(); - } else { - stateStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStateStartTime() { - if (stateStartTimeBuilder_ == null) { - stateStartTime_ = null; - onChanged(); - } else { - stateStartTime_ = null; - stateStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStateStartTimeBuilder() { - - onChanged(); - return getStateStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder() { - if (stateStartTimeBuilder_ != null) { - return stateStartTimeBuilder_.getMessageOrBuilder(); - } else { - return stateStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : stateStartTime_; - } - } - /** - * - * - *
-     * Output only. The time when this state was entered.
-     * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStateStartTimeFieldBuilder() { - if (stateStartTimeBuilder_ == null) { - stateStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStateStartTime(), getParentForChildren(), isClean()); - stateStartTime_ = null; - } - return stateStartTimeBuilder_; - } - - private int substate_ = 0; - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - @java.lang.Override - public int getSubstateValue() { - return substate_; - } - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for substate to set. - * @return This builder for chaining. - */ - public Builder setSubstateValue(int value) { - - substate_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.JobStatus.Substate result = - com.google.cloud.dataproc.v1.JobStatus.Substate.valueOf(substate_); - return result == null ? com.google.cloud.dataproc.v1.JobStatus.Substate.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The substate to set. - * @return This builder for chaining. - */ - public Builder setSubstate(com.google.cloud.dataproc.v1.JobStatus.Substate value) { - if (value == null) { - throw new NullPointerException(); - } - - substate_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearSubstate() { - - substate_ = 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.dataproc.v1.JobStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.JobStatus) - private static final com.google.cloud.dataproc.v1.JobStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.JobStatus(); - } - - public static com.google.cloud.dataproc.v1.JobStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobStatus(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.dataproc.v1.JobStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatusOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatusOrBuilder.java deleted file mode 100644 index 512fa440..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatusOrBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface JobStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.JobStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A state message specifying the overall job state.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. A state message specifying the overall job state.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.JobStatus.State getState(); - - /** - * - * - *
-   * Optional. Output only. Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Optional. Output only. Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for details. - */ - com.google.protobuf.ByteString getDetailsBytes(); - - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the stateStartTime field is set. - */ - boolean hasStateStartTime(); - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The stateStartTime. - */ - com.google.protobuf.Timestamp getStateStartTime(); - /** - * - * - *
-   * Output only. The time when this state was entered.
-   * 
- * - * - * .google.protobuf.Timestamp state_start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Additional state information, which includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for substate. - */ - int getSubstateValue(); - /** - * - * - *
-   * Output only. Additional state information, which includes
-   * status reported by the agent.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - com.google.cloud.dataproc.v1.JobStatus.Substate getSubstate(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java deleted file mode 100644 index 6ce22a02..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java +++ /dev/null @@ -1,825 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public final class JobsProto { - private JobsProto() {} - - 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_dataproc_v1_LoggingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_LoggingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PySparkJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_QueryList_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_QueryList_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_HiveJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkSqlJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PigJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PigJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PrestoJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobPlacement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobReference_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobReference_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_YarnApplication_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Job_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Job_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SubmitJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_JobMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GetJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListJobsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_UpdateJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListJobsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_CancelJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DeleteJobRequest_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/dataproc/v1/jobs.proto\022\030g" - + "oogle.cloud.dataproc.v1\032\034google/api/anno" - + "tations.proto\032\027google/api/client.proto\032\037" - + "google/api/field_behavior.proto\032#google/" - + "longrunning/operations.proto\032\033google/pro" - + "tobuf/empty.proto\032 google/protobuf/field" - + "_mask.proto\032\037google/protobuf/timestamp.p" - + "roto\"\301\002\n\rLoggingConfig\022W\n\021driver_log_lev" - + "els\030\002 \003(\0132<.google.cloud.dataproc.v1.Log" - + "gingConfig.DriverLogLevelsEntry\032e\n\024Drive" - + "rLogLevelsEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 " - + "\001(\0162-.google.cloud.dataproc.v1.LoggingCo" - + "nfig.Level:\0028\001\"p\n\005Level\022\025\n\021LEVEL_UNSPECI" - + "FIED\020\000\022\007\n\003ALL\020\001\022\t\n\005TRACE\020\002\022\t\n\005DEBUG\020\003\022\010\n" - + "\004INFO\020\004\022\010\n\004WARN\020\005\022\t\n\005ERROR\020\006\022\t\n\005FATAL\020\007\022" - + "\007\n\003OFF\020\010\"\361\002\n\tHadoopJob\022\033\n\021main_jar_file_" - + "uri\030\001 \001(\tH\000\022\024\n\nmain_class\030\002 \001(\tH\000\022\021\n\004arg" - + "s\030\003 \003(\tB\003\340A\001\022\032\n\rjar_file_uris\030\004 \003(\tB\003\340A\001" - + "\022\026\n\tfile_uris\030\005 \003(\tB\003\340A\001\022\031\n\014archive_uris" - + "\030\006 \003(\tB\003\340A\001\022L\n\nproperties\030\007 \003(\01323.google" - + ".cloud.dataproc.v1.HadoopJob.PropertiesE" - + "ntryB\003\340A\001\022D\n\016logging_config\030\010 \001(\0132\'.goog" - + "le.cloud.dataproc.v1.LoggingConfigB\003\340A\001\032" - + "1\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001B\010\n\006driver\"\357\002\n\010SparkJob\022\033\n\021mai" - + "n_jar_file_uri\030\001 \001(\tH\000\022\024\n\nmain_class\030\002 \001" - + "(\tH\000\022\021\n\004args\030\003 \003(\tB\003\340A\001\022\032\n\rjar_file_uris" - + "\030\004 \003(\tB\003\340A\001\022\026\n\tfile_uris\030\005 \003(\tB\003\340A\001\022\031\n\014a" - + "rchive_uris\030\006 \003(\tB\003\340A\001\022K\n\nproperties\030\007 \003" - + "(\01322.google.cloud.dataproc.v1.SparkJob.P" - + "ropertiesEntryB\003\340A\001\022D\n\016logging_config\030\010 " - + "\001(\0132\'.google.cloud.dataproc.v1.LoggingCo" - + "nfigB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006driver\"\370\002\n\nPySpa" - + "rkJob\022!\n\024main_python_file_uri\030\001 \001(\tB\003\340A\002" - + "\022\021\n\004args\030\002 \003(\tB\003\340A\001\022\035\n\020python_file_uris\030" - + "\003 \003(\tB\003\340A\001\022\032\n\rjar_file_uris\030\004 \003(\tB\003\340A\001\022\026" - + "\n\tfile_uris\030\005 \003(\tB\003\340A\001\022\031\n\014archive_uris\030\006" - + " \003(\tB\003\340A\001\022M\n\nproperties\030\007 \003(\01324.google.c" - + "loud.dataproc.v1.PySparkJob.PropertiesEn" - + "tryB\003\340A\001\022D\n\016logging_config\030\010 \001(\0132\'.googl" - + "e.cloud.dataproc.v1.LoggingConfigB\003\340A\001\0321" - + "\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001\"!\n\tQueryList\022\024\n\007queries\030\001 \003(\tB" - + "\003\340A\002\"\265\003\n\007HiveJob\022\030\n\016query_file_uri\030\001 \001(\t" - + "H\000\0229\n\nquery_list\030\002 \001(\0132#.google.cloud.da" - + "taproc.v1.QueryListH\000\022 \n\023continue_on_fai" - + "lure\030\003 \001(\010B\003\340A\001\022U\n\020script_variables\030\004 \003(" - + "\01326.google.cloud.dataproc.v1.HiveJob.Scr" - + "iptVariablesEntryB\003\340A\001\022J\n\nproperties\030\005 \003" - + "(\01321.google.cloud.dataproc.v1.HiveJob.Pr" - + "opertiesEntryB\003\340A\001\022\032\n\rjar_file_uris\030\006 \003(" - + "\tB\003\340A\001\0326\n\024ScriptVariablesEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017PropertiesEntr" - + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\t\n\007que" - + "ries\"\345\003\n\013SparkSqlJob\022\030\n\016query_file_uri\030\001" - + " \001(\tH\000\0229\n\nquery_list\030\002 \001(\0132#.google.clou" - + "d.dataproc.v1.QueryListH\000\022Y\n\020script_vari" - + "ables\030\003 \003(\0132:.google.cloud.dataproc.v1.S" - + "parkSqlJob.ScriptVariablesEntryB\003\340A\001\022N\n\n" - + "properties\030\004 \003(\01325.google.cloud.dataproc" - + ".v1.SparkSqlJob.PropertiesEntryB\003\340A\001\022\032\n\r" - + "jar_file_uris\0308 \003(\tB\003\340A\001\022D\n\016logging_conf" - + "ig\030\006 \001(\0132\'.google.cloud.dataproc.v1.Logg" - + "ingConfigB\003\340A\001\0326\n\024ScriptVariablesEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017Proper" - + "tiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001B\t\n\007queries\"\370\003\n\006PigJob\022\030\n\016query_file_ur" - + "i\030\001 \001(\tH\000\0229\n\nquery_list\030\002 \001(\0132#.google.c" - + "loud.dataproc.v1.QueryListH\000\022 \n\023continue" - + "_on_failure\030\003 \001(\010B\003\340A\001\022T\n\020script_variabl" - + "es\030\004 \003(\01325.google.cloud.dataproc.v1.PigJ" - + "ob.ScriptVariablesEntryB\003\340A\001\022I\n\nproperti" - + "es\030\005 \003(\01320.google.cloud.dataproc.v1.PigJ" - + "ob.PropertiesEntryB\003\340A\001\022\032\n\rjar_file_uris" - + "\030\006 \003(\tB\003\340A\001\022D\n\016logging_config\030\007 \001(\0132\'.go" - + "ogle.cloud.dataproc.v1.LoggingConfigB\003\340A" - + "\001\0326\n\024ScriptVariablesEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\0321\n\017PropertiesEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\t\n\007queries\"" - + "\266\002\n\tSparkRJob\022\034\n\017main_r_file_uri\030\001 \001(\tB\003" - + "\340A\002\022\021\n\004args\030\002 \003(\tB\003\340A\001\022\026\n\tfile_uris\030\003 \003(" - + "\tB\003\340A\001\022\031\n\014archive_uris\030\004 \003(\tB\003\340A\001\022L\n\npro" - + "perties\030\005 \003(\01323.google.cloud.dataproc.v1" - + ".SparkRJob.PropertiesEntryB\003\340A\001\022D\n\016loggi" - + "ng_config\030\006 \001(\0132\'.google.cloud.dataproc." - + "v1.LoggingConfigB\003\340A\001\0321\n\017PropertiesEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\212\003\n\tPre" - + "stoJob\022\030\n\016query_file_uri\030\001 \001(\tH\000\0229\n\nquer" - + "y_list\030\002 \001(\0132#.google.cloud.dataproc.v1." - + "QueryListH\000\022 \n\023continue_on_failure\030\003 \001(\010" - + "B\003\340A\001\022\032\n\routput_format\030\004 \001(\tB\003\340A\001\022\030\n\013cli" - + "ent_tags\030\005 \003(\tB\003\340A\001\022L\n\nproperties\030\006 \003(\0132" - + "3.google.cloud.dataproc.v1.PrestoJob.Pro" - + "pertiesEntryB\003\340A\001\022D\n\016logging_config\030\007 \001(" - + "\0132\'.google.cloud.dataproc.v1.LoggingConf" - + "igB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001B\t\n\007queries\"\322\001\n\014JobPla" - + "cement\022\031\n\014cluster_name\030\001 \001(\tB\003\340A\002\022\031\n\014clu" - + "ster_uuid\030\002 \001(\tB\003\340A\003\022V\n\016cluster_labels\030\003" - + " \003(\01329.google.cloud.dataproc.v1.JobPlace" - + "ment.ClusterLabelsEntryB\003\340A\001\0324\n\022ClusterL" - + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\"\331\003\n\tJobStatus\022=\n\005state\030\001 \001(\0162).google" - + ".cloud.dataproc.v1.JobStatus.StateB\003\340A\003\022" - + "\027\n\007details\030\002 \001(\tB\006\340A\003\340A\001\0229\n\020state_start_" - + "time\030\006 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\022C\n\010substate\030\007 \001(\0162,.google.cloud.dat" - + "aproc.v1.JobStatus.SubstateB\003\340A\003\"\251\001\n\005Sta" - + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\016" - + "\n\nSETUP_DONE\020\010\022\013\n\007RUNNING\020\002\022\022\n\016CANCEL_PE" - + "NDING\020\003\022\022\n\016CANCEL_STARTED\020\007\022\r\n\tCANCELLED" - + "\020\004\022\010\n\004DONE\020\005\022\t\n\005ERROR\020\006\022\023\n\017ATTEMPT_FAILU" - + "RE\020\t\"H\n\010Substate\022\017\n\013UNSPECIFIED\020\000\022\r\n\tSUB" - + "MITTED\020\001\022\n\n\006QUEUED\020\002\022\020\n\014STALE_STATUS\020\003\"<" - + "\n\014JobReference\022\027\n\nproject_id\030\001 \001(\tB\003\340A\001\022" - + "\023\n\006job_id\030\002 \001(\tB\003\340A\001\"\245\002\n\017YarnApplication" - + "\022\021\n\004name\030\001 \001(\tB\003\340A\002\022C\n\005state\030\002 \001(\0162/.goo" - + "gle.cloud.dataproc.v1.YarnApplication.St" - + "ateB\003\340A\002\022\025\n\010progress\030\003 \001(\002B\003\340A\002\022\031\n\014track" - + "ing_url\030\004 \001(\tB\003\340A\001\"\207\001\n\005State\022\025\n\021STATE_UN" - + "SPECIFIED\020\000\022\007\n\003NEW\020\001\022\016\n\nNEW_SAVING\020\002\022\r\n\t" - + "SUBMITTED\020\003\022\014\n\010ACCEPTED\020\004\022\013\n\007RUNNING\020\005\022\014" - + "\n\010FINISHED\020\006\022\n\n\006FAILED\020\007\022\n\n\006KILLED\020\010\"\377\010\n" - + "\003Job\022>\n\treference\030\001 \001(\0132&.google.cloud.d" - + "ataproc.v1.JobReferenceB\003\340A\001\022>\n\tplacemen" - + "t\030\002 \001(\0132&.google.cloud.dataproc.v1.JobPl" - + "acementB\003\340A\002\022>\n\nhadoop_job\030\003 \001(\0132#.googl" - + "e.cloud.dataproc.v1.HadoopJobB\003\340A\001H\000\022<\n\t" - + "spark_job\030\004 \001(\0132\".google.cloud.dataproc." - + "v1.SparkJobB\003\340A\001H\000\022@\n\013pyspark_job\030\005 \001(\0132" - + "$.google.cloud.dataproc.v1.PySparkJobB\003\340" - + "A\001H\000\022:\n\010hive_job\030\006 \001(\0132!.google.cloud.da" - + "taproc.v1.HiveJobB\003\340A\001H\000\0228\n\007pig_job\030\007 \001(" - + "\0132 .google.cloud.dataproc.v1.PigJobB\003\340A\001" - + "H\000\022?\n\013spark_r_job\030\025 \001(\0132#.google.cloud.d" - + "ataproc.v1.SparkRJobB\003\340A\001H\000\022C\n\rspark_sql" - + "_job\030\014 \001(\0132%.google.cloud.dataproc.v1.Sp" - + "arkSqlJobB\003\340A\001H\000\022>\n\npresto_job\030\027 \001(\0132#.g" - + "oogle.cloud.dataproc.v1.PrestoJobB\003\340A\001H\000" - + "\0228\n\006status\030\010 \001(\0132#.google.cloud.dataproc" - + ".v1.JobStatusB\003\340A\003\022@\n\016status_history\030\r \003" - + "(\0132#.google.cloud.dataproc.v1.JobStatusB" - + "\003\340A\003\022I\n\021yarn_applications\030\t \003(\0132).google" - + ".cloud.dataproc.v1.YarnApplicationB\003\340A\003\022" - + "\'\n\032driver_output_resource_uri\030\021 \001(\tB\003\340A\003" - + "\022%\n\030driver_control_files_uri\030\017 \001(\tB\003\340A\003\022" - + ">\n\006labels\030\022 \003(\0132).google.cloud.dataproc." - + "v1.Job.LabelsEntryB\003\340A\001\022@\n\nscheduling\030\024 " - + "\001(\0132\'.google.cloud.dataproc.v1.JobSchedu" - + "lingB\003\340A\001\022\025\n\010job_uuid\030\026 \001(\tB\003\340A\003\022\021\n\004done" - + "\030\030 \001(\010B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001B\n\n\010type_job\"T\n\rJobSch" - + "eduling\022\"\n\025max_failures_per_hour\030\001 \001(\005B\003" - + "\340A\001\022\037\n\022max_failures_total\030\002 \001(\005B\003\340A\001\"\212\001\n" - + "\020SubmitJobRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340" - + "A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022/\n\003job\030\002 \001(\0132\035.g" - + "oogle.cloud.dataproc.v1.JobB\003\340A\002\022\027\n\nrequ" - + "est_id\030\004 \001(\tB\003\340A\001\"\256\001\n\013JobMetadata\022\023\n\006job" - + "_id\030\001 \001(\tB\003\340A\003\0228\n\006status\030\002 \001(\0132#.google." - + "cloud.dataproc.v1.JobStatusB\003\340A\003\022\033\n\016oper" - + "ation_type\030\003 \001(\tB\003\340A\003\0223\n\nstart_time\030\004 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003\"R\n\rGe" - + "tJobRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006" - + "region\030\003 \001(\tB\003\340A\002\022\023\n\006job_id\030\002 \001(\tB\003\340A\002\"\263" - + "\002\n\017ListJobsRequest\022\027\n\nproject_id\030\001 \001(\tB\003" - + "\340A\002\022\023\n\006region\030\006 \001(\tB\003\340A\002\022\026\n\tpage_size\030\002 " - + "\001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\031\n\014clu" - + "ster_name\030\004 \001(\tB\003\340A\001\022Y\n\021job_state_matche" - + "r\030\005 \001(\01629.google.cloud.dataproc.v1.ListJ" - + "obsRequest.JobStateMatcherB\003\340A\001\022\023\n\006filte" - + "r\030\007 \001(\tB\003\340A\001\"6\n\017JobStateMatcher\022\007\n\003ALL\020\000" - + "\022\n\n\006ACTIVE\020\001\022\016\n\nNON_ACTIVE\020\002\"\274\001\n\020UpdateJ" - + "obRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006re" - + "gion\030\002 \001(\tB\003\340A\002\022\023\n\006job_id\030\003 \001(\tB\003\340A\002\022/\n\003" - + "job\030\004 \001(\0132\035.google.cloud.dataproc.v1.Job" - + "B\003\340A\002\0224\n\013update_mask\030\005 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\003\340A\002\"b\n\020ListJobsResponse\022" - + "0\n\004jobs\030\001 \003(\0132\035.google.cloud.dataproc.v1" - + ".JobB\003\340A\003\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\001\"" - + "U\n\020CancelJobRequest\022\027\n\nproject_id\030\001 \001(\tB" - + "\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\023\n\006job_id\030\002 \001(" - + "\tB\003\340A\002\"U\n\020DeleteJobRequest\022\027\n\nproject_id" - + "\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\022\023\n\006job_" - + "id\030\002 \001(\tB\003\340A\0022\374\n\n\rJobController\022\261\001\n\tSubm" - + "itJob\022*.google.cloud.dataproc.v1.SubmitJ" - + "obRequest\032\035.google.cloud.dataproc.v1.Job" - + "\"Y\202\323\344\223\002;\"6/v1/projects/{project_id}/regi" - + "ons/{region}/jobs:submit:\001*\332A\025project_id" - + ",region,job\022\336\001\n\024SubmitJobAsOperation\022*.g" - + "oogle.cloud.dataproc.v1.SubmitJobRequest" - + "\032\035.google.longrunning.Operation\"{\202\323\344\223\002F\"" - + "A/v1/projects/{project_id}/regions/{regi" - + "on}/jobs:submitAsOperation:\001*\332A\027project_" - + "id, region, job\312A\022\n\003Job\022\013JobMetadata\022\255\001\n" - + "\006GetJob\022\'.google.cloud.dataproc.v1.GetJo" - + "bRequest\032\035.google.cloud.dataproc.v1.Job\"" - + "[\202\323\344\223\002:\0228/v1/projects/{project_id}/regio" - + "ns/{region}/jobs/{job_id}\332A\030project_id,r" - + "egion,job_id\022\311\001\n\010ListJobs\022).google.cloud" - + ".dataproc.v1.ListJobsRequest\032*.google.cl" - + "oud.dataproc.v1.ListJobsResponse\"f\202\323\344\223\0021" - + "\022//v1/projects/{project_id}/regions/{reg" - + "ion}/jobs\332A\021project_id,region\332A\030project_" - + "id,region,filter\022\235\001\n\tUpdateJob\022*.google." - + "cloud.dataproc.v1.UpdateJobRequest\032\035.goo" - + "gle.cloud.dataproc.v1.Job\"E\202\323\344\223\002?28/v1/p" - + "rojects/{project_id}/regions/{region}/jo" - + "bs/{job_id}:\003job\022\275\001\n\tCancelJob\022*.google." - + "cloud.dataproc.v1.CancelJobRequest\032\035.goo" - + "gle.cloud.dataproc.v1.Job\"e\202\323\344\223\002D\"?/v1/p" - + "rojects/{project_id}/regions/{region}/jo" - + "bs/{job_id}:cancel:\001*\332A\030project_id,regio" - + "n,job_id\022\254\001\n\tDeleteJob\022*.google.cloud.da" - + "taproc.v1.DeleteJobRequest\032\026.google.prot" - + "obuf.Empty\"[\202\323\344\223\002:*8/v1/projects/{projec" - + "t_id}/regions/{region}/jobs/{job_id}\332A\030p" - + "roject_id,region,job_id\032K\312A\027dataproc.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformBm\n\034com.google.cloud" - + ".dataproc.v1B\tJobsProtoP\001Z@google.golang" - + ".org/genproto/googleapis/cloud/dataproc/" - + "v1;dataprocb\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.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_LoggingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor, - new java.lang.String[] { - "DriverLogLevels", - }); - internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor, - new java.lang.String[] { - "MainJarFileUri", - "MainClass", - "Args", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - "Driver", - }); - internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_SparkJob_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_SparkJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkJob_descriptor, - new java.lang.String[] { - "MainJarFileUri", - "MainClass", - "Args", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - "Driver", - }); - internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SparkJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1_PySparkJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor, - new java.lang.String[] { - "MainPythonFileUri", - "Args", - "PythonFileUris", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - }); - internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_QueryList_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1_QueryList_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_QueryList_descriptor, - new java.lang.String[] { - "Queries", - }); - internal_static_google_cloud_dataproc_v1_HiveJob_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1_HiveJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_HiveJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "ScriptVariables", - "Properties", - "JarFileUris", - "Queries", - }); - internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_HiveJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_HiveJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_HiveJob_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_HiveJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ScriptVariables", - "Properties", - "JarFileUris", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_PigJob_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1_PigJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PigJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "ScriptVariables", - "Properties", - "JarFileUris", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_PigJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_PigJob_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor, - new java.lang.String[] { - "MainRFileUri", "Args", "FileUris", "ArchiveUris", "Properties", "LoggingConfig", - }); - internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1_PrestoJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "OutputFormat", - "ClientTags", - "Properties", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1_JobPlacement_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor, - new java.lang.String[] { - "ClusterName", "ClusterUuid", "ClusterLabels", - }); - internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_JobPlacement_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobPlacement_ClusterLabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_JobStatus_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1_JobStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobStatus_descriptor, - new java.lang.String[] { - "State", "Details", "StateStartTime", "Substate", - }); - internal_static_google_cloud_dataproc_v1_JobReference_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1_JobReference_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobReference_descriptor, - new java.lang.String[] { - "ProjectId", "JobId", - }); - internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1_YarnApplication_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor, - new java.lang.String[] { - "Name", "State", "Progress", "TrackingUrl", - }); - internal_static_google_cloud_dataproc_v1_Job_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1_Job_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Job_descriptor, - new java.lang.String[] { - "Reference", - "Placement", - "HadoopJob", - "SparkJob", - "PysparkJob", - "HiveJob", - "PigJob", - "SparkRJob", - "SparkSqlJob", - "PrestoJob", - "Status", - "StatusHistory", - "YarnApplications", - "DriverOutputResourceUri", - "DriverControlFilesUri", - "Labels", - "Scheduling", - "JobUuid", - "Done", - "TypeJob", - }); - internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_Job_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_Job_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1_JobScheduling_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobScheduling_descriptor, - new java.lang.String[] { - "MaxFailuresPerHour", "MaxFailuresTotal", - }); - internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1_SubmitJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Job", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1_JobMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_JobMetadata_descriptor, - new java.lang.String[] { - "JobId", "Status", "OperationType", "StartTime", - }); - internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1_GetJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GetJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", - }); - internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1_ListJobsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor, - new java.lang.String[] { - "ProjectId", - "Region", - "PageSize", - "PageToken", - "ClusterName", - "JobStateMatcher", - "Filter", - }); - internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1_UpdateJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", "Job", "UpdateMask", - }); - internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_dataproc_v1_ListJobsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor, - new java.lang.String[] { - "Jobs", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_dataproc_v1_CancelJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_CancelJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", - }); - internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_dataproc_v1_DeleteJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DeleteJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", - }); - 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.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.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java deleted file mode 100644 index 904932ab..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java +++ /dev/null @@ -1,3141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies Kerberos related configuration.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KerberosConfig} - */ -public final class KerberosConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.KerberosConfig) - KerberosConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KerberosConfig.newBuilder() to construct. - private KerberosConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KerberosConfig() { - rootPrincipalPasswordUri_ = ""; - kmsKeyUri_ = ""; - keystoreUri_ = ""; - truststoreUri_ = ""; - keystorePasswordUri_ = ""; - keyPasswordUri_ = ""; - truststorePasswordUri_ = ""; - crossRealmTrustRealm_ = ""; - crossRealmTrustKdc_ = ""; - crossRealmTrustAdminServer_ = ""; - crossRealmTrustSharedPasswordUri_ = ""; - kdcDbKeyUri_ = ""; - realm_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KerberosConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KerberosConfig( - 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: - { - enableKerberos_ = input.readBool(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - rootPrincipalPasswordUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKeyUri_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - keystoreUri_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - truststoreUri_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - keystorePasswordUri_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - keyPasswordUri_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - truststorePasswordUri_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - crossRealmTrustRealm_ = s; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - crossRealmTrustKdc_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - crossRealmTrustAdminServer_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - crossRealmTrustSharedPasswordUri_ = s; - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - kdcDbKeyUri_ = s; - break; - } - case 112: - { - tgtLifetimeHours_ = input.readInt32(); - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - realm_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KerberosConfig.class, - com.google.cloud.dataproc.v1.KerberosConfig.Builder.class); - } - - public static final int ENABLE_KERBEROS_FIELD_NUMBER = 1; - private boolean enableKerberos_; - /** - * - * - *
-   * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-   * this field to true to enable Kerberos on a cluster.
-   * 
- * - * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableKerberos. - */ - @java.lang.Override - public boolean getEnableKerberos() { - return enableKerberos_; - } - - public static final int ROOT_PRINCIPAL_PASSWORD_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object rootPrincipalPasswordUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The rootPrincipalPasswordUri. - */ - @java.lang.Override - public java.lang.String getRootPrincipalPasswordUri() { - java.lang.Object ref = rootPrincipalPasswordUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rootPrincipalPasswordUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for rootPrincipalPasswordUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRootPrincipalPasswordUriBytes() { - java.lang.Object ref = rootPrincipalPasswordUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - rootPrincipalPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KMS_KEY_URI_FIELD_NUMBER = 3; - private volatile java.lang.Object kmsKeyUri_; - /** - * - * - *
-   * Optional. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKeyUri. - */ - @java.lang.Override - public java.lang.String getKmsKeyUri() { - java.lang.Object ref = kmsKeyUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKeyUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKeyUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKmsKeyUriBytes() { - java.lang.Object ref = kmsKeyUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEYSTORE_URI_FIELD_NUMBER = 4; - private volatile java.lang.Object keystoreUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of the keystore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystoreUri. - */ - @java.lang.Override - public java.lang.String getKeystoreUri() { - java.lang.Object ref = keystoreUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keystoreUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of the keystore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystoreUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeystoreUriBytes() { - java.lang.Object ref = keystoreUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keystoreUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRUSTSTORE_URI_FIELD_NUMBER = 5; - private volatile java.lang.Object truststoreUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of the truststore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststoreUri. - */ - @java.lang.Override - public java.lang.String getTruststoreUri() { - java.lang.Object ref = truststoreUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - truststoreUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of the truststore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststoreUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTruststoreUriBytes() { - java.lang.Object ref = truststoreUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - truststoreUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEYSTORE_PASSWORD_URI_FIELD_NUMBER = 6; - private volatile java.lang.Object keystorePasswordUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided keystore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystorePasswordUri. - */ - @java.lang.Override - public java.lang.String getKeystorePasswordUri() { - java.lang.Object ref = keystorePasswordUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keystorePasswordUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided keystore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystorePasswordUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeystorePasswordUriBytes() { - java.lang.Object ref = keystorePasswordUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keystorePasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEY_PASSWORD_URI_FIELD_NUMBER = 7; - private volatile java.lang.Object keyPasswordUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided key. For the self-signed certificate, this
-   * password is generated by Dataproc.
-   * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keyPasswordUri. - */ - @java.lang.Override - public java.lang.String getKeyPasswordUri() { - java.lang.Object ref = keyPasswordUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyPasswordUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided key. For the self-signed certificate, this
-   * password is generated by Dataproc.
-   * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keyPasswordUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeyPasswordUriBytes() { - java.lang.Object ref = keyPasswordUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRUSTSTORE_PASSWORD_URI_FIELD_NUMBER = 8; - private volatile java.lang.Object truststorePasswordUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided truststore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststorePasswordUri. - */ - @java.lang.Override - public java.lang.String getTruststorePasswordUri() { - java.lang.Object ref = truststorePasswordUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - truststorePasswordUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided truststore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststorePasswordUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTruststorePasswordUriBytes() { - java.lang.Object ref = truststorePasswordUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - truststorePasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROSS_REALM_TRUST_REALM_FIELD_NUMBER = 9; - private volatile java.lang.Object crossRealmTrustRealm_; - /** - * - * - *
-   * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-   * the user enable cross realm trust.
-   * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustRealm. - */ - @java.lang.Override - public java.lang.String getCrossRealmTrustRealm() { - java.lang.Object ref = crossRealmTrustRealm_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustRealm_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-   * the user enable cross realm trust.
-   * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustRealm. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCrossRealmTrustRealmBytes() { - java.lang.Object ref = crossRealmTrustRealm_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustRealm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROSS_REALM_TRUST_KDC_FIELD_NUMBER = 10; - private volatile java.lang.Object crossRealmTrustKdc_; - /** - * - * - *
-   * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-   * realm trust relationship.
-   * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustKdc. - */ - @java.lang.Override - public java.lang.String getCrossRealmTrustKdc() { - java.lang.Object ref = crossRealmTrustKdc_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustKdc_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-   * realm trust relationship.
-   * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustKdc. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCrossRealmTrustKdcBytes() { - java.lang.Object ref = crossRealmTrustKdc_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustKdc_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROSS_REALM_TRUST_ADMIN_SERVER_FIELD_NUMBER = 11; - private volatile java.lang.Object crossRealmTrustAdminServer_; - /** - * - * - *
-   * Optional. The admin server (IP or hostname) for the remote trusted realm in
-   * a cross realm trust relationship.
-   * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustAdminServer. - */ - @java.lang.Override - public java.lang.String getCrossRealmTrustAdminServer() { - java.lang.Object ref = crossRealmTrustAdminServer_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustAdminServer_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The admin server (IP or hostname) for the remote trusted realm in
-   * a cross realm trust relationship.
-   * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustAdminServer. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCrossRealmTrustAdminServerBytes() { - java.lang.Object ref = crossRealmTrustAdminServer_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustAdminServer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CROSS_REALM_TRUST_SHARED_PASSWORD_URI_FIELD_NUMBER = 12; - private volatile java.lang.Object crossRealmTrustSharedPasswordUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * shared password between the on-cluster Kerberos realm and the remote
-   * trusted realm, in a cross realm trust relationship.
-   * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustSharedPasswordUri. - */ - @java.lang.Override - public java.lang.String getCrossRealmTrustSharedPasswordUri() { - java.lang.Object ref = crossRealmTrustSharedPasswordUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustSharedPasswordUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * shared password between the on-cluster Kerberos realm and the remote
-   * trusted realm, in a cross realm trust relationship.
-   * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustSharedPasswordUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCrossRealmTrustSharedPasswordUriBytes() { - java.lang.Object ref = crossRealmTrustSharedPasswordUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustSharedPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KDC_DB_KEY_URI_FIELD_NUMBER = 13; - private volatile java.lang.Object kdcDbKeyUri_; - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * master key of the KDC database.
-   * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kdcDbKeyUri. - */ - @java.lang.Override - public java.lang.String getKdcDbKeyUri() { - java.lang.Object ref = kdcDbKeyUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kdcDbKeyUri_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * master key of the KDC database.
-   * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kdcDbKeyUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKdcDbKeyUriBytes() { - java.lang.Object ref = kdcDbKeyUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kdcDbKeyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TGT_LIFETIME_HOURS_FIELD_NUMBER = 14; - private int tgtLifetimeHours_; - /** - * - * - *
-   * Optional. The lifetime of the ticket granting ticket, in hours.
-   * If not specified, or user specifies 0, then default value 10
-   * will be used.
-   * 
- * - * int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tgtLifetimeHours. - */ - @java.lang.Override - public int getTgtLifetimeHours() { - return tgtLifetimeHours_; - } - - public static final int REALM_FIELD_NUMBER = 15; - private volatile java.lang.Object realm_; - /** - * - * - *
-   * Optional. The name of the on-cluster Kerberos realm.
-   * If not specified, the uppercased domain of hostnames will be the realm.
-   * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The realm. - */ - @java.lang.Override - public java.lang.String getRealm() { - java.lang.Object ref = realm_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - realm_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The name of the on-cluster Kerberos realm.
-   * If not specified, the uppercased domain of hostnames will be the realm.
-   * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for realm. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRealmBytes() { - java.lang.Object ref = realm_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - realm_ = 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 (enableKerberos_ != false) { - output.writeBool(1, enableKerberos_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPrincipalPasswordUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rootPrincipalPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keystoreUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, keystoreUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(truststoreUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, truststoreUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keystorePasswordUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, keystorePasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPasswordUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, keyPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(truststorePasswordUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, truststorePasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustRealm_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, crossRealmTrustRealm_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustKdc_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, crossRealmTrustKdc_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustAdminServer_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, crossRealmTrustAdminServer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustSharedPasswordUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 12, crossRealmTrustSharedPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kdcDbKeyUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - output.writeInt32(14, tgtLifetimeHours_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(realm_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, realm_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableKerberos_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableKerberos_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPrincipalPasswordUri_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rootPrincipalPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kmsKeyUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keystoreUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, keystoreUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(truststoreUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, truststoreUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keystorePasswordUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, keystorePasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyPasswordUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, keyPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(truststorePasswordUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, truststorePasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustRealm_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, crossRealmTrustRealm_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustKdc_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, crossRealmTrustKdc_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustAdminServer_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(11, crossRealmTrustAdminServer_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crossRealmTrustSharedPasswordUri_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 12, crossRealmTrustSharedPasswordUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kdcDbKeyUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, tgtLifetimeHours_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(realm_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, realm_); - } - 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.dataproc.v1.KerberosConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.KerberosConfig other = - (com.google.cloud.dataproc.v1.KerberosConfig) obj; - - if (getEnableKerberos() != other.getEnableKerberos()) return false; - if (!getRootPrincipalPasswordUri().equals(other.getRootPrincipalPasswordUri())) return false; - if (!getKmsKeyUri().equals(other.getKmsKeyUri())) return false; - if (!getKeystoreUri().equals(other.getKeystoreUri())) return false; - if (!getTruststoreUri().equals(other.getTruststoreUri())) return false; - if (!getKeystorePasswordUri().equals(other.getKeystorePasswordUri())) return false; - if (!getKeyPasswordUri().equals(other.getKeyPasswordUri())) return false; - if (!getTruststorePasswordUri().equals(other.getTruststorePasswordUri())) return false; - if (!getCrossRealmTrustRealm().equals(other.getCrossRealmTrustRealm())) return false; - if (!getCrossRealmTrustKdc().equals(other.getCrossRealmTrustKdc())) return false; - if (!getCrossRealmTrustAdminServer().equals(other.getCrossRealmTrustAdminServer())) - return false; - if (!getCrossRealmTrustSharedPasswordUri().equals(other.getCrossRealmTrustSharedPasswordUri())) - return false; - if (!getKdcDbKeyUri().equals(other.getKdcDbKeyUri())) return false; - if (getTgtLifetimeHours() != other.getTgtLifetimeHours()) return false; - if (!getRealm().equals(other.getRealm())) 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) + ENABLE_KERBEROS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableKerberos()); - hash = (37 * hash) + ROOT_PRINCIPAL_PASSWORD_URI_FIELD_NUMBER; - hash = (53 * hash) + getRootPrincipalPasswordUri().hashCode(); - hash = (37 * hash) + KMS_KEY_URI_FIELD_NUMBER; - hash = (53 * hash) + getKmsKeyUri().hashCode(); - hash = (37 * hash) + KEYSTORE_URI_FIELD_NUMBER; - hash = (53 * hash) + getKeystoreUri().hashCode(); - hash = (37 * hash) + TRUSTSTORE_URI_FIELD_NUMBER; - hash = (53 * hash) + getTruststoreUri().hashCode(); - hash = (37 * hash) + KEYSTORE_PASSWORD_URI_FIELD_NUMBER; - hash = (53 * hash) + getKeystorePasswordUri().hashCode(); - hash = (37 * hash) + KEY_PASSWORD_URI_FIELD_NUMBER; - hash = (53 * hash) + getKeyPasswordUri().hashCode(); - hash = (37 * hash) + TRUSTSTORE_PASSWORD_URI_FIELD_NUMBER; - hash = (53 * hash) + getTruststorePasswordUri().hashCode(); - hash = (37 * hash) + CROSS_REALM_TRUST_REALM_FIELD_NUMBER; - hash = (53 * hash) + getCrossRealmTrustRealm().hashCode(); - hash = (37 * hash) + CROSS_REALM_TRUST_KDC_FIELD_NUMBER; - hash = (53 * hash) + getCrossRealmTrustKdc().hashCode(); - hash = (37 * hash) + CROSS_REALM_TRUST_ADMIN_SERVER_FIELD_NUMBER; - hash = (53 * hash) + getCrossRealmTrustAdminServer().hashCode(); - hash = (37 * hash) + CROSS_REALM_TRUST_SHARED_PASSWORD_URI_FIELD_NUMBER; - hash = (53 * hash) + getCrossRealmTrustSharedPasswordUri().hashCode(); - hash = (37 * hash) + KDC_DB_KEY_URI_FIELD_NUMBER; - hash = (53 * hash) + getKdcDbKeyUri().hashCode(); - hash = (37 * hash) + TGT_LIFETIME_HOURS_FIELD_NUMBER; - hash = (53 * hash) + getTgtLifetimeHours(); - hash = (37 * hash) + REALM_FIELD_NUMBER; - hash = (53 * hash) + getRealm().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.KerberosConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig 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.dataproc.v1.KerberosConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig parseFrom( - 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.dataproc.v1.KerberosConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig 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.dataproc.v1.KerberosConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig 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.dataproc.v1.KerberosConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig 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.dataproc.v1.KerberosConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies Kerberos related configuration.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KerberosConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.KerberosConfig) - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KerberosConfig.class, - com.google.cloud.dataproc.v1.KerberosConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.KerberosConfig.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(); - enableKerberos_ = false; - - rootPrincipalPasswordUri_ = ""; - - kmsKeyUri_ = ""; - - keystoreUri_ = ""; - - truststoreUri_ = ""; - - keystorePasswordUri_ = ""; - - keyPasswordUri_ = ""; - - truststorePasswordUri_ = ""; - - crossRealmTrustRealm_ = ""; - - crossRealmTrustKdc_ = ""; - - crossRealmTrustAdminServer_ = ""; - - crossRealmTrustSharedPasswordUri_ = ""; - - kdcDbKeyUri_ = ""; - - tgtLifetimeHours_ = 0; - - realm_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.KerberosConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfig build() { - com.google.cloud.dataproc.v1.KerberosConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfig buildPartial() { - com.google.cloud.dataproc.v1.KerberosConfig result = - new com.google.cloud.dataproc.v1.KerberosConfig(this); - result.enableKerberos_ = enableKerberos_; - result.rootPrincipalPasswordUri_ = rootPrincipalPasswordUri_; - result.kmsKeyUri_ = kmsKeyUri_; - result.keystoreUri_ = keystoreUri_; - result.truststoreUri_ = truststoreUri_; - result.keystorePasswordUri_ = keystorePasswordUri_; - result.keyPasswordUri_ = keyPasswordUri_; - result.truststorePasswordUri_ = truststorePasswordUri_; - result.crossRealmTrustRealm_ = crossRealmTrustRealm_; - result.crossRealmTrustKdc_ = crossRealmTrustKdc_; - result.crossRealmTrustAdminServer_ = crossRealmTrustAdminServer_; - result.crossRealmTrustSharedPasswordUri_ = crossRealmTrustSharedPasswordUri_; - result.kdcDbKeyUri_ = kdcDbKeyUri_; - result.tgtLifetimeHours_ = tgtLifetimeHours_; - result.realm_ = realm_; - 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.dataproc.v1.KerberosConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.KerberosConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.KerberosConfig other) { - if (other == com.google.cloud.dataproc.v1.KerberosConfig.getDefaultInstance()) return this; - if (other.getEnableKerberos() != false) { - setEnableKerberos(other.getEnableKerberos()); - } - if (!other.getRootPrincipalPasswordUri().isEmpty()) { - rootPrincipalPasswordUri_ = other.rootPrincipalPasswordUri_; - onChanged(); - } - if (!other.getKmsKeyUri().isEmpty()) { - kmsKeyUri_ = other.kmsKeyUri_; - onChanged(); - } - if (!other.getKeystoreUri().isEmpty()) { - keystoreUri_ = other.keystoreUri_; - onChanged(); - } - if (!other.getTruststoreUri().isEmpty()) { - truststoreUri_ = other.truststoreUri_; - onChanged(); - } - if (!other.getKeystorePasswordUri().isEmpty()) { - keystorePasswordUri_ = other.keystorePasswordUri_; - onChanged(); - } - if (!other.getKeyPasswordUri().isEmpty()) { - keyPasswordUri_ = other.keyPasswordUri_; - onChanged(); - } - if (!other.getTruststorePasswordUri().isEmpty()) { - truststorePasswordUri_ = other.truststorePasswordUri_; - onChanged(); - } - if (!other.getCrossRealmTrustRealm().isEmpty()) { - crossRealmTrustRealm_ = other.crossRealmTrustRealm_; - onChanged(); - } - if (!other.getCrossRealmTrustKdc().isEmpty()) { - crossRealmTrustKdc_ = other.crossRealmTrustKdc_; - onChanged(); - } - if (!other.getCrossRealmTrustAdminServer().isEmpty()) { - crossRealmTrustAdminServer_ = other.crossRealmTrustAdminServer_; - onChanged(); - } - if (!other.getCrossRealmTrustSharedPasswordUri().isEmpty()) { - crossRealmTrustSharedPasswordUri_ = other.crossRealmTrustSharedPasswordUri_; - onChanged(); - } - if (!other.getKdcDbKeyUri().isEmpty()) { - kdcDbKeyUri_ = other.kdcDbKeyUri_; - onChanged(); - } - if (other.getTgtLifetimeHours() != 0) { - setTgtLifetimeHours(other.getTgtLifetimeHours()); - } - if (!other.getRealm().isEmpty()) { - realm_ = other.realm_; - 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.dataproc.v1.KerberosConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.KerberosConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enableKerberos_; - /** - * - * - *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
-     * 
- * - * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableKerberos. - */ - @java.lang.Override - public boolean getEnableKerberos() { - return enableKerberos_; - } - /** - * - * - *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
-     * 
- * - * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableKerberos to set. - * @return This builder for chaining. - */ - public Builder setEnableKerberos(boolean value) { - - enableKerberos_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-     * this field to true to enable Kerberos on a cluster.
-     * 
- * - * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableKerberos() { - - enableKerberos_ = false; - onChanged(); - return this; - } - - private java.lang.Object rootPrincipalPasswordUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The rootPrincipalPasswordUri. - */ - public java.lang.String getRootPrincipalPasswordUri() { - java.lang.Object ref = rootPrincipalPasswordUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rootPrincipalPasswordUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for rootPrincipalPasswordUri. - */ - public com.google.protobuf.ByteString getRootPrincipalPasswordUriBytes() { - java.lang.Object ref = rootPrincipalPasswordUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - rootPrincipalPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The rootPrincipalPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setRootPrincipalPasswordUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - rootPrincipalPasswordUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRootPrincipalPasswordUri() { - - rootPrincipalPasswordUri_ = getDefaultInstance().getRootPrincipalPasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for rootPrincipalPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setRootPrincipalPasswordUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - rootPrincipalPasswordUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object kmsKeyUri_ = ""; - /** - * - * - *
-     * Optional. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKeyUri. - */ - public java.lang.String getKmsKeyUri() { - java.lang.Object ref = kmsKeyUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKeyUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKeyUri. - */ - public com.google.protobuf.ByteString getKmsKeyUriBytes() { - java.lang.Object ref = kmsKeyUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kmsKeyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The kmsKeyUri to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kmsKeyUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKmsKeyUri() { - - kmsKeyUri_ = getDefaultInstance().getKmsKeyUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for kmsKeyUri to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kmsKeyUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object keystoreUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of the keystore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystoreUri. - */ - public java.lang.String getKeystoreUri() { - java.lang.Object ref = keystoreUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keystoreUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the keystore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystoreUri. - */ - public com.google.protobuf.ByteString getKeystoreUriBytes() { - java.lang.Object ref = keystoreUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keystoreUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the keystore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The keystoreUri to set. - * @return This builder for chaining. - */ - public Builder setKeystoreUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - keystoreUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the keystore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKeystoreUri() { - - keystoreUri_ = getDefaultInstance().getKeystoreUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the keystore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for keystoreUri to set. - * @return This builder for chaining. - */ - public Builder setKeystoreUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - keystoreUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object truststoreUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of the truststore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststoreUri. - */ - public java.lang.String getTruststoreUri() { - java.lang.Object ref = truststoreUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - truststoreUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the truststore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststoreUri. - */ - public com.google.protobuf.ByteString getTruststoreUriBytes() { - java.lang.Object ref = truststoreUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - truststoreUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the truststore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The truststoreUri to set. - * @return This builder for chaining. - */ - public Builder setTruststoreUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - truststoreUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the truststore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTruststoreUri() { - - truststoreUri_ = getDefaultInstance().getTruststoreUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of the truststore file used for SSL
-     * encryption. If not provided, Dataproc will provide a self-signed
-     * certificate.
-     * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for truststoreUri to set. - * @return This builder for chaining. - */ - public Builder setTruststoreUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - truststoreUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object keystorePasswordUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided keystore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystorePasswordUri. - */ - public java.lang.String getKeystorePasswordUri() { - java.lang.Object ref = keystorePasswordUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keystorePasswordUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided keystore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystorePasswordUri. - */ - public com.google.protobuf.ByteString getKeystorePasswordUriBytes() { - java.lang.Object ref = keystorePasswordUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keystorePasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided keystore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The keystorePasswordUri to set. - * @return This builder for chaining. - */ - public Builder setKeystorePasswordUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - keystorePasswordUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided keystore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKeystorePasswordUri() { - - keystorePasswordUri_ = getDefaultInstance().getKeystorePasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided keystore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for keystorePasswordUri to set. - * @return This builder for chaining. - */ - public Builder setKeystorePasswordUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - keystorePasswordUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object keyPasswordUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided key. For the self-signed certificate, this
-     * password is generated by Dataproc.
-     * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keyPasswordUri. - */ - public java.lang.String getKeyPasswordUri() { - java.lang.Object ref = keyPasswordUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keyPasswordUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided key. For the self-signed certificate, this
-     * password is generated by Dataproc.
-     * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keyPasswordUri. - */ - public com.google.protobuf.ByteString getKeyPasswordUriBytes() { - java.lang.Object ref = keyPasswordUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keyPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided key. For the self-signed certificate, this
-     * password is generated by Dataproc.
-     * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The keyPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setKeyPasswordUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - keyPasswordUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided key. For the self-signed certificate, this
-     * password is generated by Dataproc.
-     * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKeyPasswordUri() { - - keyPasswordUri_ = getDefaultInstance().getKeyPasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided key. For the self-signed certificate, this
-     * password is generated by Dataproc.
-     * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for keyPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setKeyPasswordUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - keyPasswordUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object truststorePasswordUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided truststore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststorePasswordUri. - */ - public java.lang.String getTruststorePasswordUri() { - java.lang.Object ref = truststorePasswordUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - truststorePasswordUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided truststore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststorePasswordUri. - */ - public com.google.protobuf.ByteString getTruststorePasswordUriBytes() { - java.lang.Object ref = truststorePasswordUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - truststorePasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided truststore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The truststorePasswordUri to set. - * @return This builder for chaining. - */ - public Builder setTruststorePasswordUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - truststorePasswordUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided truststore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTruststorePasswordUri() { - - truststorePasswordUri_ = getDefaultInstance().getTruststorePasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * password to the user provided truststore. For the self-signed certificate,
-     * this password is generated by Dataproc.
-     * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for truststorePasswordUri to set. - * @return This builder for chaining. - */ - public Builder setTruststorePasswordUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - truststorePasswordUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object crossRealmTrustRealm_ = ""; - /** - * - * - *
-     * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-     * the user enable cross realm trust.
-     * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustRealm. - */ - public java.lang.String getCrossRealmTrustRealm() { - java.lang.Object ref = crossRealmTrustRealm_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustRealm_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-     * the user enable cross realm trust.
-     * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustRealm. - */ - public com.google.protobuf.ByteString getCrossRealmTrustRealmBytes() { - java.lang.Object ref = crossRealmTrustRealm_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustRealm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-     * the user enable cross realm trust.
-     * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The crossRealmTrustRealm to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustRealm(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - crossRealmTrustRealm_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-     * the user enable cross realm trust.
-     * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearCrossRealmTrustRealm() { - - crossRealmTrustRealm_ = getDefaultInstance().getCrossRealmTrustRealm(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-     * the user enable cross realm trust.
-     * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for crossRealmTrustRealm to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustRealmBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - crossRealmTrustRealm_ = value; - onChanged(); - return this; - } - - private java.lang.Object crossRealmTrustKdc_ = ""; - /** - * - * - *
-     * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-     * realm trust relationship.
-     * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustKdc. - */ - public java.lang.String getCrossRealmTrustKdc() { - java.lang.Object ref = crossRealmTrustKdc_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustKdc_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-     * realm trust relationship.
-     * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustKdc. - */ - public com.google.protobuf.ByteString getCrossRealmTrustKdcBytes() { - java.lang.Object ref = crossRealmTrustKdc_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustKdc_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-     * realm trust relationship.
-     * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The crossRealmTrustKdc to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustKdc(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - crossRealmTrustKdc_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-     * realm trust relationship.
-     * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearCrossRealmTrustKdc() { - - crossRealmTrustKdc_ = getDefaultInstance().getCrossRealmTrustKdc(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-     * realm trust relationship.
-     * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for crossRealmTrustKdc to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustKdcBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - crossRealmTrustKdc_ = value; - onChanged(); - return this; - } - - private java.lang.Object crossRealmTrustAdminServer_ = ""; - /** - * - * - *
-     * Optional. The admin server (IP or hostname) for the remote trusted realm in
-     * a cross realm trust relationship.
-     * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustAdminServer. - */ - public java.lang.String getCrossRealmTrustAdminServer() { - java.lang.Object ref = crossRealmTrustAdminServer_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustAdminServer_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The admin server (IP or hostname) for the remote trusted realm in
-     * a cross realm trust relationship.
-     * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustAdminServer. - */ - public com.google.protobuf.ByteString getCrossRealmTrustAdminServerBytes() { - java.lang.Object ref = crossRealmTrustAdminServer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustAdminServer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The admin server (IP or hostname) for the remote trusted realm in
-     * a cross realm trust relationship.
-     * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The crossRealmTrustAdminServer to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustAdminServer(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - crossRealmTrustAdminServer_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The admin server (IP or hostname) for the remote trusted realm in
-     * a cross realm trust relationship.
-     * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearCrossRealmTrustAdminServer() { - - crossRealmTrustAdminServer_ = getDefaultInstance().getCrossRealmTrustAdminServer(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The admin server (IP or hostname) for the remote trusted realm in
-     * a cross realm trust relationship.
-     * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for crossRealmTrustAdminServer to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustAdminServerBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - crossRealmTrustAdminServer_ = value; - onChanged(); - return this; - } - - private java.lang.Object crossRealmTrustSharedPasswordUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * shared password between the on-cluster Kerberos realm and the remote
-     * trusted realm, in a cross realm trust relationship.
-     * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustSharedPasswordUri. - */ - public java.lang.String getCrossRealmTrustSharedPasswordUri() { - java.lang.Object ref = crossRealmTrustSharedPasswordUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - crossRealmTrustSharedPasswordUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * shared password between the on-cluster Kerberos realm and the remote
-     * trusted realm, in a cross realm trust relationship.
-     * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustSharedPasswordUri. - */ - public com.google.protobuf.ByteString getCrossRealmTrustSharedPasswordUriBytes() { - java.lang.Object ref = crossRealmTrustSharedPasswordUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - crossRealmTrustSharedPasswordUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * shared password between the on-cluster Kerberos realm and the remote
-     * trusted realm, in a cross realm trust relationship.
-     * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The crossRealmTrustSharedPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustSharedPasswordUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - crossRealmTrustSharedPasswordUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * shared password between the on-cluster Kerberos realm and the remote
-     * trusted realm, in a cross realm trust relationship.
-     * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearCrossRealmTrustSharedPasswordUri() { - - crossRealmTrustSharedPasswordUri_ = - getDefaultInstance().getCrossRealmTrustSharedPasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * shared password between the on-cluster Kerberos realm and the remote
-     * trusted realm, in a cross realm trust relationship.
-     * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes for crossRealmTrustSharedPasswordUri to set. - * @return This builder for chaining. - */ - public Builder setCrossRealmTrustSharedPasswordUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - crossRealmTrustSharedPasswordUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object kdcDbKeyUri_ = ""; - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * master key of the KDC database.
-     * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kdcDbKeyUri. - */ - public java.lang.String getKdcDbKeyUri() { - java.lang.Object ref = kdcDbKeyUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kdcDbKeyUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * master key of the KDC database.
-     * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kdcDbKeyUri. - */ - public com.google.protobuf.ByteString getKdcDbKeyUriBytes() { - java.lang.Object ref = kdcDbKeyUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kdcDbKeyUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * master key of the KDC database.
-     * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The kdcDbKeyUri to set. - * @return This builder for chaining. - */ - public Builder setKdcDbKeyUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kdcDbKeyUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * master key of the KDC database.
-     * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKdcDbKeyUri() { - - kdcDbKeyUri_ = getDefaultInstance().getKdcDbKeyUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-     * master key of the KDC database.
-     * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for kdcDbKeyUri to set. - * @return This builder for chaining. - */ - public Builder setKdcDbKeyUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kdcDbKeyUri_ = value; - onChanged(); - return this; - } - - private int tgtLifetimeHours_; - /** - * - * - *
-     * Optional. The lifetime of the ticket granting ticket, in hours.
-     * If not specified, or user specifies 0, then default value 10
-     * will be used.
-     * 
- * - * int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tgtLifetimeHours. - */ - @java.lang.Override - public int getTgtLifetimeHours() { - return tgtLifetimeHours_; - } - /** - * - * - *
-     * Optional. The lifetime of the ticket granting ticket, in hours.
-     * If not specified, or user specifies 0, then default value 10
-     * will be used.
-     * 
- * - * int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The tgtLifetimeHours to set. - * @return This builder for chaining. - */ - public Builder setTgtLifetimeHours(int value) { - - tgtLifetimeHours_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The lifetime of the ticket granting ticket, in hours.
-     * If not specified, or user specifies 0, then default value 10
-     * will be used.
-     * 
- * - * int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTgtLifetimeHours() { - - tgtLifetimeHours_ = 0; - onChanged(); - return this; - } - - private java.lang.Object realm_ = ""; - /** - * - * - *
-     * Optional. The name of the on-cluster Kerberos realm.
-     * If not specified, the uppercased domain of hostnames will be the realm.
-     * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The realm. - */ - public java.lang.String getRealm() { - java.lang.Object ref = realm_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - realm_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The name of the on-cluster Kerberos realm.
-     * If not specified, the uppercased domain of hostnames will be the realm.
-     * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for realm. - */ - public com.google.protobuf.ByteString getRealmBytes() { - java.lang.Object ref = realm_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - realm_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The name of the on-cluster Kerberos realm.
-     * If not specified, the uppercased domain of hostnames will be the realm.
-     * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The realm to set. - * @return This builder for chaining. - */ - public Builder setRealm(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - realm_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The name of the on-cluster Kerberos realm.
-     * If not specified, the uppercased domain of hostnames will be the realm.
-     * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRealm() { - - realm_ = getDefaultInstance().getRealm(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The name of the on-cluster Kerberos realm.
-     * If not specified, the uppercased domain of hostnames will be the realm.
-     * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for realm to set. - * @return This builder for chaining. - */ - public Builder setRealmBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - realm_ = 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.dataproc.v1.KerberosConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.KerberosConfig) - private static final com.google.cloud.dataproc.v1.KerberosConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.KerberosConfig(); - } - - public static com.google.cloud.dataproc.v1.KerberosConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KerberosConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KerberosConfig(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.dataproc.v1.KerberosConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java deleted file mode 100644 index 0f7dc472..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface KerberosConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.KerberosConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set
-   * this field to true to enable Kerberos on a cluster.
-   * 
- * - * bool enable_kerberos = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableKerberos. - */ - boolean getEnableKerberos(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The rootPrincipalPasswordUri. - */ - java.lang.String getRootPrincipalPasswordUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for rootPrincipalPasswordUri. - */ - com.google.protobuf.ByteString getRootPrincipalPasswordUriBytes(); - - /** - * - * - *
-   * Optional. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kmsKeyUri. - */ - java.lang.String getKmsKeyUri(); - /** - * - * - *
-   * Optional. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kmsKeyUri. - */ - com.google.protobuf.ByteString getKmsKeyUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of the keystore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystoreUri. - */ - java.lang.String getKeystoreUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of the keystore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string keystore_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystoreUri. - */ - com.google.protobuf.ByteString getKeystoreUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of the truststore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststoreUri. - */ - java.lang.String getTruststoreUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of the truststore file used for SSL
-   * encryption. If not provided, Dataproc will provide a self-signed
-   * certificate.
-   * 
- * - * string truststore_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststoreUri. - */ - com.google.protobuf.ByteString getTruststoreUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided keystore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keystorePasswordUri. - */ - java.lang.String getKeystorePasswordUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided keystore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string keystore_password_uri = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keystorePasswordUri. - */ - com.google.protobuf.ByteString getKeystorePasswordUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided key. For the self-signed certificate, this
-   * password is generated by Dataproc.
-   * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The keyPasswordUri. - */ - java.lang.String getKeyPasswordUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided key. For the self-signed certificate, this
-   * password is generated by Dataproc.
-   * 
- * - * string key_password_uri = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for keyPasswordUri. - */ - com.google.protobuf.ByteString getKeyPasswordUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided truststore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The truststorePasswordUri. - */ - java.lang.String getTruststorePasswordUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * password to the user provided truststore. For the self-signed certificate,
-   * this password is generated by Dataproc.
-   * 
- * - * string truststore_password_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for truststorePasswordUri. - */ - com.google.protobuf.ByteString getTruststorePasswordUriBytes(); - - /** - * - * - *
-   * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-   * the user enable cross realm trust.
-   * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustRealm. - */ - java.lang.String getCrossRealmTrustRealm(); - /** - * - * - *
-   * Optional. The remote realm the Dataproc on-cluster KDC will trust, should
-   * the user enable cross realm trust.
-   * 
- * - * string cross_realm_trust_realm = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustRealm. - */ - com.google.protobuf.ByteString getCrossRealmTrustRealmBytes(); - - /** - * - * - *
-   * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-   * realm trust relationship.
-   * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The crossRealmTrustKdc. - */ - java.lang.String getCrossRealmTrustKdc(); - /** - * - * - *
-   * Optional. The KDC (IP or hostname) for the remote trusted realm in a cross
-   * realm trust relationship.
-   * 
- * - * string cross_realm_trust_kdc = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for crossRealmTrustKdc. - */ - com.google.protobuf.ByteString getCrossRealmTrustKdcBytes(); - - /** - * - * - *
-   * Optional. The admin server (IP or hostname) for the remote trusted realm in
-   * a cross realm trust relationship.
-   * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustAdminServer. - */ - java.lang.String getCrossRealmTrustAdminServer(); - /** - * - * - *
-   * Optional. The admin server (IP or hostname) for the remote trusted realm in
-   * a cross realm trust relationship.
-   * 
- * - * string cross_realm_trust_admin_server = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustAdminServer. - */ - com.google.protobuf.ByteString getCrossRealmTrustAdminServerBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * shared password between the on-cluster Kerberos realm and the remote
-   * trusted realm, in a cross realm trust relationship.
-   * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The crossRealmTrustSharedPasswordUri. - */ - java.lang.String getCrossRealmTrustSharedPasswordUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * shared password between the on-cluster Kerberos realm and the remote
-   * trusted realm, in a cross realm trust relationship.
-   * 
- * - * - * string cross_realm_trust_shared_password_uri = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The bytes for crossRealmTrustSharedPasswordUri. - */ - com.google.protobuf.ByteString getCrossRealmTrustSharedPasswordUriBytes(); - - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * master key of the KDC database.
-   * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kdcDbKeyUri. - */ - java.lang.String getKdcDbKeyUri(); - /** - * - * - *
-   * Optional. The Cloud Storage URI of a KMS encrypted file containing the
-   * master key of the KDC database.
-   * 
- * - * string kdc_db_key_uri = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kdcDbKeyUri. - */ - com.google.protobuf.ByteString getKdcDbKeyUriBytes(); - - /** - * - * - *
-   * Optional. The lifetime of the ticket granting ticket, in hours.
-   * If not specified, or user specifies 0, then default value 10
-   * will be used.
-   * 
- * - * int32 tgt_lifetime_hours = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tgtLifetimeHours. - */ - int getTgtLifetimeHours(); - - /** - * - * - *
-   * Optional. The name of the on-cluster Kerberos realm.
-   * If not specified, the uppercased domain of hostnames will be the realm.
-   * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The realm. - */ - java.lang.String getRealm(); - /** - * - * - *
-   * Optional. The name of the on-cluster Kerberos realm.
-   * If not specified, the uppercased domain of hostnames will be the realm.
-   * 
- * - * string realm = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for realm. - */ - com.google.protobuf.ByteString getRealmBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfig.java deleted file mode 100644 index 73587a1b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfig.java +++ /dev/null @@ -1,1371 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The configuration for running the Dataproc cluster on Kubernetes.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KubernetesClusterConfig} - */ -public final class KubernetesClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.KubernetesClusterConfig) - KubernetesClusterConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KubernetesClusterConfig.newBuilder() to construct. - private KubernetesClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KubernetesClusterConfig() { - kubernetesNamespace_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KubernetesClusterConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KubernetesClusterConfig( - 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(); - - kubernetesNamespace_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder subBuilder = null; - if (configCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.GkeClusterConfig) config_).toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1.GkeClusterConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.GkeClusterConfig) config_); - config_ = subBuilder.buildPartial(); - } - configCase_ = 2; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder subBuilder = null; - if (kubernetesSoftwareConfig_ != null) { - subBuilder = kubernetesSoftwareConfig_.toBuilder(); - } - kubernetesSoftwareConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kubernetesSoftwareConfig_); - kubernetesSoftwareConfig_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KubernetesClusterConfig.class, - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder.class); - } - - private int configCase_ = 0; - private java.lang.Object config_; - - public enum ConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GKE_CLUSTER_CONFIG(2), - CONFIG_NOT_SET(0); - private final int value; - - private ConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConfigCase valueOf(int value) { - return forNumber(value); - } - - public static ConfigCase forNumber(int value) { - switch (value) { - case 2: - return GKE_CLUSTER_CONFIG; - case 0: - return CONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ConfigCase getConfigCase() { - return ConfigCase.forNumber(configCase_); - } - - public static final int KUBERNETES_NAMESPACE_FIELD_NUMBER = 1; - private volatile java.lang.Object kubernetesNamespace_; - /** - * - * - *
-   * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-   * does not exist, it is created. If it exists, Dataproc
-   * verifies that another Dataproc VirtualCluster is not installed
-   * into it. If not specified, the name of the Dataproc Cluster is used.
-   * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kubernetesNamespace. - */ - @java.lang.Override - public java.lang.String getKubernetesNamespace() { - java.lang.Object ref = kubernetesNamespace_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kubernetesNamespace_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-   * does not exist, it is created. If it exists, Dataproc
-   * verifies that another Dataproc VirtualCluster is not installed
-   * into it. If not specified, the name of the Dataproc Cluster is used.
-   * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kubernetesNamespace. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKubernetesNamespaceBytes() { - java.lang.Object ref = kubernetesNamespace_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kubernetesNamespace_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GKE_CLUSTER_CONFIG_FIELD_NUMBER = 2; - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - @java.lang.Override - public boolean hasGkeClusterConfig() { - return configCase_ == 2; - } - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gkeClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfig getGkeClusterConfig() { - if (configCase_ == 2) { - return (com.google.cloud.dataproc.v1.GkeClusterConfig) config_; - } - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder getGkeClusterConfigOrBuilder() { - if (configCase_ == 2) { - return (com.google.cloud.dataproc.v1.GkeClusterConfig) config_; - } - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - - public static final int KUBERNETES_SOFTWARE_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetesSoftwareConfig_; - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kubernetesSoftwareConfig field is set. - */ - @java.lang.Override - public boolean hasKubernetesSoftwareConfig() { - return kubernetesSoftwareConfig_ != null; - } - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kubernetesSoftwareConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig getKubernetesSoftwareConfig() { - return kubernetesSoftwareConfig_ == null - ? com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.getDefaultInstance() - : kubernetesSoftwareConfig_; - } - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder - getKubernetesSoftwareConfigOrBuilder() { - return getKubernetesSoftwareConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesNamespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kubernetesNamespace_); - } - if (configCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.GkeClusterConfig) config_); - } - if (kubernetesSoftwareConfig_ != null) { - output.writeMessage(3, getKubernetesSoftwareConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesNamespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kubernetesNamespace_); - } - if (configCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.GkeClusterConfig) config_); - } - if (kubernetesSoftwareConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, getKubernetesSoftwareConfig()); - } - 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.dataproc.v1.KubernetesClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.KubernetesClusterConfig other = - (com.google.cloud.dataproc.v1.KubernetesClusterConfig) obj; - - if (!getKubernetesNamespace().equals(other.getKubernetesNamespace())) return false; - if (hasKubernetesSoftwareConfig() != other.hasKubernetesSoftwareConfig()) return false; - if (hasKubernetesSoftwareConfig()) { - if (!getKubernetesSoftwareConfig().equals(other.getKubernetesSoftwareConfig())) return false; - } - if (!getConfigCase().equals(other.getConfigCase())) return false; - switch (configCase_) { - case 2: - if (!getGkeClusterConfig().equals(other.getGkeClusterConfig())) return false; - break; - case 0: - default: - } - 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) + KUBERNETES_NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getKubernetesNamespace().hashCode(); - if (hasKubernetesSoftwareConfig()) { - hash = (37 * hash) + KUBERNETES_SOFTWARE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKubernetesSoftwareConfig().hashCode(); - } - switch (configCase_) { - case 2: - hash = (37 * hash) + GKE_CLUSTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGkeClusterConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig 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.dataproc.v1.KubernetesClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig parseFrom( - 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.dataproc.v1.KubernetesClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig 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.dataproc.v1.KubernetesClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig 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.dataproc.v1.KubernetesClusterConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig 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.dataproc.v1.KubernetesClusterConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KubernetesClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.KubernetesClusterConfig) - com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KubernetesClusterConfig.class, - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.KubernetesClusterConfig.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(); - kubernetesNamespace_ = ""; - - if (kubernetesSoftwareConfigBuilder_ == null) { - kubernetesSoftwareConfig_ = null; - } else { - kubernetesSoftwareConfig_ = null; - kubernetesSoftwareConfigBuilder_ = null; - } - configCase_ = 0; - config_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfig build() { - com.google.cloud.dataproc.v1.KubernetesClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfig buildPartial() { - com.google.cloud.dataproc.v1.KubernetesClusterConfig result = - new com.google.cloud.dataproc.v1.KubernetesClusterConfig(this); - result.kubernetesNamespace_ = kubernetesNamespace_; - if (configCase_ == 2) { - if (gkeClusterConfigBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = gkeClusterConfigBuilder_.build(); - } - } - if (kubernetesSoftwareConfigBuilder_ == null) { - result.kubernetesSoftwareConfig_ = kubernetesSoftwareConfig_; - } else { - result.kubernetesSoftwareConfig_ = kubernetesSoftwareConfigBuilder_.build(); - } - result.configCase_ = configCase_; - 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.dataproc.v1.KubernetesClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.KubernetesClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.KubernetesClusterConfig other) { - if (other == com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance()) - return this; - if (!other.getKubernetesNamespace().isEmpty()) { - kubernetesNamespace_ = other.kubernetesNamespace_; - onChanged(); - } - if (other.hasKubernetesSoftwareConfig()) { - mergeKubernetesSoftwareConfig(other.getKubernetesSoftwareConfig()); - } - switch (other.getConfigCase()) { - case GKE_CLUSTER_CONFIG: - { - mergeGkeClusterConfig(other.getGkeClusterConfig()); - break; - } - case CONFIG_NOT_SET: - { - break; - } - } - 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.dataproc.v1.KubernetesClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.KubernetesClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int configCase_ = 0; - private java.lang.Object config_; - - public ConfigCase getConfigCase() { - return ConfigCase.forNumber(configCase_); - } - - public Builder clearConfig() { - configCase_ = 0; - config_ = null; - onChanged(); - return this; - } - - private java.lang.Object kubernetesNamespace_ = ""; - /** - * - * - *
-     * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-     * does not exist, it is created. If it exists, Dataproc
-     * verifies that another Dataproc VirtualCluster is not installed
-     * into it. If not specified, the name of the Dataproc Cluster is used.
-     * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kubernetesNamespace. - */ - public java.lang.String getKubernetesNamespace() { - java.lang.Object ref = kubernetesNamespace_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kubernetesNamespace_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-     * does not exist, it is created. If it exists, Dataproc
-     * verifies that another Dataproc VirtualCluster is not installed
-     * into it. If not specified, the name of the Dataproc Cluster is used.
-     * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kubernetesNamespace. - */ - public com.google.protobuf.ByteString getKubernetesNamespaceBytes() { - java.lang.Object ref = kubernetesNamespace_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - kubernetesNamespace_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-     * does not exist, it is created. If it exists, Dataproc
-     * verifies that another Dataproc VirtualCluster is not installed
-     * into it. If not specified, the name of the Dataproc Cluster is used.
-     * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The kubernetesNamespace to set. - * @return This builder for chaining. - */ - public Builder setKubernetesNamespace(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kubernetesNamespace_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-     * does not exist, it is created. If it exists, Dataproc
-     * verifies that another Dataproc VirtualCluster is not installed
-     * into it. If not specified, the name of the Dataproc Cluster is used.
-     * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKubernetesNamespace() { - - kubernetesNamespace_ = getDefaultInstance().getKubernetesNamespace(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-     * does not exist, it is created. If it exists, Dataproc
-     * verifies that another Dataproc VirtualCluster is not installed
-     * into it. If not specified, the name of the Dataproc Cluster is used.
-     * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for kubernetesNamespace to set. - * @return This builder for chaining. - */ - public Builder setKubernetesNamespaceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kubernetesNamespace_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeClusterConfig, - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder> - gkeClusterConfigBuilder_; - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - @java.lang.Override - public boolean hasGkeClusterConfig() { - return configCase_ == 2; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gkeClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfig getGkeClusterConfig() { - if (gkeClusterConfigBuilder_ == null) { - if (configCase_ == 2) { - return (com.google.cloud.dataproc.v1.GkeClusterConfig) config_; - } - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } else { - if (configCase_ == 2) { - return gkeClusterConfigBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGkeClusterConfig(com.google.cloud.dataproc.v1.GkeClusterConfig value) { - if (gkeClusterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - gkeClusterConfigBuilder_.setMessage(value); - } - configCase_ = 2; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setGkeClusterConfig( - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder builderForValue) { - if (gkeClusterConfigBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - gkeClusterConfigBuilder_.setMessage(builderForValue.build()); - } - configCase_ = 2; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeGkeClusterConfig(com.google.cloud.dataproc.v1.GkeClusterConfig value) { - if (gkeClusterConfigBuilder_ == null) { - if (configCase_ == 2 - && config_ != com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance()) { - config_ = - com.google.cloud.dataproc.v1.GkeClusterConfig.newBuilder( - (com.google.cloud.dataproc.v1.GkeClusterConfig) config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - if (configCase_ == 2) { - gkeClusterConfigBuilder_.mergeFrom(value); - } - gkeClusterConfigBuilder_.setMessage(value); - } - configCase_ = 2; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearGkeClusterConfig() { - if (gkeClusterConfigBuilder_ == null) { - if (configCase_ == 2) { - configCase_ = 0; - config_ = null; - onChanged(); - } - } else { - if (configCase_ == 2) { - configCase_ = 0; - config_ = null; - } - gkeClusterConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.GkeClusterConfig.Builder getGkeClusterConfigBuilder() { - return getGkeClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder getGkeClusterConfigOrBuilder() { - if ((configCase_ == 2) && (gkeClusterConfigBuilder_ != null)) { - return gkeClusterConfigBuilder_.getMessageOrBuilder(); - } else { - if (configCase_ == 2) { - return (com.google.cloud.dataproc.v1.GkeClusterConfig) config_; - } - return com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on GKE.
-     * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeClusterConfig, - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder> - getGkeClusterConfigFieldBuilder() { - if (gkeClusterConfigBuilder_ == null) { - if (!(configCase_ == 2)) { - config_ = com.google.cloud.dataproc.v1.GkeClusterConfig.getDefaultInstance(); - } - gkeClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.GkeClusterConfig, - com.google.cloud.dataproc.v1.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder>( - (com.google.cloud.dataproc.v1.GkeClusterConfig) config_, - getParentForChildren(), - isClean()); - config_ = null; - } - configCase_ = 2; - onChanged(); - ; - return gkeClusterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetesSoftwareConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder> - kubernetesSoftwareConfigBuilder_; - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kubernetesSoftwareConfig field is set. - */ - public boolean hasKubernetesSoftwareConfig() { - return kubernetesSoftwareConfigBuilder_ != null || kubernetesSoftwareConfig_ != null; - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kubernetesSoftwareConfig. - */ - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig getKubernetesSoftwareConfig() { - if (kubernetesSoftwareConfigBuilder_ == null) { - return kubernetesSoftwareConfig_ == null - ? com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.getDefaultInstance() - : kubernetesSoftwareConfig_; - } else { - return kubernetesSoftwareConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setKubernetesSoftwareConfig( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig value) { - if (kubernetesSoftwareConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kubernetesSoftwareConfig_ = value; - onChanged(); - } else { - kubernetesSoftwareConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setKubernetesSoftwareConfig( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder builderForValue) { - if (kubernetesSoftwareConfigBuilder_ == null) { - kubernetesSoftwareConfig_ = builderForValue.build(); - onChanged(); - } else { - kubernetesSoftwareConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeKubernetesSoftwareConfig( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig value) { - if (kubernetesSoftwareConfigBuilder_ == null) { - if (kubernetesSoftwareConfig_ != null) { - kubernetesSoftwareConfig_ = - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.newBuilder( - kubernetesSoftwareConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - kubernetesSoftwareConfig_ = value; - } - onChanged(); - } else { - kubernetesSoftwareConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearKubernetesSoftwareConfig() { - if (kubernetesSoftwareConfigBuilder_ == null) { - kubernetesSoftwareConfig_ = null; - onChanged(); - } else { - kubernetesSoftwareConfig_ = null; - kubernetesSoftwareConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder - getKubernetesSoftwareConfigBuilder() { - - onChanged(); - return getKubernetesSoftwareConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder - getKubernetesSoftwareConfigOrBuilder() { - if (kubernetesSoftwareConfigBuilder_ != null) { - return kubernetesSoftwareConfigBuilder_.getMessageOrBuilder(); - } else { - return kubernetesSoftwareConfig_ == null - ? com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.getDefaultInstance() - : kubernetesSoftwareConfig_; - } - } - /** - * - * - *
-     * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder> - getKubernetesSoftwareConfigFieldBuilder() { - if (kubernetesSoftwareConfigBuilder_ == null) { - kubernetesSoftwareConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder>( - getKubernetesSoftwareConfig(), getParentForChildren(), isClean()); - kubernetesSoftwareConfig_ = null; - } - return kubernetesSoftwareConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.KubernetesClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.KubernetesClusterConfig) - private static final com.google.cloud.dataproc.v1.KubernetesClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.KubernetesClusterConfig(); - } - - public static com.google.cloud.dataproc.v1.KubernetesClusterConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KubernetesClusterConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KubernetesClusterConfig(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.dataproc.v1.KubernetesClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfigOrBuilder.java deleted file mode 100644 index ab45cd88..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesClusterConfigOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface KubernetesClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.KubernetesClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-   * does not exist, it is created. If it exists, Dataproc
-   * verifies that another Dataproc VirtualCluster is not installed
-   * into it. If not specified, the name of the Dataproc Cluster is used.
-   * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The kubernetesNamespace. - */ - java.lang.String getKubernetesNamespace(); - /** - * - * - *
-   * Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace
-   * does not exist, it is created. If it exists, Dataproc
-   * verifies that another Dataproc VirtualCluster is not installed
-   * into it. If not specified, the name of the Dataproc Cluster is used.
-   * 
- * - * string kubernetes_namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for kubernetesNamespace. - */ - com.google.protobuf.ByteString getKubernetesNamespaceBytes(); - - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - boolean hasGkeClusterConfig(); - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The gkeClusterConfig. - */ - com.google.cloud.dataproc.v1.GkeClusterConfig getGkeClusterConfig(); - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on GKE.
-   * 
- * - * - * .google.cloud.dataproc.v1.GkeClusterConfig gke_cluster_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.GkeClusterConfigOrBuilder getGkeClusterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kubernetesSoftwareConfig field is set. - */ - boolean hasKubernetesSoftwareConfig(); - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kubernetesSoftwareConfig. - */ - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig getKubernetesSoftwareConfig(); - /** - * - * - *
-   * Optional. The software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesSoftwareConfig kubernetes_software_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder - getKubernetesSoftwareConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.KubernetesClusterConfig.ConfigCase getConfigCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfig.java deleted file mode 100644 index 9780b0ba..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfig.java +++ /dev/null @@ -1,1195 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The software configuration for this Dataproc cluster running on Kubernetes.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KubernetesSoftwareConfig} - */ -public final class KubernetesSoftwareConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.KubernetesSoftwareConfig) - KubernetesSoftwareConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KubernetesSoftwareConfig.newBuilder() to construct. - private KubernetesSoftwareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private KubernetesSoftwareConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new KubernetesSoftwareConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KubernetesSoftwareConfig( - 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)) { - componentVersion_ = - com.google.protobuf.MapField.newMapField( - ComponentVersionDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry componentVersion__ = - input.readMessage( - ComponentVersionDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - componentVersion_ - .getMutableMap() - .put(componentVersion__.getKey(), componentVersion__.getValue()); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetComponentVersion(); - case 2: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.class, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder.class); - } - - public static final int COMPONENT_VERSION_FIELD_NUMBER = 1; - - private static final class ComponentVersionDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField componentVersion_; - - private com.google.protobuf.MapField - internalGetComponentVersion() { - if (componentVersion_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ComponentVersionDefaultEntryHolder.defaultEntry); - } - return componentVersion_; - } - - public int getComponentVersionCount() { - return internalGetComponentVersion().getMap().size(); - } - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public boolean containsComponentVersion(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetComponentVersion().getMap().containsKey(key); - } - /** Use {@link #getComponentVersionMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getComponentVersion() { - return getComponentVersionMap(); - } - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.util.Map getComponentVersionMap() { - return internalGetComponentVersion().getMap(); - } - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.lang.String getComponentVersionOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetComponentVersion().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.lang.String getComponentVersionOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetComponentVersion().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PROPERTIES_FIELD_NUMBER = 2; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetComponentVersion(), ComponentVersionDefaultEntryHolder.defaultEntry, 1); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetComponentVersion().getMap().entrySet()) { - com.google.protobuf.MapEntry componentVersion__ = - ComponentVersionDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, componentVersion__); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, properties__); - } - 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.dataproc.v1.KubernetesSoftwareConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig other = - (com.google.cloud.dataproc.v1.KubernetesSoftwareConfig) obj; - - if (!internalGetComponentVersion().equals(other.internalGetComponentVersion())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) 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 (!internalGetComponentVersion().getMap().isEmpty()) { - hash = (37 * hash) + COMPONENT_VERSION_FIELD_NUMBER; - hash = (53 * hash) + internalGetComponentVersion().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig 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.dataproc.v1.KubernetesSoftwareConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig parseFrom( - 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.dataproc.v1.KubernetesSoftwareConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig 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.dataproc.v1.KubernetesSoftwareConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig 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.dataproc.v1.KubernetesSoftwareConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig 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.dataproc.v1.KubernetesSoftwareConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 software configuration for this Dataproc cluster running on Kubernetes.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.KubernetesSoftwareConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.KubernetesSoftwareConfig) - com.google.cloud.dataproc.v1.KubernetesSoftwareConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetComponentVersion(); - case 2: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableComponentVersion(); - case 2: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.class, - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.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(); - internalGetMutableComponentVersion().clear(); - internalGetMutableProperties().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig build() { - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesSoftwareConfig buildPartial() { - com.google.cloud.dataproc.v1.KubernetesSoftwareConfig result = - new com.google.cloud.dataproc.v1.KubernetesSoftwareConfig(this); - int from_bitField0_ = bitField0_; - result.componentVersion_ = internalGetComponentVersion(); - result.componentVersion_.makeImmutable(); - result.properties_ = internalGetProperties(); - result.properties_.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.dataproc.v1.KubernetesSoftwareConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.KubernetesSoftwareConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.KubernetesSoftwareConfig other) { - if (other == com.google.cloud.dataproc.v1.KubernetesSoftwareConfig.getDefaultInstance()) - return this; - internalGetMutableComponentVersion().mergeFrom(other.internalGetComponentVersion()); - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - 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.dataproc.v1.KubernetesSoftwareConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.KubernetesSoftwareConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField componentVersion_; - - private com.google.protobuf.MapField - internalGetComponentVersion() { - if (componentVersion_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ComponentVersionDefaultEntryHolder.defaultEntry); - } - return componentVersion_; - } - - private com.google.protobuf.MapField - internalGetMutableComponentVersion() { - onChanged(); - ; - if (componentVersion_ == null) { - componentVersion_ = - com.google.protobuf.MapField.newMapField( - ComponentVersionDefaultEntryHolder.defaultEntry); - } - if (!componentVersion_.isMutable()) { - componentVersion_ = componentVersion_.copy(); - } - return componentVersion_; - } - - public int getComponentVersionCount() { - return internalGetComponentVersion().getMap().size(); - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public boolean containsComponentVersion(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetComponentVersion().getMap().containsKey(key); - } - /** Use {@link #getComponentVersionMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getComponentVersion() { - return getComponentVersionMap(); - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.util.Map getComponentVersionMap() { - return internalGetComponentVersion().getMap(); - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.lang.String getComponentVersionOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetComponentVersion().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - @java.lang.Override - public java.lang.String getComponentVersionOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetComponentVersion().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearComponentVersion() { - internalGetMutableComponentVersion().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - public Builder removeComponentVersion(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableComponentVersion().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableComponentVersion() { - return internalGetMutableComponentVersion().getMutableMap(); - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - public Builder putComponentVersion(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableComponentVersion().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The components that should be installed in this Dataproc cluster. The key
-     * must be a string from the KubernetesComponent enumeration. The value is
-     * the version of the software to be installed.
-     * At least one entry must be specified.
-     * 
- * - * map<string, string> component_version = 1; - */ - public Builder putAllComponentVersion( - java.util.Map values) { - internalGetMutableComponentVersion().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `spark:spark.kubernetes.container.image`. The following are supported
-     * prefixes and their mappings:
-     * * spark:  `spark-defaults.conf`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2; - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().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.dataproc.v1.KubernetesSoftwareConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.KubernetesSoftwareConfig) - private static final com.google.cloud.dataproc.v1.KubernetesSoftwareConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.KubernetesSoftwareConfig(); - } - - public static com.google.cloud.dataproc.v1.KubernetesSoftwareConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KubernetesSoftwareConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KubernetesSoftwareConfig(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.dataproc.v1.KubernetesSoftwareConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfigOrBuilder.java deleted file mode 100644 index 05673c71..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KubernetesSoftwareConfigOrBuilder.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface KubernetesSoftwareConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.KubernetesSoftwareConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - int getComponentVersionCount(); - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - boolean containsComponentVersion(java.lang.String key); - /** Use {@link #getComponentVersionMap()} instead. */ - @java.lang.Deprecated - java.util.Map getComponentVersion(); - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - java.util.Map getComponentVersionMap(); - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - java.lang.String getComponentVersionOrDefault( - java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * The components that should be installed in this Dataproc cluster. The key
-   * must be a string from the KubernetesComponent enumeration. The value is
-   * the version of the software to be installed.
-   * At least one entry must be specified.
-   * 
- * - * map<string, string> component_version = 1; - */ - java.lang.String getComponentVersionOrThrow(java.lang.String key); - - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - int getPropertiesCount(); - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `spark:spark.kubernetes.container.image`. The following are supported
-   * prefixes and their mappings:
-   * * spark:  `spark-defaults.conf`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2; - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java deleted file mode 100644 index 92751d87..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java +++ /dev/null @@ -1,1899 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies the cluster auto-delete schedule configuration.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.LifecycleConfig} - */ -public final class LifecycleConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.LifecycleConfig) - LifecycleConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use LifecycleConfig.newBuilder() to construct. - private LifecycleConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LifecycleConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new LifecycleConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LifecycleConfig( - 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.Duration.Builder subBuilder = null; - if (idleDeleteTtl_ != null) { - subBuilder = idleDeleteTtl_.toBuilder(); - } - idleDeleteTtl_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(idleDeleteTtl_); - idleDeleteTtl_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (ttlCase_ == 2) { - subBuilder = ((com.google.protobuf.Timestamp) ttl_).toBuilder(); - } - ttl_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) ttl_); - ttl_ = subBuilder.buildPartial(); - } - ttlCase_ = 2; - break; - } - case 26: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (ttlCase_ == 3) { - subBuilder = ((com.google.protobuf.Duration) ttl_).toBuilder(); - } - ttl_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) ttl_); - ttl_ = subBuilder.buildPartial(); - } - ttlCase_ = 3; - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (idleStartTime_ != null) { - subBuilder = idleStartTime_.toBuilder(); - } - idleStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(idleStartTime_); - idleStartTime_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.LifecycleConfig.class, - com.google.cloud.dataproc.v1.LifecycleConfig.Builder.class); - } - - private int ttlCase_ = 0; - private java.lang.Object ttl_; - - public enum TtlCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - AUTO_DELETE_TIME(2), - AUTO_DELETE_TTL(3), - TTL_NOT_SET(0); - private final int value; - - private TtlCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TtlCase valueOf(int value) { - return forNumber(value); - } - - public static TtlCase forNumber(int value) { - switch (value) { - case 2: - return AUTO_DELETE_TIME; - case 3: - return AUTO_DELETE_TTL; - case 0: - return TTL_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public TtlCase getTtlCase() { - return TtlCase.forNumber(ttlCase_); - } - - public static final int IDLE_DELETE_TTL_FIELD_NUMBER = 1; - private com.google.protobuf.Duration idleDeleteTtl_; - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the idleDeleteTtl field is set. - */ - @java.lang.Override - public boolean hasIdleDeleteTtl() { - return idleDeleteTtl_ != null; - } - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The idleDeleteTtl. - */ - @java.lang.Override - public com.google.protobuf.Duration getIdleDeleteTtl() { - return idleDeleteTtl_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : idleDeleteTtl_; - } - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder() { - return getIdleDeleteTtl(); - } - - public static final int AUTO_DELETE_TIME_FIELD_NUMBER = 2; - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTime field is set. - */ - @java.lang.Override - public boolean hasAutoDeleteTime() { - return ttlCase_ == 2; - } - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getAutoDeleteTime() { - if (ttlCase_ == 2) { - return (com.google.protobuf.Timestamp) ttl_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getAutoDeleteTimeOrBuilder() { - if (ttlCase_ == 2) { - return (com.google.protobuf.Timestamp) ttl_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int AUTO_DELETE_TTL_FIELD_NUMBER = 3; - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTtl field is set. - */ - @java.lang.Override - public boolean hasAutoDeleteTtl() { - return ttlCase_ == 3; - } - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTtl. - */ - @java.lang.Override - public com.google.protobuf.Duration getAutoDeleteTtl() { - if (ttlCase_ == 3) { - return (com.google.protobuf.Duration) ttl_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getAutoDeleteTtlOrBuilder() { - if (ttlCase_ == 3) { - return (com.google.protobuf.Duration) ttl_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - public static final int IDLE_START_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp idleStartTime_; - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the idleStartTime field is set. - */ - @java.lang.Override - public boolean hasIdleStartTime() { - return idleStartTime_ != null; - } - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The idleStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getIdleStartTime() { - return idleStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : idleStartTime_; - } - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getIdleStartTimeOrBuilder() { - return getIdleStartTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (idleDeleteTtl_ != null) { - output.writeMessage(1, getIdleDeleteTtl()); - } - if (ttlCase_ == 2) { - output.writeMessage(2, (com.google.protobuf.Timestamp) ttl_); - } - if (ttlCase_ == 3) { - output.writeMessage(3, (com.google.protobuf.Duration) ttl_); - } - if (idleStartTime_ != null) { - output.writeMessage(4, getIdleStartTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (idleDeleteTtl_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIdleDeleteTtl()); - } - if (ttlCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.protobuf.Timestamp) ttl_); - } - if (ttlCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.protobuf.Duration) ttl_); - } - if (idleStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIdleStartTime()); - } - 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.dataproc.v1.LifecycleConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.LifecycleConfig other = - (com.google.cloud.dataproc.v1.LifecycleConfig) obj; - - if (hasIdleDeleteTtl() != other.hasIdleDeleteTtl()) return false; - if (hasIdleDeleteTtl()) { - if (!getIdleDeleteTtl().equals(other.getIdleDeleteTtl())) return false; - } - if (hasIdleStartTime() != other.hasIdleStartTime()) return false; - if (hasIdleStartTime()) { - if (!getIdleStartTime().equals(other.getIdleStartTime())) return false; - } - if (!getTtlCase().equals(other.getTtlCase())) return false; - switch (ttlCase_) { - case 2: - if (!getAutoDeleteTime().equals(other.getAutoDeleteTime())) return false; - break; - case 3: - if (!getAutoDeleteTtl().equals(other.getAutoDeleteTtl())) return false; - break; - case 0: - default: - } - 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 (hasIdleDeleteTtl()) { - hash = (37 * hash) + IDLE_DELETE_TTL_FIELD_NUMBER; - hash = (53 * hash) + getIdleDeleteTtl().hashCode(); - } - if (hasIdleStartTime()) { - hash = (37 * hash) + IDLE_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getIdleStartTime().hashCode(); - } - switch (ttlCase_) { - case 2: - hash = (37 * hash) + AUTO_DELETE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getAutoDeleteTime().hashCode(); - break; - case 3: - hash = (37 * hash) + AUTO_DELETE_TTL_FIELD_NUMBER; - hash = (53 * hash) + getAutoDeleteTtl().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig 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.dataproc.v1.LifecycleConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig parseFrom( - 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.dataproc.v1.LifecycleConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig 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.dataproc.v1.LifecycleConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig 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.dataproc.v1.LifecycleConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig 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.dataproc.v1.LifecycleConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies the cluster auto-delete schedule configuration.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.LifecycleConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.LifecycleConfig) - com.google.cloud.dataproc.v1.LifecycleConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_LifecycleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.LifecycleConfig.class, - com.google.cloud.dataproc.v1.LifecycleConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.LifecycleConfig.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 (idleDeleteTtlBuilder_ == null) { - idleDeleteTtl_ = null; - } else { - idleDeleteTtl_ = null; - idleDeleteTtlBuilder_ = null; - } - if (idleStartTimeBuilder_ == null) { - idleStartTime_ = null; - } else { - idleStartTime_ = null; - idleStartTimeBuilder_ = null; - } - ttlCase_ = 0; - ttl_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_LifecycleConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LifecycleConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LifecycleConfig build() { - com.google.cloud.dataproc.v1.LifecycleConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LifecycleConfig buildPartial() { - com.google.cloud.dataproc.v1.LifecycleConfig result = - new com.google.cloud.dataproc.v1.LifecycleConfig(this); - if (idleDeleteTtlBuilder_ == null) { - result.idleDeleteTtl_ = idleDeleteTtl_; - } else { - result.idleDeleteTtl_ = idleDeleteTtlBuilder_.build(); - } - if (ttlCase_ == 2) { - if (autoDeleteTimeBuilder_ == null) { - result.ttl_ = ttl_; - } else { - result.ttl_ = autoDeleteTimeBuilder_.build(); - } - } - if (ttlCase_ == 3) { - if (autoDeleteTtlBuilder_ == null) { - result.ttl_ = ttl_; - } else { - result.ttl_ = autoDeleteTtlBuilder_.build(); - } - } - if (idleStartTimeBuilder_ == null) { - result.idleStartTime_ = idleStartTime_; - } else { - result.idleStartTime_ = idleStartTimeBuilder_.build(); - } - result.ttlCase_ = ttlCase_; - 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.dataproc.v1.LifecycleConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.LifecycleConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.LifecycleConfig other) { - if (other == com.google.cloud.dataproc.v1.LifecycleConfig.getDefaultInstance()) return this; - if (other.hasIdleDeleteTtl()) { - mergeIdleDeleteTtl(other.getIdleDeleteTtl()); - } - if (other.hasIdleStartTime()) { - mergeIdleStartTime(other.getIdleStartTime()); - } - switch (other.getTtlCase()) { - case AUTO_DELETE_TIME: - { - mergeAutoDeleteTime(other.getAutoDeleteTime()); - break; - } - case AUTO_DELETE_TTL: - { - mergeAutoDeleteTtl(other.getAutoDeleteTtl()); - break; - } - case TTL_NOT_SET: - { - break; - } - } - 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.dataproc.v1.LifecycleConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.LifecycleConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int ttlCase_ = 0; - private java.lang.Object ttl_; - - public TtlCase getTtlCase() { - return TtlCase.forNumber(ttlCase_); - } - - public Builder clearTtl() { - ttlCase_ = 0; - ttl_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.Duration idleDeleteTtl_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - idleDeleteTtlBuilder_; - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the idleDeleteTtl field is set. - */ - public boolean hasIdleDeleteTtl() { - return idleDeleteTtlBuilder_ != null || idleDeleteTtl_ != null; - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The idleDeleteTtl. - */ - public com.google.protobuf.Duration getIdleDeleteTtl() { - if (idleDeleteTtlBuilder_ == null) { - return idleDeleteTtl_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : idleDeleteTtl_; - } else { - return idleDeleteTtlBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setIdleDeleteTtl(com.google.protobuf.Duration value) { - if (idleDeleteTtlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - idleDeleteTtl_ = value; - onChanged(); - } else { - idleDeleteTtlBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setIdleDeleteTtl(com.google.protobuf.Duration.Builder builderForValue) { - if (idleDeleteTtlBuilder_ == null) { - idleDeleteTtl_ = builderForValue.build(); - onChanged(); - } else { - idleDeleteTtlBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeIdleDeleteTtl(com.google.protobuf.Duration value) { - if (idleDeleteTtlBuilder_ == null) { - if (idleDeleteTtl_ != null) { - idleDeleteTtl_ = - com.google.protobuf.Duration.newBuilder(idleDeleteTtl_) - .mergeFrom(value) - .buildPartial(); - } else { - idleDeleteTtl_ = value; - } - onChanged(); - } else { - idleDeleteTtlBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearIdleDeleteTtl() { - if (idleDeleteTtlBuilder_ == null) { - idleDeleteTtl_ = null; - onChanged(); - } else { - idleDeleteTtl_ = null; - idleDeleteTtlBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getIdleDeleteTtlBuilder() { - - onChanged(); - return getIdleDeleteTtlFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder() { - if (idleDeleteTtlBuilder_ != null) { - return idleDeleteTtlBuilder_.getMessageOrBuilder(); - } else { - return idleDeleteTtl_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : idleDeleteTtl_; - } - } - /** - * - * - *
-     * Optional. The duration to keep the cluster alive while idling (when no jobs
-     * are running). Passing this threshold will cause the cluster to be
-     * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getIdleDeleteTtlFieldBuilder() { - if (idleDeleteTtlBuilder_ == null) { - idleDeleteTtlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getIdleDeleteTtl(), getParentForChildren(), isClean()); - idleDeleteTtl_ = null; - } - return idleDeleteTtlBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - autoDeleteTimeBuilder_; - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTime field is set. - */ - @java.lang.Override - public boolean hasAutoDeleteTime() { - return ttlCase_ == 2; - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getAutoDeleteTime() { - if (autoDeleteTimeBuilder_ == null) { - if (ttlCase_ == 2) { - return (com.google.protobuf.Timestamp) ttl_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (ttlCase_ == 2) { - return autoDeleteTimeBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoDeleteTime(com.google.protobuf.Timestamp value) { - if (autoDeleteTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ttl_ = value; - onChanged(); - } else { - autoDeleteTimeBuilder_.setMessage(value); - } - ttlCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (autoDeleteTimeBuilder_ == null) { - ttl_ = builderForValue.build(); - onChanged(); - } else { - autoDeleteTimeBuilder_.setMessage(builderForValue.build()); - } - ttlCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAutoDeleteTime(com.google.protobuf.Timestamp value) { - if (autoDeleteTimeBuilder_ == null) { - if (ttlCase_ == 2 && ttl_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - ttl_ = - com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) ttl_) - .mergeFrom(value) - .buildPartial(); - } else { - ttl_ = value; - } - onChanged(); - } else { - if (ttlCase_ == 2) { - autoDeleteTimeBuilder_.mergeFrom(value); - } - autoDeleteTimeBuilder_.setMessage(value); - } - ttlCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAutoDeleteTime() { - if (autoDeleteTimeBuilder_ == null) { - if (ttlCase_ == 2) { - ttlCase_ = 0; - ttl_ = null; - onChanged(); - } - } else { - if (ttlCase_ == 2) { - ttlCase_ = 0; - ttl_ = null; - } - autoDeleteTimeBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Timestamp.Builder getAutoDeleteTimeBuilder() { - return getAutoDeleteTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getAutoDeleteTimeOrBuilder() { - if ((ttlCase_ == 2) && (autoDeleteTimeBuilder_ != null)) { - return autoDeleteTimeBuilder_.getMessageOrBuilder(); - } else { - if (ttlCase_ == 2) { - return (com.google.protobuf.Timestamp) ttl_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. The time when cluster will be auto-deleted (see JSON representation of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getAutoDeleteTimeFieldBuilder() { - if (autoDeleteTimeBuilder_ == null) { - if (!(ttlCase_ == 2)) { - ttl_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - autoDeleteTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) ttl_, getParentForChildren(), isClean()); - ttl_ = null; - } - ttlCase_ = 2; - onChanged(); - ; - return autoDeleteTimeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - autoDeleteTtlBuilder_; - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTtl field is set. - */ - @java.lang.Override - public boolean hasAutoDeleteTtl() { - return ttlCase_ == 3; - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTtl. - */ - @java.lang.Override - public com.google.protobuf.Duration getAutoDeleteTtl() { - if (autoDeleteTtlBuilder_ == null) { - if (ttlCase_ == 3) { - return (com.google.protobuf.Duration) ttl_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (ttlCase_ == 3) { - return autoDeleteTtlBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoDeleteTtl(com.google.protobuf.Duration value) { - if (autoDeleteTtlBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ttl_ = value; - onChanged(); - } else { - autoDeleteTtlBuilder_.setMessage(value); - } - ttlCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoDeleteTtl(com.google.protobuf.Duration.Builder builderForValue) { - if (autoDeleteTtlBuilder_ == null) { - ttl_ = builderForValue.build(); - onChanged(); - } else { - autoDeleteTtlBuilder_.setMessage(builderForValue.build()); - } - ttlCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAutoDeleteTtl(com.google.protobuf.Duration value) { - if (autoDeleteTtlBuilder_ == null) { - if (ttlCase_ == 3 && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { - ttl_ = - com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) ttl_) - .mergeFrom(value) - .buildPartial(); - } else { - ttl_ = value; - } - onChanged(); - } else { - if (ttlCase_ == 3) { - autoDeleteTtlBuilder_.mergeFrom(value); - } - autoDeleteTtlBuilder_.setMessage(value); - } - ttlCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAutoDeleteTtl() { - if (autoDeleteTtlBuilder_ == null) { - if (ttlCase_ == 3) { - ttlCase_ = 0; - ttl_ = null; - onChanged(); - } - } else { - if (ttlCase_ == 3) { - ttlCase_ = 0; - ttl_ = null; - } - autoDeleteTtlBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getAutoDeleteTtlBuilder() { - return getAutoDeleteTtlFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getAutoDeleteTtlOrBuilder() { - if ((ttlCase_ == 3) && (autoDeleteTtlBuilder_ != null)) { - return autoDeleteTtlBuilder_.getMessageOrBuilder(); - } else { - if (ttlCase_ == 3) { - return (com.google.protobuf.Duration) ttl_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. The lifetime duration of cluster. The cluster will be
-     * auto-deleted at the end of this period. Minimum value is 10 minutes;
-     * maximum value is 14 days (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getAutoDeleteTtlFieldBuilder() { - if (autoDeleteTtlBuilder_ == null) { - if (!(ttlCase_ == 3)) { - ttl_ = com.google.protobuf.Duration.getDefaultInstance(); - } - autoDeleteTtlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) ttl_, getParentForChildren(), isClean()); - ttl_ = null; - } - ttlCase_ = 3; - onChanged(); - ; - return autoDeleteTtlBuilder_; - } - - private com.google.protobuf.Timestamp idleStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - idleStartTimeBuilder_; - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the idleStartTime field is set. - */ - public boolean hasIdleStartTime() { - return idleStartTimeBuilder_ != null || idleStartTime_ != null; - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The idleStartTime. - */ - public com.google.protobuf.Timestamp getIdleStartTime() { - if (idleStartTimeBuilder_ == null) { - return idleStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : idleStartTime_; - } else { - return idleStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setIdleStartTime(com.google.protobuf.Timestamp value) { - if (idleStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - idleStartTime_ = value; - onChanged(); - } else { - idleStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setIdleStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (idleStartTimeBuilder_ == null) { - idleStartTime_ = builderForValue.build(); - onChanged(); - } else { - idleStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeIdleStartTime(com.google.protobuf.Timestamp value) { - if (idleStartTimeBuilder_ == null) { - if (idleStartTime_ != null) { - idleStartTime_ = - com.google.protobuf.Timestamp.newBuilder(idleStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - idleStartTime_ = value; - } - onChanged(); - } else { - idleStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearIdleStartTime() { - if (idleStartTimeBuilder_ == null) { - idleStartTime_ = null; - onChanged(); - } else { - idleStartTime_ = null; - idleStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getIdleStartTimeBuilder() { - - onChanged(); - return getIdleStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getIdleStartTimeOrBuilder() { - if (idleStartTimeBuilder_ != null) { - return idleStartTimeBuilder_.getMessageOrBuilder(); - } else { - return idleStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : idleStartTime_; - } - } - /** - * - * - *
-     * Output only. The time when cluster became idle (most recent job finished)
-     * and became eligible for deletion due to idleness (see JSON representation
-     * of
-     * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getIdleStartTimeFieldBuilder() { - if (idleStartTimeBuilder_ == null) { - idleStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getIdleStartTime(), getParentForChildren(), isClean()); - idleStartTime_ = null; - } - return idleStartTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.LifecycleConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.LifecycleConfig) - private static final com.google.cloud.dataproc.v1.LifecycleConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.LifecycleConfig(); - } - - public static com.google.cloud.dataproc.v1.LifecycleConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LifecycleConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LifecycleConfig(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.dataproc.v1.LifecycleConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java deleted file mode 100644 index 3f94c68e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface LifecycleConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.LifecycleConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the idleDeleteTtl field is set. - */ - boolean hasIdleDeleteTtl(); - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The idleDeleteTtl. - */ - com.google.protobuf.Duration getIdleDeleteTtl(); - /** - * - * - *
-   * Optional. The duration to keep the cluster alive while idling (when no jobs
-   * are running). Passing this threshold will cause the cluster to be
-   * deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration idle_delete_ttl = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getIdleDeleteTtlOrBuilder(); - - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTime field is set. - */ - boolean hasAutoDeleteTime(); - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTime. - */ - com.google.protobuf.Timestamp getAutoDeleteTime(); - /** - * - * - *
-   * Optional. The time when cluster will be auto-deleted (see JSON representation of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp auto_delete_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.TimestampOrBuilder getAutoDeleteTimeOrBuilder(); - - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the autoDeleteTtl field is set. - */ - boolean hasAutoDeleteTtl(); - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoDeleteTtl. - */ - com.google.protobuf.Duration getAutoDeleteTtl(); - /** - * - * - *
-   * Optional. The lifetime duration of cluster. The cluster will be
-   * auto-deleted at the end of this period. Minimum value is 10 minutes;
-   * maximum value is 14 days (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration auto_delete_ttl = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getAutoDeleteTtlOrBuilder(); - - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the idleStartTime field is set. - */ - boolean hasIdleStartTime(); - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The idleStartTime. - */ - com.google.protobuf.Timestamp getIdleStartTime(); - /** - * - * - *
-   * Output only. The time when cluster became idle (most recent job finished)
-   * and became eligible for deletion due to idleness (see JSON representation
-   * of
-   * [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * - * .google.protobuf.Timestamp idle_start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getIdleStartTimeOrBuilder(); - - public com.google.cloud.dataproc.v1.LifecycleConfig.TtlCase getTtlCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequest.java deleted file mode 100644 index 46f1fec5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequest.java +++ /dev/null @@ -1,981 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to list autoscaling policies in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest} - */ -public final class ListAutoscalingPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) - ListAutoscalingPoliciesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAutoscalingPoliciesRequest.newBuilder() to construct. - private ListAutoscalingPoliciesRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAutoscalingPoliciesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAutoscalingPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListAutoscalingPoliciesRequest( - 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.class, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.list`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.list`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.list`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.list`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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_; - /** - * - * - *
-   * Optional. The maximum number of results to return in each response.
-   * Must be less than or equal to 1000. Defaults to 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += 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.dataproc.v1.ListAutoscalingPoliciesRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest other = - (com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) 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.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest 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.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - 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.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest 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.dataproc.v1.ListAutoscalingPoliciesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest 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.dataproc.v1.ListAutoscalingPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest 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.dataproc.v1.ListAutoscalingPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to list autoscaling policies in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.class, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest build() { - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest buildPartial() { - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest result = - new com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest(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.dataproc.v1.ListAutoscalingPoliciesRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest other) { - if (other == com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest.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.dataproc.v1.ListAutoscalingPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The "resource name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.list`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.list`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.list`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.list`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.list`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.list`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.list`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.list`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name" of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.autoscalingPolicies.list`, the resource name
-     *   of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.list`, the resource name
-     *   of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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_; - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * Must be less than or equal to 1000. Defaults to 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * Must be less than or equal to 1000. Defaults to 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * Must be less than or equal to 1000. Defaults to 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - 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.dataproc.v1.ListAutoscalingPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) - private static final com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest(); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAutoscalingPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAutoscalingPoliciesRequest(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.dataproc.v1.ListAutoscalingPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequestOrBuilder.java deleted file mode 100644 index ae28d7ce..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface ListAutoscalingPoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.list`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.list`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The "resource name" of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.autoscalingPolicies.list`, the resource name
-   *   of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.list`, the resource name
-   *   of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of results to return in each response.
-   * Must be less than or equal to 1000. Defaults to 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponse.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponse.java deleted file mode 100644 index 60d48fe3..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponse.java +++ /dev/null @@ -1,1189 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A response to a request to list autoscaling policies in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse} - */ -public final class ListAutoscalingPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) - ListAutoscalingPoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAutoscalingPoliciesResponse.newBuilder() to construct. - private ListAutoscalingPoliciesResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAutoscalingPoliciesResponse() { - policies_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAutoscalingPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListAutoscalingPoliciesResponse( - 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)) { - policies_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage( - com.google.cloud.dataproc.v1.AutoscalingPolicy.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)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.class, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.Builder.class); - } - - public static final int POLICIES_FIELD_NUMBER = 1; - private java.util.List policies_; - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getPoliciesList() { - return policies_; - } - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getPoliciesOrBuilderList() { - return policies_; - } - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPoliciesOrBuilder(int index) { - return policies_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 < policies_.size(); i++) { - output.writeMessage(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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 < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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.dataproc.v1.ListAutoscalingPoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse other = - (com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) obj; - - if (!getPoliciesList().equals(other.getPoliciesList())) 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 (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().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.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse 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.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - 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.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse 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.dataproc.v1.ListAutoscalingPoliciesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse 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.dataproc.v1.ListAutoscalingPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse 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.dataproc.v1.ListAutoscalingPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A response to a request to list autoscaling policies in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.class, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policiesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse build() { - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse buildPartial() { - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse result = - new com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.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.dataproc.v1.ListAutoscalingPoliciesResponse) { - return mergeFrom((com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse other) { - if (other - == com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse.getDefaultInstance()) - return this; - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPoliciesFieldBuilder() - : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - 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.dataproc.v1.ListAutoscalingPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List policies_ = - java.util.Collections.emptyList(); - - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = - new java.util.ArrayList(policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - policiesBuilder_; - - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPolicies(int index, com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPolicies( - int index, com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies(com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies(int index, com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies( - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies( - int index, com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllPolicies( - java.lang.Iterable values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder getPoliciesBuilder(int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPoliciesOrBuilder(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder addPoliciesBuilder(int index) { - return getPoliciesFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder>( - policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policies_ = null; - } - return policiesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.dataproc.v1.ListAutoscalingPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) - private static final com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse(); - } - - public static com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAutoscalingPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAutoscalingPoliciesResponse(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.dataproc.v1.ListAutoscalingPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponseOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponseOrBuilder.java deleted file mode 100644 index c95513f9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface ListAutoscalingPoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPoliciesList(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicies(int index); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPoliciesCount(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getPoliciesOrBuilderList(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPoliciesOrBuilder(int index); - - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequest.java deleted file mode 100644 index 09cd5aa3..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequest.java +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to list batch workloads in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListBatchesRequest} - */ -public final class ListBatchesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListBatchesRequest) - ListBatchesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBatchesRequest.newBuilder() to construct. - private ListBatchesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBatchesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBatchesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListBatchesRequest( - 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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListBatchesRequest.class, - com.google.cloud.dataproc.v1.ListBatchesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent, which owns this collection of batches.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The parent, which owns this collection of batches.
-   * 
- * - * - * 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_; - /** - * - * - *
-   * Optional. The maximum number of batches to return in each response.
-   * The service may return fewer than this value.
-   * The default page size is 20; the maximum page size is 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Optional. A page token received from a previous `ListBatches` call.
-   * Provide this token to retrieve the subsequent page.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token received from a previous `ListBatches` call.
-   * Provide this token to retrieve the subsequent page.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += 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.dataproc.v1.ListBatchesRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListBatchesRequest other = - (com.google.cloud.dataproc.v1.ListBatchesRequest) 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.dataproc.v1.ListBatchesRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest 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.dataproc.v1.ListBatchesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest parseFrom( - 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.dataproc.v1.ListBatchesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest 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.dataproc.v1.ListBatchesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest 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.dataproc.v1.ListBatchesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest 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.dataproc.v1.ListBatchesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to list batch workloads in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListBatchesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListBatchesRequest) - com.google.cloud.dataproc.v1.ListBatchesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListBatchesRequest.class, - com.google.cloud.dataproc.v1.ListBatchesRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListBatchesRequest.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.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListBatchesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesRequest build() { - com.google.cloud.dataproc.v1.ListBatchesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesRequest buildPartial() { - com.google.cloud.dataproc.v1.ListBatchesRequest result = - new com.google.cloud.dataproc.v1.ListBatchesRequest(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.dataproc.v1.ListBatchesRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.ListBatchesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListBatchesRequest other) { - if (other == com.google.cloud.dataproc.v1.ListBatchesRequest.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.dataproc.v1.ListBatchesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ListBatchesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent, which owns this collection of batches.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The parent, which owns this collection of batches.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The parent, which owns this collection of batches.
-     * 
- * - * - * 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 parent, which owns this collection of batches.
-     * 
- * - * - * 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 parent, which owns this collection of batches.
-     * 
- * - * - * 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_; - /** - * - * - *
-     * Optional. The maximum number of batches to return in each response.
-     * The service may return fewer than this value.
-     * The default page size is 20; the maximum page size is 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of batches to return in each response.
-     * The service may return fewer than this value.
-     * The default page size is 20; the maximum page size is 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of batches to return in each response.
-     * The service may return fewer than this value.
-     * The default page size is 20; the maximum page size is 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token received from a previous `ListBatches` call.
-     * Provide this token to retrieve the subsequent page.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token received from a previous `ListBatches` call.
-     * Provide this token to retrieve the subsequent page.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token received from a previous `ListBatches` call.
-     * Provide this token to retrieve the subsequent page.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token received from a previous `ListBatches` call.
-     * Provide this token to retrieve the subsequent page.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token received from a previous `ListBatches` call.
-     * Provide this token to retrieve the subsequent page.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - 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.dataproc.v1.ListBatchesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListBatchesRequest) - private static final com.google.cloud.dataproc.v1.ListBatchesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListBatchesRequest(); - } - - public static com.google.cloud.dataproc.v1.ListBatchesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBatchesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBatchesRequest(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.dataproc.v1.ListBatchesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequestOrBuilder.java deleted file mode 100644 index 3f4c4c33..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesRequestOrBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface ListBatchesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListBatchesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent, which owns this collection of batches.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent, which owns this collection of batches.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of batches to return in each response.
-   * The service may return fewer than this value.
-   * The default page size is 20; the maximum page size is 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token received from a previous `ListBatches` call.
-   * Provide this token to retrieve the subsequent page.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token received from a previous `ListBatches` call.
-   * Provide this token to retrieve the subsequent page.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponse.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponse.java deleted file mode 100644 index 4106275b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponse.java +++ /dev/null @@ -1,1133 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A list of batch workloads.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListBatchesResponse} - */ -public final class ListBatchesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListBatchesResponse) - ListBatchesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListBatchesResponse.newBuilder() to construct. - private ListBatchesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListBatchesResponse() { - batches_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBatchesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListBatchesResponse( - 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)) { - batches_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - batches_.add( - input.readMessage( - com.google.cloud.dataproc.v1.Batch.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)) { - batches_ = java.util.Collections.unmodifiableList(batches_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListBatchesResponse.class, - com.google.cloud.dataproc.v1.ListBatchesResponse.Builder.class); - } - - public static final int BATCHES_FIELD_NUMBER = 1; - private java.util.List batches_; - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - @java.lang.Override - public java.util.List getBatchesList() { - return batches_; - } - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - @java.lang.Override - public java.util.List - getBatchesOrBuilderList() { - return batches_; - } - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - @java.lang.Override - public int getBatchesCount() { - return batches_.size(); - } - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Batch getBatches(int index) { - return batches_.get(index); - } - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.BatchOrBuilder getBatchesOrBuilder(int index) { - return batches_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < batches_.size(); i++) { - output.writeMessage(1, batches_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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 < batches_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, batches_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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.dataproc.v1.ListBatchesResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListBatchesResponse other = - (com.google.cloud.dataproc.v1.ListBatchesResponse) obj; - - if (!getBatchesList().equals(other.getBatchesList())) 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 (getBatchesCount() > 0) { - hash = (37 * hash) + BATCHES_FIELD_NUMBER; - hash = (53 * hash) + getBatchesList().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.dataproc.v1.ListBatchesResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse 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.dataproc.v1.ListBatchesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse parseFrom( - 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.dataproc.v1.ListBatchesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse 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.dataproc.v1.ListBatchesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse 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.dataproc.v1.ListBatchesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse 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.dataproc.v1.ListBatchesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A list of batch workloads.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListBatchesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListBatchesResponse) - com.google.cloud.dataproc.v1.ListBatchesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListBatchesResponse.class, - com.google.cloud.dataproc.v1.ListBatchesResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListBatchesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBatchesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (batchesBuilder_ == null) { - batches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - batchesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_ListBatchesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListBatchesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesResponse build() { - com.google.cloud.dataproc.v1.ListBatchesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListBatchesResponse buildPartial() { - com.google.cloud.dataproc.v1.ListBatchesResponse result = - new com.google.cloud.dataproc.v1.ListBatchesResponse(this); - int from_bitField0_ = bitField0_; - if (batchesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - batches_ = java.util.Collections.unmodifiableList(batches_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.batches_ = batches_; - } else { - result.batches_ = batchesBuilder_.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.dataproc.v1.ListBatchesResponse) { - return mergeFrom((com.google.cloud.dataproc.v1.ListBatchesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListBatchesResponse other) { - if (other == com.google.cloud.dataproc.v1.ListBatchesResponse.getDefaultInstance()) - return this; - if (batchesBuilder_ == null) { - if (!other.batches_.isEmpty()) { - if (batches_.isEmpty()) { - batches_ = other.batches_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBatchesIsMutable(); - batches_.addAll(other.batches_); - } - onChanged(); - } - } else { - if (!other.batches_.isEmpty()) { - if (batchesBuilder_.isEmpty()) { - batchesBuilder_.dispose(); - batchesBuilder_ = null; - batches_ = other.batches_; - bitField0_ = (bitField0_ & ~0x00000001); - batchesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBatchesFieldBuilder() - : null; - } else { - batchesBuilder_.addAllMessages(other.batches_); - } - } - } - 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.dataproc.v1.ListBatchesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ListBatchesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List batches_ = - java.util.Collections.emptyList(); - - private void ensureBatchesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - batches_ = new java.util.ArrayList(batches_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder> - batchesBuilder_; - - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public java.util.List getBatchesList() { - if (batchesBuilder_ == null) { - return java.util.Collections.unmodifiableList(batches_); - } else { - return batchesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public int getBatchesCount() { - if (batchesBuilder_ == null) { - return batches_.size(); - } else { - return batchesBuilder_.getCount(); - } - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public com.google.cloud.dataproc.v1.Batch getBatches(int index) { - if (batchesBuilder_ == null) { - return batches_.get(index); - } else { - return batchesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder setBatches(int index, com.google.cloud.dataproc.v1.Batch value) { - if (batchesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBatchesIsMutable(); - batches_.set(index, value); - onChanged(); - } else { - batchesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder setBatches( - int index, com.google.cloud.dataproc.v1.Batch.Builder builderForValue) { - if (batchesBuilder_ == null) { - ensureBatchesIsMutable(); - batches_.set(index, builderForValue.build()); - onChanged(); - } else { - batchesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder addBatches(com.google.cloud.dataproc.v1.Batch value) { - if (batchesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBatchesIsMutable(); - batches_.add(value); - onChanged(); - } else { - batchesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder addBatches(int index, com.google.cloud.dataproc.v1.Batch value) { - if (batchesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBatchesIsMutable(); - batches_.add(index, value); - onChanged(); - } else { - batchesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder addBatches(com.google.cloud.dataproc.v1.Batch.Builder builderForValue) { - if (batchesBuilder_ == null) { - ensureBatchesIsMutable(); - batches_.add(builderForValue.build()); - onChanged(); - } else { - batchesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder addBatches( - int index, com.google.cloud.dataproc.v1.Batch.Builder builderForValue) { - if (batchesBuilder_ == null) { - ensureBatchesIsMutable(); - batches_.add(index, builderForValue.build()); - onChanged(); - } else { - batchesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder addAllBatches( - java.lang.Iterable values) { - if (batchesBuilder_ == null) { - ensureBatchesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, batches_); - onChanged(); - } else { - batchesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder clearBatches() { - if (batchesBuilder_ == null) { - batches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - batchesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public Builder removeBatches(int index) { - if (batchesBuilder_ == null) { - ensureBatchesIsMutable(); - batches_.remove(index); - onChanged(); - } else { - batchesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public com.google.cloud.dataproc.v1.Batch.Builder getBatchesBuilder(int index) { - return getBatchesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public com.google.cloud.dataproc.v1.BatchOrBuilder getBatchesOrBuilder(int index) { - if (batchesBuilder_ == null) { - return batches_.get(index); - } else { - return batchesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public java.util.List - getBatchesOrBuilderList() { - if (batchesBuilder_ != null) { - return batchesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(batches_); - } - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public com.google.cloud.dataproc.v1.Batch.Builder addBatchesBuilder() { - return getBatchesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.Batch.getDefaultInstance()); - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public com.google.cloud.dataproc.v1.Batch.Builder addBatchesBuilder(int index) { - return getBatchesFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.Batch.getDefaultInstance()); - } - /** - * - * - *
-     * The batches from the specified collection.
-     * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - public java.util.List getBatchesBuilderList() { - return getBatchesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder> - getBatchesFieldBuilder() { - if (batchesBuilder_ == null) { - batchesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Batch, - com.google.cloud.dataproc.v1.Batch.Builder, - com.google.cloud.dataproc.v1.BatchOrBuilder>( - batches_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - batches_ = null; - } - return batchesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - 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.dataproc.v1.ListBatchesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListBatchesResponse) - private static final com.google.cloud.dataproc.v1.ListBatchesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListBatchesResponse(); - } - - public static com.google.cloud.dataproc.v1.ListBatchesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListBatchesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBatchesResponse(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.dataproc.v1.ListBatchesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponseOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponseOrBuilder.java deleted file mode 100644 index bc8cc883..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListBatchesResponseOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface ListBatchesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListBatchesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - java.util.List getBatchesList(); - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - com.google.cloud.dataproc.v1.Batch getBatches(int index); - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - int getBatchesCount(); - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - java.util.List getBatchesOrBuilderList(); - /** - * - * - *
-   * The batches from the specified collection.
-   * 
- * - * repeated .google.cloud.dataproc.v1.Batch batches = 1; - */ - com.google.cloud.dataproc.v1.BatchOrBuilder getBatchesOrBuilder(int index); - - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequest.java deleted file mode 100644 index 5d9143b6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequest.java +++ /dev/null @@ -1,1367 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to list the clusters in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListClustersRequest} - */ -public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListClustersRequest) - ListClustersRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListClustersRequest.newBuilder() to construct. - private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListClustersRequest() { - projectId_ = ""; - region_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListClustersRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListClustersRequest( - 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(); - - projectId_ = 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(); - - region_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListClustersRequest.class, - com.google.cloud.dataproc.v1.ListClustersRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 4; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Optional. A filter constraining the clusters to list. Filters are
-   * case-sensitive and have the following syntax:
-   * field = value [AND [field = value]] ...
-   * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-   * and `[KEY]` is a label key. **value** can be `*` to match all values.
-   * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-   * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-   * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-   * contains the `DELETING` and `ERROR` states.
-   * `clusterName` is the name of the cluster provided at creation time.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND clusterName = mycluster
-   * AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. A filter constraining the clusters to list. Filters are
-   * case-sensitive and have the following syntax:
-   * field = value [AND [field = value]] ...
-   * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-   * and `[KEY]` is a label key. **value** can be `*` to match all values.
-   * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-   * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-   * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-   * contains the `DELETING` and `ERROR` states.
-   * `clusterName` is the name of the cluster provided at creation time.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND clusterName = mycluster
-   * AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * Optional. The standard List page size.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Optional. The standard List page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The standard List page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - 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.dataproc.v1.ListClustersRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListClustersRequest other = - (com.google.cloud.dataproc.v1.ListClustersRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getFilter().equals(other.getFilter())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().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.dataproc.v1.ListClustersRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest 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.dataproc.v1.ListClustersRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest parseFrom( - 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.dataproc.v1.ListClustersRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest 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.dataproc.v1.ListClustersRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest 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.dataproc.v1.ListClustersRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest 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.dataproc.v1.ListClustersRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to list the clusters in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListClustersRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListClustersRequest) - com.google.cloud.dataproc.v1.ListClustersRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListClustersRequest.class, - com.google.cloud.dataproc.v1.ListClustersRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListClustersRequest.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(); - projectId_ = ""; - - region_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListClustersRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersRequest build() { - com.google.cloud.dataproc.v1.ListClustersRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersRequest buildPartial() { - com.google.cloud.dataproc.v1.ListClustersRequest result = - new com.google.cloud.dataproc.v1.ListClustersRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.filter_ = filter_; - 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.dataproc.v1.ListClustersRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.ListClustersRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListClustersRequest other) { - if (other == com.google.cloud.dataproc.v1.ListClustersRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.dataproc.v1.ListClustersRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ListClustersRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the cluster
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. A filter constraining the clusters to list. Filters are
-     * case-sensitive and have the following syntax:
-     * field = value [AND [field = value]] ...
-     * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-     * and `[KEY]` is a label key. **value** can be `*` to match all values.
-     * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-     * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-     * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-     * contains the `DELETING` and `ERROR` states.
-     * `clusterName` is the name of the cluster provided at creation time.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND clusterName = mycluster
-     * AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. A filter constraining the clusters to list. Filters are
-     * case-sensitive and have the following syntax:
-     * field = value [AND [field = value]] ...
-     * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-     * and `[KEY]` is a label key. **value** can be `*` to match all values.
-     * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-     * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-     * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-     * contains the `DELETING` and `ERROR` states.
-     * `clusterName` is the name of the cluster provided at creation time.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND clusterName = mycluster
-     * AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. A filter constraining the clusters to list. Filters are
-     * case-sensitive and have the following syntax:
-     * field = value [AND [field = value]] ...
-     * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-     * and `[KEY]` is a label key. **value** can be `*` to match all values.
-     * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-     * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-     * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-     * contains the `DELETING` and `ERROR` states.
-     * `clusterName` is the name of the cluster provided at creation time.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND clusterName = mycluster
-     * AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. A filter constraining the clusters to list. Filters are
-     * case-sensitive and have the following syntax:
-     * field = value [AND [field = value]] ...
-     * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-     * and `[KEY]` is a label key. **value** can be `*` to match all values.
-     * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-     * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-     * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-     * contains the `DELETING` and `ERROR` states.
-     * `clusterName` is the name of the cluster provided at creation time.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND clusterName = mycluster
-     * AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A filter constraining the clusters to list. Filters are
-     * case-sensitive and have the following syntax:
-     * field = value [AND [field = value]] ...
-     * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-     * and `[KEY]` is a label key. **value** can be `*` to match all values.
-     * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-     * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-     * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-     * contains the `DELETING` and `ERROR` states.
-     * `clusterName` is the name of the cluster provided at creation time.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND clusterName = mycluster
-     * AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 int pageSize_; - /** - * - * - *
-     * Optional. The standard List page size.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The standard List page size.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The standard List page size.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. The standard List page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The standard List page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The standard List page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The standard List page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The standard List page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - 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.dataproc.v1.ListClustersRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListClustersRequest) - private static final com.google.cloud.dataproc.v1.ListClustersRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListClustersRequest(); - } - - public static com.google.cloud.dataproc.v1.ListClustersRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListClustersRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListClustersRequest(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.dataproc.v1.ListClustersRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequestOrBuilder.java deleted file mode 100644 index 312d3b7c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequestOrBuilder.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ListClustersRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListClustersRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the cluster
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Optional. A filter constraining the clusters to list. Filters are
-   * case-sensitive and have the following syntax:
-   * field = value [AND [field = value]] ...
-   * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-   * and `[KEY]` is a label key. **value** can be `*` to match all values.
-   * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-   * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-   * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-   * contains the `DELETING` and `ERROR` states.
-   * `clusterName` is the name of the cluster provided at creation time.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND clusterName = mycluster
-   * AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. A filter constraining the clusters to list. Filters are
-   * case-sensitive and have the following syntax:
-   * field = value [AND [field = value]] ...
-   * where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`,
-   * and `[KEY]` is a label key. **value** can be `*` to match all values.
-   * `status.state` can be one of the following: `ACTIVE`, `INACTIVE`,
-   * `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE`
-   * contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
-   * contains the `DELETING` and `ERROR` states.
-   * `clusterName` is the name of the cluster provided at creation time.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND clusterName = mycluster
-   * AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Optional. The standard List page size.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. The standard List page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. The standard List page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponse.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponse.java deleted file mode 100644 index 4fcfb831..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponse.java +++ /dev/null @@ -1,1187 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The list of all clusters in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListClustersResponse} - */ -public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListClustersResponse) - ListClustersResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListClustersResponse.newBuilder() to construct. - private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListClustersResponse() { - clusters_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListClustersResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListClustersResponse( - 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)) { - clusters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - clusters_.add( - input.readMessage( - com.google.cloud.dataproc.v1.Cluster.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)) { - clusters_ = java.util.Collections.unmodifiableList(clusters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListClustersResponse.class, - com.google.cloud.dataproc.v1.ListClustersResponse.Builder.class); - } - - public static final int CLUSTERS_FIELD_NUMBER = 1; - private java.util.List clusters_; - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getClustersList() { - return clusters_; - } - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getClustersOrBuilderList() { - return clusters_; - } - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getClustersCount() { - return clusters_.size(); - } - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster getClusters(int index) { - return clusters_.get(index); - } - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClustersOrBuilder(int index) { - return clusters_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent `ListClustersRequest`.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent `ListClustersRequest`.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 < clusters_.size(); i++) { - output.writeMessage(1, clusters_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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 < clusters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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.dataproc.v1.ListClustersResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListClustersResponse other = - (com.google.cloud.dataproc.v1.ListClustersResponse) obj; - - if (!getClustersList().equals(other.getClustersList())) 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 (getClustersCount() > 0) { - hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; - hash = (53 * hash) + getClustersList().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.dataproc.v1.ListClustersResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse 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.dataproc.v1.ListClustersResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse parseFrom( - 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.dataproc.v1.ListClustersResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse 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.dataproc.v1.ListClustersResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse 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.dataproc.v1.ListClustersResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse 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.dataproc.v1.ListClustersResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 list of all clusters in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListClustersResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListClustersResponse) - com.google.cloud.dataproc.v1.ListClustersResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListClustersResponse.class, - com.google.cloud.dataproc.v1.ListClustersResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListClustersResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getClustersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (clustersBuilder_ == null) { - clusters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - clustersBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ListClustersResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListClustersResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersResponse build() { - com.google.cloud.dataproc.v1.ListClustersResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListClustersResponse buildPartial() { - com.google.cloud.dataproc.v1.ListClustersResponse result = - new com.google.cloud.dataproc.v1.ListClustersResponse(this); - int from_bitField0_ = bitField0_; - if (clustersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - clusters_ = java.util.Collections.unmodifiableList(clusters_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.clusters_ = clusters_; - } else { - result.clusters_ = clustersBuilder_.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.dataproc.v1.ListClustersResponse) { - return mergeFrom((com.google.cloud.dataproc.v1.ListClustersResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListClustersResponse other) { - if (other == com.google.cloud.dataproc.v1.ListClustersResponse.getDefaultInstance()) - return this; - if (clustersBuilder_ == null) { - if (!other.clusters_.isEmpty()) { - if (clusters_.isEmpty()) { - clusters_ = other.clusters_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureClustersIsMutable(); - clusters_.addAll(other.clusters_); - } - onChanged(); - } - } else { - if (!other.clusters_.isEmpty()) { - if (clustersBuilder_.isEmpty()) { - clustersBuilder_.dispose(); - clustersBuilder_ = null; - clusters_ = other.clusters_; - bitField0_ = (bitField0_ & ~0x00000001); - clustersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getClustersFieldBuilder() - : null; - } else { - clustersBuilder_.addAllMessages(other.clusters_); - } - } - } - 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.dataproc.v1.ListClustersResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ListClustersResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List clusters_ = - java.util.Collections.emptyList(); - - private void ensureClustersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - clusters_ = new java.util.ArrayList(clusters_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - clustersBuilder_; - - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getClustersList() { - if (clustersBuilder_ == null) { - return java.util.Collections.unmodifiableList(clusters_); - } else { - return clustersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getClustersCount() { - if (clustersBuilder_ == null) { - return clusters_.size(); - } else { - return clustersBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Cluster getClusters(int index) { - if (clustersBuilder_ == null) { - return clusters_.get(index); - } else { - return clustersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setClusters(int index, com.google.cloud.dataproc.v1.Cluster value) { - if (clustersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureClustersIsMutable(); - clusters_.set(index, value); - onChanged(); - } else { - clustersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setClusters( - int index, com.google.cloud.dataproc.v1.Cluster.Builder builderForValue) { - if (clustersBuilder_ == null) { - ensureClustersIsMutable(); - clusters_.set(index, builderForValue.build()); - onChanged(); - } else { - clustersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(com.google.cloud.dataproc.v1.Cluster value) { - if (clustersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureClustersIsMutable(); - clusters_.add(value); - onChanged(); - } else { - clustersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(int index, com.google.cloud.dataproc.v1.Cluster value) { - if (clustersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureClustersIsMutable(); - clusters_.add(index, value); - onChanged(); - } else { - clustersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(com.google.cloud.dataproc.v1.Cluster.Builder builderForValue) { - if (clustersBuilder_ == null) { - ensureClustersIsMutable(); - clusters_.add(builderForValue.build()); - onChanged(); - } else { - clustersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters( - int index, com.google.cloud.dataproc.v1.Cluster.Builder builderForValue) { - if (clustersBuilder_ == null) { - ensureClustersIsMutable(); - clusters_.add(index, builderForValue.build()); - onChanged(); - } else { - clustersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllClusters( - java.lang.Iterable values) { - if (clustersBuilder_ == null) { - ensureClustersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusters_); - onChanged(); - } else { - clustersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearClusters() { - if (clustersBuilder_ == null) { - clusters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - clustersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeClusters(int index) { - if (clustersBuilder_ == null) { - ensureClustersIsMutable(); - clusters_.remove(index); - onChanged(); - } else { - clustersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Cluster.Builder getClustersBuilder(int index) { - return getClustersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClustersOrBuilder(int index) { - if (clustersBuilder_ == null) { - return clusters_.get(index); - } else { - return clustersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getClustersOrBuilderList() { - if (clustersBuilder_ != null) { - return clustersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(clusters_); - } - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Cluster.Builder addClustersBuilder() { - return getClustersFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.Cluster.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Cluster.Builder addClustersBuilder(int index) { - return getClustersFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.Cluster.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getClustersBuilderList() { - return getClustersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - getClustersFieldBuilder() { - if (clustersBuilder_ == null) { - clustersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder>( - clusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - clusters_ = null; - } - return clustersBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent `ListClustersRequest`.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent `ListClustersRequest`.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent `ListClustersRequest`.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent `ListClustersRequest`.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent `ListClustersRequest`.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.dataproc.v1.ListClustersResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListClustersResponse) - private static final com.google.cloud.dataproc.v1.ListClustersResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListClustersResponse(); - } - - public static com.google.cloud.dataproc.v1.ListClustersResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListClustersResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListClustersResponse(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.dataproc.v1.ListClustersResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponseOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponseOrBuilder.java deleted file mode 100644 index d3593d13..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponseOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ListClustersResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListClustersResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getClustersList(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.Cluster getClusters(int index); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getClustersCount(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getClustersOrBuilderList(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOrBuilder getClustersOrBuilder(int index); - - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent `ListClustersRequest`.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent `ListClustersRequest`.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequest.java deleted file mode 100644 index 965f8861..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequest.java +++ /dev/null @@ -1,1870 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to list jobs in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListJobsRequest} - */ -public final class ListJobsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListJobsRequest) - ListJobsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListJobsRequest.newBuilder() to construct. - private ListJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListJobsRequest() { - projectId_ = ""; - region_ = ""; - pageToken_ = ""; - clusterName_ = ""; - jobStateMatcher_ = 0; - filter_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListJobsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListJobsRequest( - 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(); - - projectId_ = 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(); - - clusterName_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - jobStateMatcher_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListJobsRequest.class, - com.google.cloud.dataproc.v1.ListJobsRequest.Builder.class); - } - - /** - * - * - *
-   * A matcher that specifies categories of job states.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher} - */ - public enum JobStateMatcher implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Match all jobs, regardless of state.
-     * 
- * - * ALL = 0; - */ - ALL(0), - /** - * - * - *
-     * Only match jobs in non-terminal states: PENDING, RUNNING, or
-     * CANCEL_PENDING.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - /** - * - * - *
-     * Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
-     * 
- * - * NON_ACTIVE = 2; - */ - NON_ACTIVE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Match all jobs, regardless of state.
-     * 
- * - * ALL = 0; - */ - public static final int ALL_VALUE = 0; - /** - * - * - *
-     * Only match jobs in non-terminal states: PENDING, RUNNING, or
-     * CANCEL_PENDING.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - /** - * - * - *
-     * Only match jobs in terminal states: CANCELLED, DONE, or ERROR.
-     * 
- * - * NON_ACTIVE = 2; - */ - public static final int NON_ACTIVE_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 JobStateMatcher 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 JobStateMatcher forNumber(int value) { - switch (value) { - case 0: - return ALL; - case 1: - return ACTIVE; - case 2: - return NON_ACTIVE; - 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 JobStateMatcher findValueByNumber(int number) { - return JobStateMatcher.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.dataproc.v1.ListJobsRequest.getDescriptor().getEnumTypes().get(0); - } - - private static final JobStateMatcher[] VALUES = values(); - - public static JobStateMatcher 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 JobStateMatcher(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher) - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 6; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * Optional. The number of results to return in each response.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Optional. If set, the returned jobs list includes only jobs that were
-   * submitted to the named cluster.
-   * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. If set, the returned jobs list includes only jobs that were
-   * submitted to the named cluster.
-   * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_STATE_MATCHER_FIELD_NUMBER = 5; - private int jobStateMatcher_; - /** - * - * - *
-   * Optional. Specifies enumerated categories of jobs to list.
-   * (default = match ALL jobs).
-   * If `filter` is provided, `jobStateMatcher` will be ignored.
-   * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for jobStateMatcher. - */ - @java.lang.Override - public int getJobStateMatcherValue() { - return jobStateMatcher_; - } - /** - * - * - *
-   * Optional. Specifies enumerated categories of jobs to list.
-   * (default = match ALL jobs).
-   * If `filter` is provided, `jobStateMatcher` will be ignored.
-   * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher getJobStateMatcher() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher result = - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.valueOf(jobStateMatcher_); - return result == null - ? com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.UNRECOGNIZED - : result; - } - - public static final int FILTER_FIELD_NUMBER = 7; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Optional. A filter constraining the jobs to list. Filters are
-   * case-sensitive and have the following syntax:
-   * [field = value] AND [field [= value]] ...
-   * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-   * key. **value** can be `*` to match all values.
-   * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. A filter constraining the jobs to list. Filters are
-   * case-sensitive and have the following syntax:
-   * [field = value] AND [field [= value]] ...
-   * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-   * key. **value** can be `*` to match all values.
-   * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterName_); - } - if (jobStateMatcher_ - != com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.ALL.getNumber()) { - output.writeEnum(5, jobStateMatcher_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterName_); - } - if (jobStateMatcher_ - != com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.ALL.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, jobStateMatcher_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); - } - 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.dataproc.v1.ListJobsRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListJobsRequest other = - (com.google.cloud.dataproc.v1.ListJobsRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (jobStateMatcher_ != other.jobStateMatcher_) return false; - if (!getFilter().equals(other.getFilter())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().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) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + JOB_STATE_MATCHER_FIELD_NUMBER; - hash = (53 * hash) + jobStateMatcher_; - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest 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.dataproc.v1.ListJobsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest parseFrom( - 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.dataproc.v1.ListJobsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest 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.dataproc.v1.ListJobsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest 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.dataproc.v1.ListJobsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest 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.dataproc.v1.ListJobsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to list jobs in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListJobsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListJobsRequest) - com.google.cloud.dataproc.v1.ListJobsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListJobsRequest.class, - com.google.cloud.dataproc.v1.ListJobsRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListJobsRequest.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(); - projectId_ = ""; - - region_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - clusterName_ = ""; - - jobStateMatcher_ = 0; - - filter_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListJobsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsRequest build() { - com.google.cloud.dataproc.v1.ListJobsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsRequest buildPartial() { - com.google.cloud.dataproc.v1.ListJobsRequest result = - new com.google.cloud.dataproc.v1.ListJobsRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.clusterName_ = clusterName_; - result.jobStateMatcher_ = jobStateMatcher_; - result.filter_ = filter_; - 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.dataproc.v1.ListJobsRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.ListJobsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListJobsRequest other) { - if (other == com.google.cloud.dataproc.v1.ListJobsRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (other.jobStateMatcher_ != 0) { - setJobStateMatcherValue(other.getJobStateMatcherValue()); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - 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.dataproc.v1.ListJobsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ListJobsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Optional. If set, the returned jobs list includes only jobs that were
-     * submitted to the named cluster.
-     * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. If set, the returned jobs list includes only jobs that were
-     * submitted to the named cluster.
-     * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. If set, the returned jobs list includes only jobs that were
-     * submitted to the named cluster.
-     * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If set, the returned jobs list includes only jobs that were
-     * submitted to the named cluster.
-     * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If set, the returned jobs list includes only jobs that were
-     * submitted to the named cluster.
-     * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private int jobStateMatcher_ = 0; - /** - * - * - *
-     * Optional. Specifies enumerated categories of jobs to list.
-     * (default = match ALL jobs).
-     * If `filter` is provided, `jobStateMatcher` will be ignored.
-     * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for jobStateMatcher. - */ - @java.lang.Override - public int getJobStateMatcherValue() { - return jobStateMatcher_; - } - /** - * - * - *
-     * Optional. Specifies enumerated categories of jobs to list.
-     * (default = match ALL jobs).
-     * If `filter` is provided, `jobStateMatcher` will be ignored.
-     * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for jobStateMatcher to set. - * @return This builder for chaining. - */ - public Builder setJobStateMatcherValue(int value) { - - jobStateMatcher_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies enumerated categories of jobs to list.
-     * (default = match ALL jobs).
-     * If `filter` is provided, `jobStateMatcher` will be ignored.
-     * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher getJobStateMatcher() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher result = - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.valueOf(jobStateMatcher_); - return result == null - ? com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. Specifies enumerated categories of jobs to list.
-     * (default = match ALL jobs).
-     * If `filter` is provided, `jobStateMatcher` will be ignored.
-     * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The jobStateMatcher to set. - * @return This builder for chaining. - */ - public Builder setJobStateMatcher( - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher value) { - if (value == null) { - throw new NullPointerException(); - } - - jobStateMatcher_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifies enumerated categories of jobs to list.
-     * (default = match ALL jobs).
-     * If `filter` is provided, `jobStateMatcher` will be ignored.
-     * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearJobStateMatcher() { - - jobStateMatcher_ = 0; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Optional. A filter constraining the jobs to list. Filters are
-     * case-sensitive and have the following syntax:
-     * [field = value] AND [field [= value]] ...
-     * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-     * key. **value** can be `*` to match all values.
-     * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. A filter constraining the jobs to list. Filters are
-     * case-sensitive and have the following syntax:
-     * [field = value] AND [field [= value]] ...
-     * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-     * key. **value** can be `*` to match all values.
-     * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. A filter constraining the jobs to list. Filters are
-     * case-sensitive and have the following syntax:
-     * [field = value] AND [field [= value]] ...
-     * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-     * key. **value** can be `*` to match all values.
-     * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. A filter constraining the jobs to list. Filters are
-     * case-sensitive and have the following syntax:
-     * [field = value] AND [field [= value]] ...
-     * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-     * key. **value** can be `*` to match all values.
-     * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A filter constraining the jobs to list. Filters are
-     * case-sensitive and have the following syntax:
-     * [field = value] AND [field [= value]] ...
-     * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-     * key. **value** can be `*` to match all values.
-     * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-     * Only the logical `AND` operator is supported; space-separated items are
-     * treated as having an implicit `AND` operator.
-     * Example filter:
-     * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-     * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.ListJobsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListJobsRequest) - private static final com.google.cloud.dataproc.v1.ListJobsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListJobsRequest(); - } - - public static com.google.cloud.dataproc.v1.ListJobsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListJobsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobsRequest(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.dataproc.v1.ListJobsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequestOrBuilder.java deleted file mode 100644 index f2f3c5f0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequestOrBuilder.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface ListJobsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListJobsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Optional. The number of results to return in each response.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Optional. If set, the returned jobs list includes only jobs that were
-   * submitted to the named cluster.
-   * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Optional. If set, the returned jobs list includes only jobs that were
-   * submitted to the named cluster.
-   * 
- * - * string cluster_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Optional. Specifies enumerated categories of jobs to list.
-   * (default = match ALL jobs).
-   * If `filter` is provided, `jobStateMatcher` will be ignored.
-   * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for jobStateMatcher. - */ - int getJobStateMatcherValue(); - /** - * - * - *
-   * Optional. Specifies enumerated categories of jobs to list.
-   * (default = match ALL jobs).
-   * If `filter` is provided, `jobStateMatcher` will be ignored.
-   * 
- * - * - * .google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher getJobStateMatcher(); - - /** - * - * - *
-   * Optional. A filter constraining the jobs to list. Filters are
-   * case-sensitive and have the following syntax:
-   * [field = value] AND [field [= value]] ...
-   * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-   * key. **value** can be `*` to match all values.
-   * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Optional. A filter constraining the jobs to list. Filters are
-   * case-sensitive and have the following syntax:
-   * [field = value] AND [field [= value]] ...
-   * where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
-   * key. **value** can be `*` to match all values.
-   * `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
-   * Only the logical `AND` operator is supported; space-separated items are
-   * treated as having an implicit `AND` operator.
-   * Example filter:
-   * status.state = ACTIVE AND labels.env = staging AND labels.starred = *
-   * 
- * - * string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponse.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponse.java deleted file mode 100644 index 81d200aa..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponse.java +++ /dev/null @@ -1,1182 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A list of jobs in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListJobsResponse} - */ -public final class ListJobsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListJobsResponse) - ListJobsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListJobsResponse.newBuilder() to construct. - private ListJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListJobsResponse() { - jobs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListJobsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListJobsResponse( - 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)) { - jobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - jobs_.add( - input.readMessage(com.google.cloud.dataproc.v1.Job.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)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListJobsResponse.class, - com.google.cloud.dataproc.v1.ListJobsResponse.Builder.class); - } - - public static final int JOBS_FIELD_NUMBER = 1; - private java.util.List jobs_; - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getJobsList() { - return jobs_; - } - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getJobsOrBuilderList() { - return jobs_; - } - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getJobsCount() { - return jobs_.size(); - } - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Job getJobs(int index) { - return jobs_.get(index); - } - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobOrBuilder getJobsOrBuilder(int index) { - return jobs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Optional. This token is included in the response if there are more results
-   * to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent <code>ListJobsRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. This token is included in the response if there are more results
-   * to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent <code>ListJobsRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 < jobs_.size(); i++) { - output.writeMessage(1, jobs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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 < jobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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.dataproc.v1.ListJobsResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListJobsResponse other = - (com.google.cloud.dataproc.v1.ListJobsResponse) obj; - - if (!getJobsList().equals(other.getJobsList())) 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 (getJobsCount() > 0) { - hash = (37 * hash) + JOBS_FIELD_NUMBER; - hash = (53 * hash) + getJobsList().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.dataproc.v1.ListJobsResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse 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.dataproc.v1.ListJobsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse parseFrom( - 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.dataproc.v1.ListJobsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse 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.dataproc.v1.ListJobsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse 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.dataproc.v1.ListJobsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse 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.dataproc.v1.ListJobsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A list of jobs in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListJobsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListJobsResponse) - com.google.cloud.dataproc.v1.ListJobsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListJobsResponse.class, - com.google.cloud.dataproc.v1.ListJobsResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListJobsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getJobsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - jobsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_ListJobsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListJobsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsResponse build() { - com.google.cloud.dataproc.v1.ListJobsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListJobsResponse buildPartial() { - com.google.cloud.dataproc.v1.ListJobsResponse result = - new com.google.cloud.dataproc.v1.ListJobsResponse(this); - int from_bitField0_ = bitField0_; - if (jobsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.jobs_ = jobs_; - } else { - result.jobs_ = jobsBuilder_.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.dataproc.v1.ListJobsResponse) { - return mergeFrom((com.google.cloud.dataproc.v1.ListJobsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListJobsResponse other) { - if (other == com.google.cloud.dataproc.v1.ListJobsResponse.getDefaultInstance()) return this; - if (jobsBuilder_ == null) { - if (!other.jobs_.isEmpty()) { - if (jobs_.isEmpty()) { - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureJobsIsMutable(); - jobs_.addAll(other.jobs_); - } - onChanged(); - } - } else { - if (!other.jobs_.isEmpty()) { - if (jobsBuilder_.isEmpty()) { - jobsBuilder_.dispose(); - jobsBuilder_ = null; - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000001); - jobsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getJobsFieldBuilder() - : null; - } else { - jobsBuilder_.addAllMessages(other.jobs_); - } - } - } - 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.dataproc.v1.ListJobsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ListJobsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List jobs_ = - java.util.Collections.emptyList(); - - private void ensureJobsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - jobs_ = new java.util.ArrayList(jobs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - jobsBuilder_; - - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getJobsList() { - if (jobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(jobs_); - } else { - return jobsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getJobsCount() { - if (jobsBuilder_ == null) { - return jobs_.size(); - } else { - return jobsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Job getJobs(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setJobs(int index, com.google.cloud.dataproc.v1.Job value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.set(index, value); - onChanged(); - } else { - jobsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setJobs(int index, com.google.cloud.dataproc.v1.Job.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.set(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1.Job value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(value); - onChanged(); - } else { - jobsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(int index, com.google.cloud.dataproc.v1.Job value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(index, value); - onChanged(); - } else { - jobsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1.Job.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(int index, com.google.cloud.dataproc.v1.Job.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllJobs( - java.lang.Iterable values) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); - onChanged(); - } else { - jobsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearJobs() { - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - jobsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeJobs(int index) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.remove(index); - onChanged(); - } else { - jobsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Job.Builder getJobsBuilder(int index) { - return getJobsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.JobOrBuilder getJobsOrBuilder(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getJobsOrBuilderList() { - if (jobsBuilder_ != null) { - return jobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jobs_); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Job.Builder addJobsBuilder() { - return getJobsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.Job.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.Job.Builder addJobsBuilder(int index) { - return getJobsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.Job.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getJobsBuilderList() { - return getJobsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - getJobsFieldBuilder() { - if (jobsBuilder_ == null) { - jobsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder>( - jobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - jobs_ = null; - } - return jobsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Optional. This token is included in the response if there are more results
-     * to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent <code>ListJobsRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. This token is included in the response if there are more results
-     * to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent <code>ListJobsRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. This token is included in the response if there are more results
-     * to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent <code>ListJobsRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. This token is included in the response if there are more results
-     * to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent <code>ListJobsRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. This token is included in the response if there are more results
-     * to fetch. To fetch additional results, provide this value as the
-     * `page_token` in a subsequent <code>ListJobsRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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.dataproc.v1.ListJobsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListJobsResponse) - private static final com.google.cloud.dataproc.v1.ListJobsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListJobsResponse(); - } - - public static com.google.cloud.dataproc.v1.ListJobsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListJobsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobsResponse(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.dataproc.v1.ListJobsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponseOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponseOrBuilder.java deleted file mode 100644 index 4da048ec..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponseOrBuilder.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface ListJobsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListJobsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getJobsList(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.Job getJobs(int index); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getJobsCount(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getJobsOrBuilderList(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.JobOrBuilder getJobsOrBuilder(int index); - - /** - * - * - *
-   * Optional. This token is included in the response if there are more results
-   * to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent <code>ListJobsRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Optional. This token is included in the response if there are more results
-   * to fetch. To fetch additional results, provide this value as the
-   * `page_token` in a subsequent <code>ListJobsRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequest.java deleted file mode 100644 index abbdffc5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequest.java +++ /dev/null @@ -1,976 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to list workflow templates in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListWorkflowTemplatesRequest} - */ -public final class ListWorkflowTemplatesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) - ListWorkflowTemplatesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowTemplatesRequest.newBuilder() to construct. - private ListWorkflowTemplatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowTemplatesRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowTemplatesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListWorkflowTemplatesRequest( - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.class, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,list`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.list`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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 name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,list`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.list`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * 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_; - /** - * - * - *
-   * Optional. The maximum number of results to return in each response.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += 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.dataproc.v1.ListWorkflowTemplatesRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest other = - (com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) 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.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest 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.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - 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.dataproc.v1.ListWorkflowTemplatesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest 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.dataproc.v1.ListWorkflowTemplatesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest 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.dataproc.v1.ListWorkflowTemplatesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest 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.dataproc.v1.ListWorkflowTemplatesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to list workflow templates in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListWorkflowTemplatesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.class, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest build() { - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest buildPartial() { - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest result = - new com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest(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.dataproc.v1.ListWorkflowTemplatesRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest other) { - if (other == com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest.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.dataproc.v1.ListWorkflowTemplatesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,list`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.list`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,list`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.list`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,list`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.list`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,list`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.list`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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 name of the region or location, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates,list`, the resource
-     *   name of the region has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.workflowTemplates.list`, the
-     *   resource name of the location has the following format:
-     *   `projects/{project_id}/locations/{location}`
-     * 
- * - * - * 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_; - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of results to return in each response.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The page token, returned by a previous call, to request the
-     * next page of results.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - 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.dataproc.v1.ListWorkflowTemplatesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) - private static final com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest(); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowTemplatesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListWorkflowTemplatesRequest(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.dataproc.v1.ListWorkflowTemplatesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequestOrBuilder.java deleted file mode 100644 index 91656df4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequestOrBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ListWorkflowTemplatesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListWorkflowTemplatesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,list`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.list`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource name of the region or location, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates,list`, the resource
-   *   name of the region has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.workflowTemplates.list`, the
-   *   resource name of the location has the following format:
-   *   `projects/{project_id}/locations/{location}`
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of results to return in each response.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. The page token, returned by a previous call, to request the
-   * next page of results.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponse.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponse.java deleted file mode 100644 index 7bad489a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponse.java +++ /dev/null @@ -1,1192 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A response to a request to list workflow templates in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListWorkflowTemplatesResponse} - */ -public final class ListWorkflowTemplatesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) - ListWorkflowTemplatesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowTemplatesResponse.newBuilder() to construct. - private ListWorkflowTemplatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowTemplatesResponse() { - templates_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowTemplatesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListWorkflowTemplatesResponse( - 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)) { - templates_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - templates_.add( - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowTemplate.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)) { - templates_ = java.util.Collections.unmodifiableList(templates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.class, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.Builder.class); - } - - public static final int TEMPLATES_FIELD_NUMBER = 1; - private java.util.List templates_; - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getTemplatesList() { - return templates_; - } - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getTemplatesOrBuilderList() { - return templates_; - } - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getTemplatesCount() { - return templates_.size(); - } - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplates(int index) { - return templates_.get(index); - } - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplatesOrBuilder(int index) { - return templates_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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 < templates_.size(); i++) { - output.writeMessage(1, templates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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 < templates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, templates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - 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.dataproc.v1.ListWorkflowTemplatesResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse other = - (com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) obj; - - if (!getTemplatesList().equals(other.getTemplatesList())) 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 (getTemplatesCount() > 0) { - hash = (37 * hash) + TEMPLATES_FIELD_NUMBER; - hash = (53 * hash) + getTemplatesList().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.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse 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.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - 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.dataproc.v1.ListWorkflowTemplatesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse 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.dataproc.v1.ListWorkflowTemplatesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse 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.dataproc.v1.ListWorkflowTemplatesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse 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.dataproc.v1.ListWorkflowTemplatesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A response to a request to list workflow templates in a project.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ListWorkflowTemplatesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.class, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTemplatesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (templatesBuilder_ == null) { - templates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - templatesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse build() { - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse buildPartial() { - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse result = - new com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse(this); - int from_bitField0_ = bitField0_; - if (templatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - templates_ = java.util.Collections.unmodifiableList(templates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.templates_ = templates_; - } else { - result.templates_ = templatesBuilder_.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.dataproc.v1.ListWorkflowTemplatesResponse) { - return mergeFrom((com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse other) { - if (other == com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse.getDefaultInstance()) - return this; - if (templatesBuilder_ == null) { - if (!other.templates_.isEmpty()) { - if (templates_.isEmpty()) { - templates_ = other.templates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTemplatesIsMutable(); - templates_.addAll(other.templates_); - } - onChanged(); - } - } else { - if (!other.templates_.isEmpty()) { - if (templatesBuilder_.isEmpty()) { - templatesBuilder_.dispose(); - templatesBuilder_ = null; - templates_ = other.templates_; - bitField0_ = (bitField0_ & ~0x00000001); - templatesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTemplatesFieldBuilder() - : null; - } else { - templatesBuilder_.addAllMessages(other.templates_); - } - } - } - 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.dataproc.v1.ListWorkflowTemplatesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List templates_ = - java.util.Collections.emptyList(); - - private void ensureTemplatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - templates_ = - new java.util.ArrayList(templates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - templatesBuilder_; - - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getTemplatesList() { - if (templatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(templates_); - } else { - return templatesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getTemplatesCount() { - if (templatesBuilder_ == null) { - return templates_.size(); - } else { - return templatesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplates(int index) { - if (templatesBuilder_ == null) { - return templates_.get(index); - } else { - return templatesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setTemplates(int index, com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTemplatesIsMutable(); - templates_.set(index, value); - onChanged(); - } else { - templatesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setTemplates( - int index, com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templatesBuilder_ == null) { - ensureTemplatesIsMutable(); - templates_.set(index, builderForValue.build()); - onChanged(); - } else { - templatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTemplatesIsMutable(); - templates_.add(value); - onChanged(); - } else { - templatesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates(int index, com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTemplatesIsMutable(); - templates_.add(index, value); - onChanged(); - } else { - templatesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates( - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templatesBuilder_ == null) { - ensureTemplatesIsMutable(); - templates_.add(builderForValue.build()); - onChanged(); - } else { - templatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates( - int index, com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templatesBuilder_ == null) { - ensureTemplatesIsMutable(); - templates_.add(index, builderForValue.build()); - onChanged(); - } else { - templatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllTemplates( - java.lang.Iterable values) { - if (templatesBuilder_ == null) { - ensureTemplatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, templates_); - onChanged(); - } else { - templatesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearTemplates() { - if (templatesBuilder_ == null) { - templates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - templatesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeTemplates(int index) { - if (templatesBuilder_ == null) { - ensureTemplatesIsMutable(); - templates_.remove(index); - onChanged(); - } else { - templatesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder getTemplatesBuilder(int index) { - return getTemplatesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplatesOrBuilder(int index) { - if (templatesBuilder_ == null) { - return templates_.get(index); - } else { - return templatesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getTemplatesOrBuilderList() { - if (templatesBuilder_ != null) { - return templatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(templates_); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder addTemplatesBuilder() { - return getTemplatesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder addTemplatesBuilder(int index) { - return getTemplatesFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getTemplatesBuilderList() { - return getTemplatesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - getTemplatesFieldBuilder() { - if (templatesBuilder_ == null) { - templatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder>( - templates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - templates_ = null; - } - return templatesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. This token is included in the response if there are more
-     * results to fetch. To fetch additional results, provide this value as the
-     * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-     * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.dataproc.v1.ListWorkflowTemplatesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) - private static final com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse(); - } - - public static com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowTemplatesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListWorkflowTemplatesResponse(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.dataproc.v1.ListWorkflowTemplatesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponseOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponseOrBuilder.java deleted file mode 100644 index bc48c332..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponseOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ListWorkflowTemplatesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ListWorkflowTemplatesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getTemplatesList(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplate getTemplates(int index); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getTemplatesCount(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getTemplatesOrBuilderList(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplatesOrBuilder(int index); - - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * Output only. This token is included in the response if there are more
-   * results to fetch. To fetch additional results, provide this value as the
-   * page_token in a subsequent <code>ListWorkflowTemplatesRequest</code>.
-   * 
- * - * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java deleted file mode 100644 index 3539c904..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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.dataproc.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 LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - 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 (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.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); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfig.java deleted file mode 100644 index c64e22d8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfig.java +++ /dev/null @@ -1,1339 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The runtime logging config of the job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.LoggingConfig} - */ -public final class LoggingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.LoggingConfig) - LoggingConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use LoggingConfig.newBuilder() to construct. - private LoggingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private LoggingConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new LoggingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LoggingConfig( - 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 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - driverLogLevels_ = - com.google.protobuf.MapField.newMapField( - DriverLogLevelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry driverLogLevels__ = - input.readMessage( - DriverLogLevelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - driverLogLevels_ - .getMutableMap() - .put(driverLogLevels__.getKey(), driverLogLevels__.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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetDriverLogLevels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.LoggingConfig.class, - com.google.cloud.dataproc.v1.LoggingConfig.Builder.class); - } - - /** - * - * - *
-   * The Log4j level for job execution. When running an
-   * [Apache Hive](https://hive.apache.org/) job, Cloud
-   * Dataproc configures the Hive client to an equivalent verbosity level.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.LoggingConfig.Level} - */ - public enum Level implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Level is unspecified. Use default level for log4j.
-     * 
- * - * LEVEL_UNSPECIFIED = 0; - */ - LEVEL_UNSPECIFIED(0), - /** - * - * - *
-     * Use ALL level for log4j.
-     * 
- * - * ALL = 1; - */ - ALL(1), - /** - * - * - *
-     * Use TRACE level for log4j.
-     * 
- * - * TRACE = 2; - */ - TRACE(2), - /** - * - * - *
-     * Use DEBUG level for log4j.
-     * 
- * - * DEBUG = 3; - */ - DEBUG(3), - /** - * - * - *
-     * Use INFO level for log4j.
-     * 
- * - * INFO = 4; - */ - INFO(4), - /** - * - * - *
-     * Use WARN level for log4j.
-     * 
- * - * WARN = 5; - */ - WARN(5), - /** - * - * - *
-     * Use ERROR level for log4j.
-     * 
- * - * ERROR = 6; - */ - ERROR(6), - /** - * - * - *
-     * Use FATAL level for log4j.
-     * 
- * - * FATAL = 7; - */ - FATAL(7), - /** - * - * - *
-     * Turn off log4j.
-     * 
- * - * OFF = 8; - */ - OFF(8), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Level is unspecified. Use default level for log4j.
-     * 
- * - * LEVEL_UNSPECIFIED = 0; - */ - public static final int LEVEL_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Use ALL level for log4j.
-     * 
- * - * ALL = 1; - */ - public static final int ALL_VALUE = 1; - /** - * - * - *
-     * Use TRACE level for log4j.
-     * 
- * - * TRACE = 2; - */ - public static final int TRACE_VALUE = 2; - /** - * - * - *
-     * Use DEBUG level for log4j.
-     * 
- * - * DEBUG = 3; - */ - public static final int DEBUG_VALUE = 3; - /** - * - * - *
-     * Use INFO level for log4j.
-     * 
- * - * INFO = 4; - */ - public static final int INFO_VALUE = 4; - /** - * - * - *
-     * Use WARN level for log4j.
-     * 
- * - * WARN = 5; - */ - public static final int WARN_VALUE = 5; - /** - * - * - *
-     * Use ERROR level for log4j.
-     * 
- * - * ERROR = 6; - */ - public static final int ERROR_VALUE = 6; - /** - * - * - *
-     * Use FATAL level for log4j.
-     * 
- * - * FATAL = 7; - */ - public static final int FATAL_VALUE = 7; - /** - * - * - *
-     * Turn off log4j.
-     * 
- * - * OFF = 8; - */ - public static final int OFF_VALUE = 8; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Level valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Level forNumber(int value) { - switch (value) { - case 0: - return LEVEL_UNSPECIFIED; - case 1: - return ALL; - case 2: - return TRACE; - case 3: - return DEBUG; - case 4: - return INFO; - case 5: - return WARN; - case 6: - return ERROR; - case 7: - return FATAL; - case 8: - return OFF; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Level findValueByNumber(int number) { - return Level.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.dataproc.v1.LoggingConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final Level[] VALUES = values(); - - public static Level valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Level(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.LoggingConfig.Level) - } - - public static final int DRIVER_LOG_LEVELS_FIELD_NUMBER = 2; - - private static final class DriverLogLevelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_DriverLogLevelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.ENUM, - com.google.cloud.dataproc.v1.LoggingConfig.Level.LEVEL_UNSPECIFIED.getNumber()); - } - - private com.google.protobuf.MapField driverLogLevels_; - - private com.google.protobuf.MapField - internalGetDriverLogLevels() { - if (driverLogLevels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DriverLogLevelsDefaultEntryHolder.defaultEntry); - } - return driverLogLevels_; - } - - private static final com.google.protobuf.Internal.MapAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1.LoggingConfig.Level> - driverLogLevelsValueConverter = - com.google.protobuf.Internal.MapAdapter.newEnumConverter( - com.google.cloud.dataproc.v1.LoggingConfig.Level.internalGetValueMap(), - com.google.cloud.dataproc.v1.LoggingConfig.Level.UNRECOGNIZED); - - private static final java.util.Map< - java.lang.String, com.google.cloud.dataproc.v1.LoggingConfig.Level> - internalGetAdaptedDriverLogLevelsMap(java.util.Map map) { - return new com.google.protobuf.Internal.MapAdapter< - java.lang.String, com.google.cloud.dataproc.v1.LoggingConfig.Level, java.lang.Integer>( - map, driverLogLevelsValueConverter); - } - - public int getDriverLogLevelsCount() { - return internalGetDriverLogLevels().getMap().size(); - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public boolean containsDriverLogLevels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetDriverLogLevels().getMap().containsKey(key); - } - /** Use {@link #getDriverLogLevelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getDriverLogLevels() { - return getDriverLogLevelsMap(); - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public java.util.Map - getDriverLogLevelsMap() { - return internalGetAdaptedDriverLogLevelsMap(internalGetDriverLogLevels().getMap()); - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1.LoggingConfig.Level defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetDriverLogLevels().getMap(); - return map.containsKey(key) - ? driverLogLevelsValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetDriverLogLevels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return driverLogLevelsValueConverter.doForward(map.get(key)); - } - /** Use {@link #getDriverLogLevelsValueMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDriverLogLevelsValue() { - return getDriverLogLevelsValueMap(); - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public java.util.Map getDriverLogLevelsValueMap() { - return internalGetDriverLogLevels().getMap(); - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public int getDriverLogLevelsValueOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetDriverLogLevels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public int getDriverLogLevelsValueOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetDriverLogLevels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetDriverLogLevels(), DriverLogLevelsDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetDriverLogLevels().getMap().entrySet()) { - com.google.protobuf.MapEntry driverLogLevels__ = - DriverLogLevelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, driverLogLevels__); - } - 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.dataproc.v1.LoggingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.LoggingConfig other = - (com.google.cloud.dataproc.v1.LoggingConfig) obj; - - if (!internalGetDriverLogLevels().equals(other.internalGetDriverLogLevels())) 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 (!internalGetDriverLogLevels().getMap().isEmpty()) { - hash = (37 * hash) + DRIVER_LOG_LEVELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetDriverLogLevels().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.LoggingConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig 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.dataproc.v1.LoggingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig parseFrom( - 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.dataproc.v1.LoggingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig 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.dataproc.v1.LoggingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig 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.dataproc.v1.LoggingConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig 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.dataproc.v1.LoggingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 runtime logging config of the job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.LoggingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.LoggingConfig) - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetDriverLogLevels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableDriverLogLevels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.LoggingConfig.class, - com.google.cloud.dataproc.v1.LoggingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.LoggingConfig.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(); - internalGetMutableDriverLogLevels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_LoggingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig build() { - com.google.cloud.dataproc.v1.LoggingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig buildPartial() { - com.google.cloud.dataproc.v1.LoggingConfig result = - new com.google.cloud.dataproc.v1.LoggingConfig(this); - int from_bitField0_ = bitField0_; - result.driverLogLevels_ = internalGetDriverLogLevels(); - result.driverLogLevels_.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.dataproc.v1.LoggingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.LoggingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.LoggingConfig other) { - if (other == com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance()) return this; - internalGetMutableDriverLogLevels().mergeFrom(other.internalGetDriverLogLevels()); - 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.dataproc.v1.LoggingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.LoggingConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField driverLogLevels_; - - private com.google.protobuf.MapField - internalGetDriverLogLevels() { - if (driverLogLevels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - DriverLogLevelsDefaultEntryHolder.defaultEntry); - } - return driverLogLevels_; - } - - private com.google.protobuf.MapField - internalGetMutableDriverLogLevels() { - onChanged(); - ; - if (driverLogLevels_ == null) { - driverLogLevels_ = - com.google.protobuf.MapField.newMapField( - DriverLogLevelsDefaultEntryHolder.defaultEntry); - } - if (!driverLogLevels_.isMutable()) { - driverLogLevels_ = driverLogLevels_.copy(); - } - return driverLogLevels_; - } - - public int getDriverLogLevelsCount() { - return internalGetDriverLogLevels().getMap().size(); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public boolean containsDriverLogLevels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetDriverLogLevels().getMap().containsKey(key); - } - /** Use {@link #getDriverLogLevelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getDriverLogLevels() { - return getDriverLogLevelsMap(); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public java.util.Map - getDriverLogLevelsMap() { - return internalGetAdaptedDriverLogLevelsMap(internalGetDriverLogLevels().getMap()); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1.LoggingConfig.Level defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetDriverLogLevels().getMap(); - return map.containsKey(key) - ? driverLogLevelsValueConverter.doForward(map.get(key)) - : defaultValue; - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetDriverLogLevels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return driverLogLevelsValueConverter.doForward(map.get(key)); - } - /** Use {@link #getDriverLogLevelsValueMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getDriverLogLevelsValue() { - return getDriverLogLevelsValueMap(); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public java.util.Map getDriverLogLevelsValueMap() { - return internalGetDriverLogLevels().getMap(); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public int getDriverLogLevelsValueOrDefault(java.lang.String key, int defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetDriverLogLevels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public int getDriverLogLevelsValueOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetDriverLogLevels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearDriverLogLevels() { - internalGetMutableDriverLogLevels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder removeDriverLogLevels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableDriverLogLevels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableDriverLogLevels() { - return internalGetAdaptedDriverLogLevelsMap( - internalGetMutableDriverLogLevels().getMutableMap()); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder putDriverLogLevels( - java.lang.String key, com.google.cloud.dataproc.v1.LoggingConfig.Level value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableDriverLogLevels() - .getMutableMap() - .put(key, driverLogLevelsValueConverter.doBackward(value)); - return this; - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder putAllDriverLogLevels( - java.util.Map values) { - internalGetAdaptedDriverLogLevelsMap(internalGetMutableDriverLogLevels().getMutableMap()) - .putAll(values); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableDriverLogLevelsValue() { - return internalGetMutableDriverLogLevels().getMutableMap(); - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder putDriverLogLevelsValue(java.lang.String key, int value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableDriverLogLevels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The per-package log levels for the driver. This may include
-     * "root" package name to configure rootLogger.
-     * Examples:
-     *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-     * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder putAllDriverLogLevelsValue( - java.util.Map values) { - internalGetMutableDriverLogLevels().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.dataproc.v1.LoggingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.LoggingConfig) - private static final com.google.cloud.dataproc.v1.LoggingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.LoggingConfig(); - } - - public static com.google.cloud.dataproc.v1.LoggingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LoggingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LoggingConfig(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.dataproc.v1.LoggingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfigOrBuilder.java deleted file mode 100644 index 6c70fe8d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfigOrBuilder.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface LoggingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.LoggingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - int getDriverLogLevelsCount(); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - boolean containsDriverLogLevels(java.lang.String key); - /** Use {@link #getDriverLogLevelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getDriverLogLevels(); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - java.util.Map - getDriverLogLevelsMap(); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1.LoggingConfig.Level defaultValue); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - com.google.cloud.dataproc.v1.LoggingConfig.Level getDriverLogLevelsOrThrow(java.lang.String key); - /** Use {@link #getDriverLogLevelsValueMap()} instead. */ - @java.lang.Deprecated - java.util.Map getDriverLogLevelsValue(); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - java.util.Map getDriverLogLevelsValueMap(); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - int getDriverLogLevelsValueOrDefault(java.lang.String key, int defaultValue); - /** - * - * - *
-   * The per-package log levels for the driver. This may include
-   * "root" package name to configure rootLogger.
-   * Examples:
-   *   'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
-   * 
- * - * map<string, .google.cloud.dataproc.v1.LoggingConfig.Level> driver_log_levels = 2; - * - */ - int getDriverLogLevelsValueOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedCluster.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedCluster.java deleted file mode 100644 index c4cc8ccf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedCluster.java +++ /dev/null @@ -1,1353 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Cluster that is managed by the workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ManagedCluster} - */ -public final class ManagedCluster extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ManagedCluster) - ManagedClusterOrBuilder { - private static final long serialVersionUID = 0L; - // Use ManagedCluster.newBuilder() to construct. - private ManagedCluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ManagedCluster() { - clusterName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ManagedCluster(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ManagedCluster( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.ClusterConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - 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; - } - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ManagedCluster.class, - com.google.cloud.dataproc.v1.ManagedCluster.Builder.class); - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name prefix. A unique cluster name will be formed by
-   * appending a random suffix.
-   * The name must contain only lower-case letters (a-z), numbers (0-9),
-   * and hyphens (-). Must begin with a letter. Cannot begin or end with
-   * hyphen. Must consist of between 2 and 35 characters.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name prefix. A unique cluster name will be formed by
-   * appending a random suffix.
-   * The name must contain only lower-case letters (a-z), numbers (0-9),
-   * and hyphens (-). Must begin with a letter. Cannot begin or end with
-   * hyphen. Must consist of between 2 and 35 characters.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.ClusterConfig config_; - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int LABELS_FIELD_NUMBER = 4; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (config_ != null) { - output.writeMessage(3, getConfig()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfig()); - } - 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(4, labels__); - } - 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.dataproc.v1.ManagedCluster)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ManagedCluster other = - (com.google.cloud.dataproc.v1.ManagedCluster) obj; - - if (!getClusterName().equals(other.getClusterName())) return false; - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig().equals(other.getConfig())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) 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) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ManagedCluster parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster 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.dataproc.v1.ManagedCluster parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster parseFrom( - 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.dataproc.v1.ManagedCluster parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster 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.dataproc.v1.ManagedCluster parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster 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.dataproc.v1.ManagedCluster parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster 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.dataproc.v1.ManagedCluster prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Cluster that is managed by the workflow.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ManagedCluster} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ManagedCluster) - com.google.cloud.dataproc.v1.ManagedClusterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ManagedCluster.class, - com.google.cloud.dataproc.v1.ManagedCluster.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ManagedCluster.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(); - clusterName_ = ""; - - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - internalGetMutableLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedCluster getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedCluster build() { - com.google.cloud.dataproc.v1.ManagedCluster result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedCluster buildPartial() { - com.google.cloud.dataproc.v1.ManagedCluster result = - new com.google.cloud.dataproc.v1.ManagedCluster(this); - int from_bitField0_ = bitField0_; - result.clusterName_ = clusterName_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.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.dataproc.v1.ManagedCluster) { - return mergeFrom((com.google.cloud.dataproc.v1.ManagedCluster) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ManagedCluster other) { - if (other == com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance()) return this; - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - 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.dataproc.v1.ManagedCluster parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ManagedCluster) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name prefix. A unique cluster name will be formed by
-     * appending a random suffix.
-     * The name must contain only lower-case letters (a-z), numbers (0-9),
-     * and hyphens (-). Must begin with a letter. Cannot begin or end with
-     * hyphen. Must consist of between 2 and 35 characters.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name prefix. A unique cluster name will be formed by
-     * appending a random suffix.
-     * The name must contain only lower-case letters (a-z), numbers (0-9),
-     * and hyphens (-). Must begin with a letter. Cannot begin or end with
-     * hyphen. Must consist of between 2 and 35 characters.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name prefix. A unique cluster name will be formed by
-     * appending a random suffix.
-     * The name must contain only lower-case letters (a-z), numbers (0-9),
-     * and hyphens (-). Must begin with a letter. Cannot begin or end with
-     * hyphen. Must consist of between 2 and 35 characters.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name prefix. A unique cluster name will be formed by
-     * appending a random suffix.
-     * The name must contain only lower-case letters (a-z), numbers (0-9),
-     * and hyphens (-). Must begin with a letter. Cannot begin or end with
-     * hyphen. Must consist of between 2 and 35 characters.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name prefix. A unique cluster name will be formed by
-     * appending a random suffix.
-     * The name must contain only lower-case letters (a-z), numbers (0-9),
-     * and hyphens (-). Must begin with a letter. Cannot begin or end with
-     * hyphen. Must consist of between 2 and 35 characters.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - public com.google.cloud.dataproc.v1.ClusterConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1.ClusterConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeConfig(com.google.cloud.dataproc.v1.ClusterConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.dataproc.v1.ClusterConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.ClusterConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.dataproc.v1.ClusterConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterConfig, - com.google.cloud.dataproc.v1.ClusterConfig.Builder, - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder>( - getConfig(), getParentForChildren(), isClean()); - config_ = null; - } - return configBuilder_; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this cluster.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given cluster.
-     * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().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.dataproc.v1.ManagedCluster) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ManagedCluster) - private static final com.google.cloud.dataproc.v1.ManagedCluster DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ManagedCluster(); - } - - public static com.google.cloud.dataproc.v1.ManagedCluster getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ManagedCluster parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedCluster(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.dataproc.v1.ManagedCluster getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedClusterOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedClusterOrBuilder.java deleted file mode 100644 index 7800131f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedClusterOrBuilder.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ManagedClusterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ManagedCluster) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The cluster name prefix. A unique cluster name will be formed by
-   * appending a random suffix.
-   * The name must contain only lower-case letters (a-z), numbers (0-9),
-   * and hyphens (-). Must begin with a letter. Cannot begin or end with
-   * hyphen. Must consist of between 2 and 35 characters.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name prefix. A unique cluster name will be formed by
-   * appending a random suffix.
-   * The name must contain only lower-case letters (a-z), numbers (0-9),
-   * and hyphens (-). Must begin with a letter. Cannot begin or end with
-   * hyphen. Must consist of between 2 and 35 characters.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - com.google.cloud.dataproc.v1.ClusterConfig getConfig(); - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this cluster.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given cluster.
-   * 
- * - * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfig.java deleted file mode 100644 index 8bf61946..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfig.java +++ /dev/null @@ -1,829 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies the resources used to actively manage an instance group.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ManagedGroupConfig} - */ -public final class ManagedGroupConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ManagedGroupConfig) - ManagedGroupConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ManagedGroupConfig.newBuilder() to construct. - private ManagedGroupConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ManagedGroupConfig() { - instanceTemplateName_ = ""; - instanceGroupManagerName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ManagedGroupConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ManagedGroupConfig( - 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(); - - instanceTemplateName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManagerName_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ManagedGroupConfig.class, - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder.class); - } - - public static final int INSTANCE_TEMPLATE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object instanceTemplateName_; - /** - * - * - *
-   * Output only. The name of the Instance Template used for the Managed
-   * Instance Group.
-   * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceTemplateName. - */ - @java.lang.Override - public java.lang.String getInstanceTemplateName() { - java.lang.Object ref = instanceTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceTemplateName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the Instance Template used for the Managed
-   * Instance Group.
-   * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for instanceTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInstanceTemplateNameBytes() { - java.lang.Object ref = instanceTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSTANCE_GROUP_MANAGER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object instanceGroupManagerName_; - /** - * - * - *
-   * Output only. The name of the Instance Group Manager for this group.
-   * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The instanceGroupManagerName. - */ - @java.lang.Override - public java.lang.String getInstanceGroupManagerName() { - java.lang.Object ref = instanceGroupManagerName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceGroupManagerName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the Instance Group Manager for this group.
-   * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for instanceGroupManagerName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInstanceGroupManagerNameBytes() { - java.lang.Object ref = instanceGroupManagerName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceGroupManagerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManagerName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceGroupManagerName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManagerName_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceGroupManagerName_); - } - 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.dataproc.v1.ManagedGroupConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ManagedGroupConfig other = - (com.google.cloud.dataproc.v1.ManagedGroupConfig) obj; - - if (!getInstanceTemplateName().equals(other.getInstanceTemplateName())) return false; - if (!getInstanceGroupManagerName().equals(other.getInstanceGroupManagerName())) 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) + INSTANCE_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInstanceTemplateName().hashCode(); - hash = (37 * hash) + INSTANCE_GROUP_MANAGER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInstanceGroupManagerName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig 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.dataproc.v1.ManagedGroupConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig parseFrom( - 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.dataproc.v1.ManagedGroupConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig 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.dataproc.v1.ManagedGroupConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig 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.dataproc.v1.ManagedGroupConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig 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.dataproc.v1.ManagedGroupConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies the resources used to actively manage an instance group.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ManagedGroupConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ManagedGroupConfig) - com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ManagedGroupConfig.class, - com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ManagedGroupConfig.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(); - instanceTemplateName_ = ""; - - instanceGroupManagerName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedGroupConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedGroupConfig build() { - com.google.cloud.dataproc.v1.ManagedGroupConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedGroupConfig buildPartial() { - com.google.cloud.dataproc.v1.ManagedGroupConfig result = - new com.google.cloud.dataproc.v1.ManagedGroupConfig(this); - result.instanceTemplateName_ = instanceTemplateName_; - result.instanceGroupManagerName_ = instanceGroupManagerName_; - 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.dataproc.v1.ManagedGroupConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.ManagedGroupConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ManagedGroupConfig other) { - if (other == com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()) - return this; - if (!other.getInstanceTemplateName().isEmpty()) { - instanceTemplateName_ = other.instanceTemplateName_; - onChanged(); - } - if (!other.getInstanceGroupManagerName().isEmpty()) { - instanceGroupManagerName_ = other.instanceGroupManagerName_; - 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.dataproc.v1.ManagedGroupConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ManagedGroupConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object instanceTemplateName_ = ""; - /** - * - * - *
-     * Output only. The name of the Instance Template used for the Managed
-     * Instance Group.
-     * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceTemplateName. - */ - public java.lang.String getInstanceTemplateName() { - java.lang.Object ref = instanceTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the Instance Template used for the Managed
-     * Instance Group.
-     * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for instanceTemplateName. - */ - public com.google.protobuf.ByteString getInstanceTemplateNameBytes() { - java.lang.Object ref = instanceTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the Instance Template used for the Managed
-     * Instance Group.
-     * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The instanceTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInstanceTemplateName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceTemplateName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the Instance Template used for the Managed
-     * Instance Group.
-     * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearInstanceTemplateName() { - - instanceTemplateName_ = getDefaultInstance().getInstanceTemplateName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the Instance Template used for the Managed
-     * Instance Group.
-     * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for instanceTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInstanceTemplateNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object instanceGroupManagerName_ = ""; - /** - * - * - *
-     * Output only. The name of the Instance Group Manager for this group.
-     * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The instanceGroupManagerName. - */ - public java.lang.String getInstanceGroupManagerName() { - java.lang.Object ref = instanceGroupManagerName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceGroupManagerName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the Instance Group Manager for this group.
-     * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for instanceGroupManagerName. - */ - public com.google.protobuf.ByteString getInstanceGroupManagerNameBytes() { - java.lang.Object ref = instanceGroupManagerName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceGroupManagerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the Instance Group Manager for this group.
-     * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The instanceGroupManagerName to set. - * @return This builder for chaining. - */ - public Builder setInstanceGroupManagerName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceGroupManagerName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the Instance Group Manager for this group.
-     * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearInstanceGroupManagerName() { - - instanceGroupManagerName_ = getDefaultInstance().getInstanceGroupManagerName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the Instance Group Manager for this group.
-     * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for instanceGroupManagerName to set. - * @return This builder for chaining. - */ - public Builder setInstanceGroupManagerNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceGroupManagerName_ = 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.dataproc.v1.ManagedGroupConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ManagedGroupConfig) - private static final com.google.cloud.dataproc.v1.ManagedGroupConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ManagedGroupConfig(); - } - - public static com.google.cloud.dataproc.v1.ManagedGroupConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ManagedGroupConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedGroupConfig(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.dataproc.v1.ManagedGroupConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfigOrBuilder.java deleted file mode 100644 index d27f6e63..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfigOrBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ManagedGroupConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ManagedGroupConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The name of the Instance Template used for the Managed
-   * Instance Group.
-   * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The instanceTemplateName. - */ - java.lang.String getInstanceTemplateName(); - /** - * - * - *
-   * Output only. The name of the Instance Template used for the Managed
-   * Instance Group.
-   * 
- * - * string instance_template_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for instanceTemplateName. - */ - com.google.protobuf.ByteString getInstanceTemplateNameBytes(); - - /** - * - * - *
-   * Output only. The name of the Instance Group Manager for this group.
-   * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The instanceGroupManagerName. - */ - java.lang.String getInstanceGroupManagerName(); - /** - * - * - *
-   * Output only. The name of the Instance Group Manager for this group.
-   * 
- * - * string instance_group_manager_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for instanceGroupManagerName. - */ - com.google.protobuf.ByteString getInstanceGroupManagerNameBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfig.java deleted file mode 100644 index 05dd108f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfig.java +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies a Metastore configuration.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.MetastoreConfig} - */ -public final class MetastoreConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.MetastoreConfig) - MetastoreConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use MetastoreConfig.newBuilder() to construct. - private MetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private MetastoreConfig() { - dataprocMetastoreService_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MetastoreConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private MetastoreConfig( - 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(); - - dataprocMetastoreService_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_MetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.MetastoreConfig.class, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder.class); - } - - public static final int DATAPROC_METASTORE_SERVICE_FIELD_NUMBER = 1; - private volatile java.lang.Object dataprocMetastoreService_; - /** - * - * - *
-   * Required. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-   * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The dataprocMetastoreService. - */ - @java.lang.Override - public java.lang.String getDataprocMetastoreService() { - java.lang.Object ref = dataprocMetastoreService_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataprocMetastoreService_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-   * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for dataprocMetastoreService. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataprocMetastoreServiceBytes() { - java.lang.Object ref = dataprocMetastoreService_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataprocMetastoreService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataprocMetastoreService_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataprocMetastoreService_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataprocMetastoreService_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataprocMetastoreService_); - } - 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.dataproc.v1.MetastoreConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.MetastoreConfig other = - (com.google.cloud.dataproc.v1.MetastoreConfig) obj; - - if (!getDataprocMetastoreService().equals(other.getDataprocMetastoreService())) 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) + DATAPROC_METASTORE_SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getDataprocMetastoreService().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig 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.dataproc.v1.MetastoreConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig parseFrom( - 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.dataproc.v1.MetastoreConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig 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.dataproc.v1.MetastoreConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig 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.dataproc.v1.MetastoreConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig 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.dataproc.v1.MetastoreConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies a Metastore configuration.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.MetastoreConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.MetastoreConfig) - com.google.cloud.dataproc.v1.MetastoreConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_MetastoreConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.MetastoreConfig.class, - com.google.cloud.dataproc.v1.MetastoreConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.MetastoreConfig.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(); - dataprocMetastoreService_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_MetastoreConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfig build() { - com.google.cloud.dataproc.v1.MetastoreConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.MetastoreConfig buildPartial() { - com.google.cloud.dataproc.v1.MetastoreConfig result = - new com.google.cloud.dataproc.v1.MetastoreConfig(this); - result.dataprocMetastoreService_ = dataprocMetastoreService_; - 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.dataproc.v1.MetastoreConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.MetastoreConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.MetastoreConfig other) { - if (other == com.google.cloud.dataproc.v1.MetastoreConfig.getDefaultInstance()) return this; - if (!other.getDataprocMetastoreService().isEmpty()) { - dataprocMetastoreService_ = other.dataprocMetastoreService_; - 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.dataproc.v1.MetastoreConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.MetastoreConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataprocMetastoreService_ = ""; - /** - * - * - *
-     * Required. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-     * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The dataprocMetastoreService. - */ - public java.lang.String getDataprocMetastoreService() { - java.lang.Object ref = dataprocMetastoreService_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataprocMetastoreService_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-     * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for dataprocMetastoreService. - */ - public com.google.protobuf.ByteString getDataprocMetastoreServiceBytes() { - java.lang.Object ref = dataprocMetastoreService_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataprocMetastoreService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-     * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The dataprocMetastoreService to set. - * @return This builder for chaining. - */ - public Builder setDataprocMetastoreService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataprocMetastoreService_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-     * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearDataprocMetastoreService() { - - dataprocMetastoreService_ = getDefaultInstance().getDataprocMetastoreService(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-     * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for dataprocMetastoreService to set. - * @return This builder for chaining. - */ - public Builder setDataprocMetastoreServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataprocMetastoreService_ = 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.dataproc.v1.MetastoreConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.MetastoreConfig) - private static final com.google.cloud.dataproc.v1.MetastoreConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.MetastoreConfig(); - } - - public static com.google.cloud.dataproc.v1.MetastoreConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetastoreConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MetastoreConfig(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.dataproc.v1.MetastoreConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfigOrBuilder.java deleted file mode 100644 index c0c1d17b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfigOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface MetastoreConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.MetastoreConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-   * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The dataprocMetastoreService. - */ - java.lang.String getDataprocMetastoreService(); - /** - * - * - *
-   * Required. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]`
-   * 
- * - * - * string dataproc_metastore_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for dataprocMetastoreService. - */ - com.google.protobuf.ByteString getDataprocMetastoreServiceBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java deleted file mode 100644 index 39cadb8e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java +++ /dev/null @@ -1,683 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Node Group Affinity for clusters using sole-tenant node groups.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupAffinity} - */ -public final class NodeGroupAffinity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.NodeGroupAffinity) - NodeGroupAffinityOrBuilder { - private static final long serialVersionUID = 0L; - // Use NodeGroupAffinity.newBuilder() to construct. - private NodeGroupAffinity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NodeGroupAffinity() { - nodeGroupUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NodeGroupAffinity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private NodeGroupAffinity( - 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(); - - nodeGroupUri_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.NodeGroupAffinity.class, - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder.class); - } - - public static final int NODE_GROUP_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object nodeGroupUri_; - /** - * - * - *
-   * Required. The URI of a
-   * sole-tenant [node group
-   * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-   * that the cluster will be created on.
-   * A full URL, partial URI, or node group name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `node-group-1`
-   * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodeGroupUri. - */ - @java.lang.Override - public java.lang.String getNodeGroupUri() { - java.lang.Object ref = nodeGroupUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nodeGroupUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The URI of a
-   * sole-tenant [node group
-   * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-   * that the cluster will be created on.
-   * A full URL, partial URI, or node group name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `node-group-1`
-   * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodeGroupUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNodeGroupUriBytes() { - java.lang.Object ref = nodeGroupUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nodeGroupUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nodeGroupUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroupUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nodeGroupUri_); - } - 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.dataproc.v1.NodeGroupAffinity)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.NodeGroupAffinity other = - (com.google.cloud.dataproc.v1.NodeGroupAffinity) obj; - - if (!getNodeGroupUri().equals(other.getNodeGroupUri())) 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) + NODE_GROUP_URI_FIELD_NUMBER; - hash = (53 * hash) + getNodeGroupUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity 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.dataproc.v1.NodeGroupAffinity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity parseFrom( - 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.dataproc.v1.NodeGroupAffinity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity 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.dataproc.v1.NodeGroupAffinity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity 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.dataproc.v1.NodeGroupAffinity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity 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.dataproc.v1.NodeGroupAffinity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Node Group Affinity for clusters using sole-tenant node groups.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.NodeGroupAffinity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.NodeGroupAffinity) - com.google.cloud.dataproc.v1.NodeGroupAffinityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.NodeGroupAffinity.class, - com.google.cloud.dataproc.v1.NodeGroupAffinity.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.NodeGroupAffinity.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(); - nodeGroupUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeGroupAffinity_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeGroupAffinity getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.NodeGroupAffinity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeGroupAffinity build() { - com.google.cloud.dataproc.v1.NodeGroupAffinity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeGroupAffinity buildPartial() { - com.google.cloud.dataproc.v1.NodeGroupAffinity result = - new com.google.cloud.dataproc.v1.NodeGroupAffinity(this); - result.nodeGroupUri_ = nodeGroupUri_; - 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.dataproc.v1.NodeGroupAffinity) { - return mergeFrom((com.google.cloud.dataproc.v1.NodeGroupAffinity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.NodeGroupAffinity other) { - if (other == com.google.cloud.dataproc.v1.NodeGroupAffinity.getDefaultInstance()) return this; - if (!other.getNodeGroupUri().isEmpty()) { - nodeGroupUri_ = other.nodeGroupUri_; - 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.dataproc.v1.NodeGroupAffinity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.NodeGroupAffinity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object nodeGroupUri_ = ""; - /** - * - * - *
-     * Required. The URI of a
-     * sole-tenant [node group
-     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-     * that the cluster will be created on.
-     * A full URL, partial URI, or node group name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `node-group-1`
-     * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodeGroupUri. - */ - public java.lang.String getNodeGroupUri() { - java.lang.Object ref = nodeGroupUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nodeGroupUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The URI of a
-     * sole-tenant [node group
-     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-     * that the cluster will be created on.
-     * A full URL, partial URI, or node group name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `node-group-1`
-     * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodeGroupUri. - */ - public com.google.protobuf.ByteString getNodeGroupUriBytes() { - java.lang.Object ref = nodeGroupUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nodeGroupUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The URI of a
-     * sole-tenant [node group
-     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-     * that the cluster will be created on.
-     * A full URL, partial URI, or node group name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `node-group-1`
-     * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The nodeGroupUri to set. - * @return This builder for chaining. - */ - public Builder setNodeGroupUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nodeGroupUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The URI of a
-     * sole-tenant [node group
-     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-     * that the cluster will be created on.
-     * A full URL, partial URI, or node group name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `node-group-1`
-     * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearNodeGroupUri() { - - nodeGroupUri_ = getDefaultInstance().getNodeGroupUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The URI of a
-     * sole-tenant [node group
-     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-     * that the cluster will be created on.
-     * A full URL, partial URI, or node group name are valid. Examples:
-     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-     * * `node-group-1`
-     * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for nodeGroupUri to set. - * @return This builder for chaining. - */ - public Builder setNodeGroupUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nodeGroupUri_ = 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.dataproc.v1.NodeGroupAffinity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.NodeGroupAffinity) - private static final com.google.cloud.dataproc.v1.NodeGroupAffinity DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.NodeGroupAffinity(); - } - - public static com.google.cloud.dataproc.v1.NodeGroupAffinity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NodeGroupAffinity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupAffinity(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.dataproc.v1.NodeGroupAffinity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinityOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinityOrBuilder.java deleted file mode 100644 index 5ec58655..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinityOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface NodeGroupAffinityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.NodeGroupAffinity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The URI of a
-   * sole-tenant [node group
-   * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-   * that the cluster will be created on.
-   * A full URL, partial URI, or node group name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `node-group-1`
-   * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The nodeGroupUri. - */ - java.lang.String getNodeGroupUri(); - /** - * - * - *
-   * Required. The URI of a
-   * sole-tenant [node group
-   * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
-   * that the cluster will be created on.
-   * A full URL, partial URI, or node group name are valid. Examples:
-   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1`
-   * * `node-group-1`
-   * 
- * - * string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for nodeGroupUri. - */ - com.google.protobuf.ByteString getNodeGroupUriBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationAction.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationAction.java deleted file mode 100644 index 9c947e59..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationAction.java +++ /dev/null @@ -1,999 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies an executable to run on a fully configured node and a
- * timeout period for executable completion.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.NodeInitializationAction} - */ -public final class NodeInitializationAction extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.NodeInitializationAction) - NodeInitializationActionOrBuilder { - private static final long serialVersionUID = 0L; - // Use NodeInitializationAction.newBuilder() to construct. - private NodeInitializationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NodeInitializationAction() { - executableFile_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NodeInitializationAction(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private NodeInitializationAction( - 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(); - - executableFile_ = s; - break; - } - case 18: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (executionTimeout_ != null) { - subBuilder = executionTimeout_.toBuilder(); - } - executionTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionTimeout_); - executionTimeout_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeInitializationAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.NodeInitializationAction.class, - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder.class); - } - - public static final int EXECUTABLE_FILE_FIELD_NUMBER = 1; - private volatile java.lang.Object executableFile_; - /** - * - * - *
-   * Required. Cloud Storage URI of executable file.
-   * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The executableFile. - */ - @java.lang.Override - public java.lang.String getExecutableFile() { - java.lang.Object ref = executableFile_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - executableFile_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Cloud Storage URI of executable file.
-   * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for executableFile. - */ - @java.lang.Override - public com.google.protobuf.ByteString getExecutableFileBytes() { - java.lang.Object ref = executableFile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - executableFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 2; - private com.google.protobuf.Duration executionTimeout_; - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionTimeout field is set. - */ - @java.lang.Override - public boolean hasExecutionTimeout() { - return executionTimeout_ != null; - } - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getExecutionTimeout() { - return executionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : executionTimeout_; - } - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { - return getExecutionTimeout(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executableFile_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executableFile_); - } - if (executionTimeout_ != null) { - output.writeMessage(2, getExecutionTimeout()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executableFile_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executableFile_); - } - if (executionTimeout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExecutionTimeout()); - } - 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.dataproc.v1.NodeInitializationAction)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.NodeInitializationAction other = - (com.google.cloud.dataproc.v1.NodeInitializationAction) obj; - - if (!getExecutableFile().equals(other.getExecutableFile())) return false; - if (hasExecutionTimeout() != other.hasExecutionTimeout()) return false; - if (hasExecutionTimeout()) { - if (!getExecutionTimeout().equals(other.getExecutionTimeout())) 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) + EXECUTABLE_FILE_FIELD_NUMBER; - hash = (53 * hash) + getExecutableFile().hashCode(); - if (hasExecutionTimeout()) { - hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getExecutionTimeout().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction 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.dataproc.v1.NodeInitializationAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction parseFrom( - 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.dataproc.v1.NodeInitializationAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction 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.dataproc.v1.NodeInitializationAction parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction 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.dataproc.v1.NodeInitializationAction parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction 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.dataproc.v1.NodeInitializationAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies an executable to run on a fully configured node and a
-   * timeout period for executable completion.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.NodeInitializationAction} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.NodeInitializationAction) - com.google.cloud.dataproc.v1.NodeInitializationActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeInitializationAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.NodeInitializationAction.class, - com.google.cloud.dataproc.v1.NodeInitializationAction.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.NodeInitializationAction.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(); - executableFile_ = ""; - - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = null; - } else { - executionTimeout_ = null; - executionTimeoutBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeInitializationAction getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.NodeInitializationAction.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeInitializationAction build() { - com.google.cloud.dataproc.v1.NodeInitializationAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.NodeInitializationAction buildPartial() { - com.google.cloud.dataproc.v1.NodeInitializationAction result = - new com.google.cloud.dataproc.v1.NodeInitializationAction(this); - result.executableFile_ = executableFile_; - if (executionTimeoutBuilder_ == null) { - result.executionTimeout_ = executionTimeout_; - } else { - result.executionTimeout_ = executionTimeoutBuilder_.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.dataproc.v1.NodeInitializationAction) { - return mergeFrom((com.google.cloud.dataproc.v1.NodeInitializationAction) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.NodeInitializationAction other) { - if (other == com.google.cloud.dataproc.v1.NodeInitializationAction.getDefaultInstance()) - return this; - if (!other.getExecutableFile().isEmpty()) { - executableFile_ = other.executableFile_; - onChanged(); - } - if (other.hasExecutionTimeout()) { - mergeExecutionTimeout(other.getExecutionTimeout()); - } - 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.dataproc.v1.NodeInitializationAction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.NodeInitializationAction) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object executableFile_ = ""; - /** - * - * - *
-     * Required. Cloud Storage URI of executable file.
-     * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The executableFile. - */ - public java.lang.String getExecutableFile() { - java.lang.Object ref = executableFile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - executableFile_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Cloud Storage URI of executable file.
-     * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for executableFile. - */ - public com.google.protobuf.ByteString getExecutableFileBytes() { - java.lang.Object ref = executableFile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - executableFile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Cloud Storage URI of executable file.
-     * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The executableFile to set. - * @return This builder for chaining. - */ - public Builder setExecutableFile(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - executableFile_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Cloud Storage URI of executable file.
-     * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearExecutableFile() { - - executableFile_ = getDefaultInstance().getExecutableFile(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Cloud Storage URI of executable file.
-     * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for executableFile to set. - * @return This builder for chaining. - */ - public Builder setExecutableFileBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - executableFile_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration executionTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - executionTimeoutBuilder_; - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionTimeout field is set. - */ - public boolean hasExecutionTimeout() { - return executionTimeoutBuilder_ != null || executionTimeout_ != null; - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionTimeout. - */ - public com.google.protobuf.Duration getExecutionTimeout() { - if (executionTimeoutBuilder_ == null) { - return executionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : executionTimeout_; - } else { - return executionTimeoutBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutionTimeout(com.google.protobuf.Duration value) { - if (executionTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - executionTimeout_ = value; - onChanged(); - } else { - executionTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setExecutionTimeout(com.google.protobuf.Duration.Builder builderForValue) { - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = builderForValue.build(); - onChanged(); - } else { - executionTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeExecutionTimeout(com.google.protobuf.Duration value) { - if (executionTimeoutBuilder_ == null) { - if (executionTimeout_ != null) { - executionTimeout_ = - com.google.protobuf.Duration.newBuilder(executionTimeout_) - .mergeFrom(value) - .buildPartial(); - } else { - executionTimeout_ = value; - } - onChanged(); - } else { - executionTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearExecutionTimeout() { - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = null; - onChanged(); - } else { - executionTimeout_ = null; - executionTimeoutBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { - - onChanged(); - return getExecutionTimeoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { - if (executionTimeoutBuilder_ != null) { - return executionTimeoutBuilder_.getMessageOrBuilder(); - } else { - return executionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : executionTimeout_; - } - } - /** - * - * - *
-     * Optional. Amount of time executable has to complete. Default is
-     * 10 minutes (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Cluster creation fails with an explanatory error message (the
-     * name of the executable that caused the error and the exceeded timeout
-     * period) if the executable is not completed at end of the timeout period.
-     * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getExecutionTimeoutFieldBuilder() { - if (executionTimeoutBuilder_ == null) { - executionTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getExecutionTimeout(), getParentForChildren(), isClean()); - executionTimeout_ = null; - } - return executionTimeoutBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.NodeInitializationAction) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.NodeInitializationAction) - private static final com.google.cloud.dataproc.v1.NodeInitializationAction DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.NodeInitializationAction(); - } - - public static com.google.cloud.dataproc.v1.NodeInitializationAction getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NodeInitializationAction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeInitializationAction(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.dataproc.v1.NodeInitializationAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationActionOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationActionOrBuilder.java deleted file mode 100644 index a16592c0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationActionOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface NodeInitializationActionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.NodeInitializationAction) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Cloud Storage URI of executable file.
-   * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The executableFile. - */ - java.lang.String getExecutableFile(); - /** - * - * - *
-   * Required. Cloud Storage URI of executable file.
-   * 
- * - * string executable_file = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for executableFile. - */ - com.google.protobuf.ByteString getExecutableFileBytes(); - - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the executionTimeout field is set. - */ - boolean hasExecutionTimeout(); - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The executionTimeout. - */ - com.google.protobuf.Duration getExecutionTimeout(); - /** - * - * - *
-   * Optional. Amount of time executable has to complete. Default is
-   * 10 minutes (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Cluster creation fails with an explanatory error message (the
-   * name of the executable that caused the error and the exceeded timeout
-   * period) if the executable is not completed at end of the timeout period.
-   * 
- * - * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java deleted file mode 100644 index bda66040..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/operations.proto - -package com.google.cloud.dataproc.v1; - -public final class OperationsProto { - private OperationsProto() {} - - 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_dataproc_v1_BatchOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_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/dataproc/v1/operations.pr" - + "oto\022\030google.cloud.dataproc.v1\032\037google/ap" - + "i/field_behavior.proto\032\037google/protobuf/" - + "timestamp.proto\"\343\003\n\026BatchOperationMetada" - + "ta\022\r\n\005batch\030\001 \001(\t\022\022\n\nbatch_uuid\030\002 \001(\t\022/\n" - + "\013create_time\030\003 \001(\0132\032.google.protobuf.Tim" - + "estamp\022-\n\tdone_time\030\004 \001(\0132\032.google.proto" - + "buf.Timestamp\022[\n\016operation_type\030\006 \001(\0162C." - + "google.cloud.dataproc.v1.BatchOperationM" - + "etadata.BatchOperationType\022\023\n\013descriptio" - + "n\030\007 \001(\t\022L\n\006labels\030\010 \003(\0132<.google.cloud.d" - + "ataproc.v1.BatchOperationMetadata.Labels" - + "Entry\022\020\n\010warnings\030\t \003(\t\032-\n\013LabelsEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"E\n\022BatchO" - + "perationType\022$\n BATCH_OPERATION_TYPE_UNS" - + "PECIFIED\020\000\022\t\n\005BATCH\020\001\"\211\002\n\026ClusterOperati" - + "onStatus\022J\n\005state\030\001 \001(\01626.google.cloud.d" - + "ataproc.v1.ClusterOperationStatus.StateB" - + "\003\340A\003\022\030\n\013inner_state\030\002 \001(\tB\003\340A\003\022\024\n\007detail" - + "s\030\003 \001(\tB\003\340A\003\0229\n\020state_start_time\030\004 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\"8\n\005State" - + "\022\013\n\007UNKNOWN\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022" - + "\010\n\004DONE\020\003\"\270\003\n\030ClusterOperationMetadata\022\031" - + "\n\014cluster_name\030\007 \001(\tB\003\340A\003\022\031\n\014cluster_uui" - + "d\030\010 \001(\tB\003\340A\003\022E\n\006status\030\t \001(\01320.google.cl" - + "oud.dataproc.v1.ClusterOperationStatusB\003" - + "\340A\003\022M\n\016status_history\030\n \003(\01320.google.clo" - + "ud.dataproc.v1.ClusterOperationStatusB\003\340" - + "A\003\022\033\n\016operation_type\030\013 \001(\tB\003\340A\003\022\030\n\013descr" - + "iption\030\014 \001(\tB\003\340A\003\022S\n\006labels\030\r \003(\0132>.goog" - + "le.cloud.dataproc.v1.ClusterOperationMet" - + "adata.LabelsEntryB\003\340A\003\022\025\n\010warnings\030\016 \003(\t" - + "B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001Bs\n\034com.google.cloud.datapro" - + "c.v1B\017OperationsProtoP\001Z@google.golang.o" - + "rg/genproto/googleapis/cloud/dataproc/v1" - + ";dataprocb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor, - new java.lang.String[] { - "Batch", - "BatchUuid", - "CreateTime", - "DoneTime", - "OperationType", - "Description", - "Labels", - "Warnings", - }); - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_BatchOperationMetadata_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor, - new java.lang.String[] { - "State", "InnerState", "Details", "StateStartTime", - }); - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor, - new java.lang.String[] { - "ClusterName", - "ClusterUuid", - "Status", - "StatusHistory", - "OperationType", - "Description", - "Labels", - "Warnings", - }); - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterOperationMetadata_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJob.java deleted file mode 100644 index fb07a402..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJob.java +++ /dev/null @@ -1,4371 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A job executed by the workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.OrderedJob} - */ -public final class OrderedJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.OrderedJob) - OrderedJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use OrderedJob.newBuilder() to construct. - private OrderedJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OrderedJob() { - stepId_ = ""; - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OrderedJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OrderedJob( - 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(); - - stepId_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.HadoopJob.Builder subBuilder = null; - if (jobTypeCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.HadoopJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.HadoopJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HadoopJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 2; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.SparkJob.Builder subBuilder = null; - if (jobTypeCase_ == 3) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1.PySparkJob.Builder subBuilder = null; - if (jobTypeCase_ == 4) { - subBuilder = ((com.google.cloud.dataproc.v1.PySparkJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.PySparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PySparkJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 4; - break; - } - case 42: - { - com.google.cloud.dataproc.v1.HiveJob.Builder subBuilder = null; - if (jobTypeCase_ == 5) { - subBuilder = ((com.google.cloud.dataproc.v1.HiveJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.HiveJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HiveJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 5; - break; - } - case 50: - { - com.google.cloud.dataproc.v1.PigJob.Builder subBuilder = null; - if (jobTypeCase_ == 6) { - subBuilder = ((com.google.cloud.dataproc.v1.PigJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.PigJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PigJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1.SparkSqlJob.Builder subBuilder = null; - if (jobTypeCase_ == 7) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkSqlJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkSqlJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkSqlJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 7; - 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: - { - com.google.cloud.dataproc.v1.JobScheduling.Builder subBuilder = null; - if (scheduling_ != null) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.dataproc.v1.JobScheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - prerequisiteStepIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - prerequisiteStepIds_.add(s); - break; - } - case 90: - { - com.google.cloud.dataproc.v1.SparkRJob.Builder subBuilder = null; - if (jobTypeCase_ == 11) { - subBuilder = ((com.google.cloud.dataproc.v1.SparkRJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkRJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkRJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 11; - break; - } - case 98: - { - com.google.cloud.dataproc.v1.PrestoJob.Builder subBuilder = null; - if (jobTypeCase_ == 12) { - subBuilder = ((com.google.cloud.dataproc.v1.PrestoJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1.PrestoJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PrestoJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 12; - 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_ & 0x00000002) != 0)) { - prerequisiteStepIds_ = prerequisiteStepIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.OrderedJob.class, - com.google.cloud.dataproc.v1.OrderedJob.Builder.class); - } - - private int jobTypeCase_ = 0; - private java.lang.Object jobType_; - - public enum JobTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HADOOP_JOB(2), - SPARK_JOB(3), - PYSPARK_JOB(4), - HIVE_JOB(5), - PIG_JOB(6), - SPARK_R_JOB(11), - SPARK_SQL_JOB(7), - PRESTO_JOB(12), - JOBTYPE_NOT_SET(0); - private final int value; - - private JobTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static JobTypeCase valueOf(int value) { - return forNumber(value); - } - - public static JobTypeCase forNumber(int value) { - switch (value) { - case 2: - return HADOOP_JOB; - case 3: - return SPARK_JOB; - case 4: - return PYSPARK_JOB; - case 5: - return HIVE_JOB; - case 6: - return PIG_JOB; - case 11: - return SPARK_R_JOB; - case 7: - return SPARK_SQL_JOB; - case 12: - return PRESTO_JOB; - case 0: - return JOBTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public JobTypeCase getJobTypeCase() { - return JobTypeCase.forNumber(jobTypeCase_); - } - - public static final int STEP_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object stepId_; - /** - * - * - *
-   * Required. The step id. The id must be unique among all jobs
-   * within the template.
-   * The step id is used as prefix for job id, as job
-   * `goog-dataproc-workflow-step-id` label, and in
-   * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-   * steps.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepId. - */ - @java.lang.Override - public java.lang.String getStepId() { - java.lang.Object ref = stepId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stepId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The step id. The id must be unique among all jobs
-   * within the template.
-   * The step id is used as prefix for job id, as job
-   * `goog-dataproc-workflow-step-id` label, and in
-   * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-   * steps.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for stepId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStepIdBytes() { - java.lang.Object ref = stepId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stepId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HADOOP_JOB_FIELD_NUMBER = 2; - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return jobTypeCase_ == 2; - } - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - - public static final int SPARK_JOB_FIELD_NUMBER = 3; - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return jobTypeCase_ == 3; - } - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob getSparkJob() { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - - public static final int PYSPARK_JOB_FIELD_NUMBER = 4; - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return jobTypeCase_ == 4; - } - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - - public static final int HIVE_JOB_FIELD_NUMBER = 5; - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return jobTypeCase_ == 5; - } - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob getHiveJob() { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - - public static final int PIG_JOB_FIELD_NUMBER = 6; - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return jobTypeCase_ == 6; - } - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob getPigJob() { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - - public static final int SPARK_R_JOB_FIELD_NUMBER = 11; - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return jobTypeCase_ == 11; - } - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob getSparkRJob() { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - - public static final int SPARK_SQL_JOB_FIELD_NUMBER = 7; - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return jobTypeCase_ == 7; - } - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - - public static final int PRESTO_JOB_FIELD_NUMBER = 12; - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return jobTypeCase_ == 12; - } - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob getPrestoJob() { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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 SCHEDULING_FIELD_NUMBER = 9; - private com.google.cloud.dataproc.v1.JobScheduling scheduling_; - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - @java.lang.Override - public boolean hasScheduling() { - return scheduling_ != null; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobScheduling getScheduling() { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() { - return getScheduling(); - } - - public static final int PREREQUISITE_STEP_IDS_FIELD_NUMBER = 10; - private com.google.protobuf.LazyStringList prerequisiteStepIds_; - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - public com.google.protobuf.ProtocolStringList getPrerequisiteStepIdsList() { - return prerequisiteStepIds_; - } - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of prerequisiteStepIds. - */ - public int getPrerequisiteStepIdsCount() { - return prerequisiteStepIds_.size(); - } - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - public java.lang.String getPrerequisiteStepIds(int index) { - return prerequisiteStepIds_.get(index); - } - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - public com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index) { - return prerequisiteStepIds_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stepId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stepId_); - } - if (jobTypeCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.HadoopJob) jobType_); - } - if (jobTypeCase_ == 3) { - output.writeMessage(3, (com.google.cloud.dataproc.v1.SparkJob) jobType_); - } - if (jobTypeCase_ == 4) { - output.writeMessage(4, (com.google.cloud.dataproc.v1.PySparkJob) jobType_); - } - if (jobTypeCase_ == 5) { - output.writeMessage(5, (com.google.cloud.dataproc.v1.HiveJob) jobType_); - } - if (jobTypeCase_ == 6) { - output.writeMessage(6, (com.google.cloud.dataproc.v1.PigJob) jobType_); - } - if (jobTypeCase_ == 7) { - output.writeMessage(7, (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - if (scheduling_ != null) { - output.writeMessage(9, getScheduling()); - } - for (int i = 0; i < prerequisiteStepIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 10, prerequisiteStepIds_.getRaw(i)); - } - if (jobTypeCase_ == 11) { - output.writeMessage(11, (com.google.cloud.dataproc.v1.SparkRJob) jobType_); - } - if (jobTypeCase_ == 12) { - output.writeMessage(12, (com.google.cloud.dataproc.v1.PrestoJob) jobType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stepId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stepId_); - } - if (jobTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.HadoopJob) jobType_); - } - if (jobTypeCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.dataproc.v1.SparkJob) jobType_); - } - if (jobTypeCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.dataproc.v1.PySparkJob) jobType_); - } - if (jobTypeCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.dataproc.v1.HiveJob) jobType_); - } - if (jobTypeCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1.PigJob) jobType_); - } - if (jobTypeCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_); - } - 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__); - } - if (scheduling_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getScheduling()); - } - { - int dataSize = 0; - for (int i = 0; i < prerequisiteStepIds_.size(); i++) { - dataSize += computeStringSizeNoTag(prerequisiteStepIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getPrerequisiteStepIdsList().size(); - } - if (jobTypeCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, (com.google.cloud.dataproc.v1.SparkRJob) jobType_); - } - if (jobTypeCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.dataproc.v1.PrestoJob) jobType_); - } - 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.dataproc.v1.OrderedJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.OrderedJob other = (com.google.cloud.dataproc.v1.OrderedJob) obj; - - if (!getStepId().equals(other.getStepId())) return false; - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasScheduling() != other.hasScheduling()) return false; - if (hasScheduling()) { - if (!getScheduling().equals(other.getScheduling())) return false; - } - if (!getPrerequisiteStepIdsList().equals(other.getPrerequisiteStepIdsList())) return false; - if (!getJobTypeCase().equals(other.getJobTypeCase())) return false; - switch (jobTypeCase_) { - case 2: - if (!getHadoopJob().equals(other.getHadoopJob())) return false; - break; - case 3: - if (!getSparkJob().equals(other.getSparkJob())) return false; - break; - case 4: - if (!getPysparkJob().equals(other.getPysparkJob())) return false; - break; - case 5: - if (!getHiveJob().equals(other.getHiveJob())) return false; - break; - case 6: - if (!getPigJob().equals(other.getPigJob())) return false; - break; - case 11: - if (!getSparkRJob().equals(other.getSparkRJob())) return false; - break; - case 7: - if (!getSparkSqlJob().equals(other.getSparkSqlJob())) return false; - break; - case 12: - if (!getPrestoJob().equals(other.getPrestoJob())) return false; - break; - case 0: - default: - } - 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) + STEP_ID_FIELD_NUMBER; - hash = (53 * hash) + getStepId().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasScheduling()) { - hash = (37 * hash) + SCHEDULING_FIELD_NUMBER; - hash = (53 * hash) + getScheduling().hashCode(); - } - if (getPrerequisiteStepIdsCount() > 0) { - hash = (37 * hash) + PREREQUISITE_STEP_IDS_FIELD_NUMBER; - hash = (53 * hash) + getPrerequisiteStepIdsList().hashCode(); - } - switch (jobTypeCase_) { - case 2: - hash = (37 * hash) + HADOOP_JOB_FIELD_NUMBER; - hash = (53 * hash) + getHadoopJob().hashCode(); - break; - case 3: - hash = (37 * hash) + SPARK_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkJob().hashCode(); - break; - case 4: - hash = (37 * hash) + PYSPARK_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPysparkJob().hashCode(); - break; - case 5: - hash = (37 * hash) + HIVE_JOB_FIELD_NUMBER; - hash = (53 * hash) + getHiveJob().hashCode(); - break; - case 6: - hash = (37 * hash) + PIG_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPigJob().hashCode(); - break; - case 11: - hash = (37 * hash) + SPARK_R_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkRJob().hashCode(); - break; - case 7: - hash = (37 * hash) + SPARK_SQL_JOB_FIELD_NUMBER; - hash = (53 * hash) + getSparkSqlJob().hashCode(); - break; - case 12: - hash = (37 * hash) + PRESTO_JOB_FIELD_NUMBER; - hash = (53 * hash) + getPrestoJob().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.OrderedJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.OrderedJob 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.dataproc.v1.OrderedJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.OrderedJob parseFrom( - 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.dataproc.v1.OrderedJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.OrderedJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.OrderedJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.OrderedJob 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.dataproc.v1.OrderedJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.OrderedJob 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.dataproc.v1.OrderedJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.OrderedJob 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.dataproc.v1.OrderedJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A job executed by the workflow.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.OrderedJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.OrderedJob) - com.google.cloud.dataproc.v1.OrderedJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - 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(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.OrderedJob.class, - com.google.cloud.dataproc.v1.OrderedJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.OrderedJob.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(); - stepId_ = ""; - - internalGetMutableLabels().clear(); - if (schedulingBuilder_ == null) { - scheduling_ = null; - } else { - scheduling_ = null; - schedulingBuilder_ = null; - } - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - jobTypeCase_ = 0; - jobType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.OrderedJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.OrderedJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.OrderedJob build() { - com.google.cloud.dataproc.v1.OrderedJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.OrderedJob buildPartial() { - com.google.cloud.dataproc.v1.OrderedJob result = - new com.google.cloud.dataproc.v1.OrderedJob(this); - int from_bitField0_ = bitField0_; - result.stepId_ = stepId_; - if (jobTypeCase_ == 2) { - if (hadoopJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = hadoopJobBuilder_.build(); - } - } - if (jobTypeCase_ == 3) { - if (sparkJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = sparkJobBuilder_.build(); - } - } - if (jobTypeCase_ == 4) { - if (pysparkJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = pysparkJobBuilder_.build(); - } - } - if (jobTypeCase_ == 5) { - if (hiveJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = hiveJobBuilder_.build(); - } - } - if (jobTypeCase_ == 6) { - if (pigJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = pigJobBuilder_.build(); - } - } - if (jobTypeCase_ == 11) { - if (sparkRJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = sparkRJobBuilder_.build(); - } - } - if (jobTypeCase_ == 7) { - if (sparkSqlJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = sparkSqlJobBuilder_.build(); - } - } - if (jobTypeCase_ == 12) { - if (prestoJobBuilder_ == null) { - result.jobType_ = jobType_; - } else { - result.jobType_ = prestoJobBuilder_.build(); - } - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (schedulingBuilder_ == null) { - result.scheduling_ = scheduling_; - } else { - result.scheduling_ = schedulingBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - prerequisiteStepIds_ = prerequisiteStepIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.prerequisiteStepIds_ = prerequisiteStepIds_; - result.jobTypeCase_ = jobTypeCase_; - 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.dataproc.v1.OrderedJob) { - return mergeFrom((com.google.cloud.dataproc.v1.OrderedJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.OrderedJob other) { - if (other == com.google.cloud.dataproc.v1.OrderedJob.getDefaultInstance()) return this; - if (!other.getStepId().isEmpty()) { - stepId_ = other.stepId_; - onChanged(); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasScheduling()) { - mergeScheduling(other.getScheduling()); - } - if (!other.prerequisiteStepIds_.isEmpty()) { - if (prerequisiteStepIds_.isEmpty()) { - prerequisiteStepIds_ = other.prerequisiteStepIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.addAll(other.prerequisiteStepIds_); - } - onChanged(); - } - switch (other.getJobTypeCase()) { - case HADOOP_JOB: - { - mergeHadoopJob(other.getHadoopJob()); - break; - } - case SPARK_JOB: - { - mergeSparkJob(other.getSparkJob()); - break; - } - case PYSPARK_JOB: - { - mergePysparkJob(other.getPysparkJob()); - break; - } - case HIVE_JOB: - { - mergeHiveJob(other.getHiveJob()); - break; - } - case PIG_JOB: - { - mergePigJob(other.getPigJob()); - break; - } - case SPARK_R_JOB: - { - mergeSparkRJob(other.getSparkRJob()); - break; - } - case SPARK_SQL_JOB: - { - mergeSparkSqlJob(other.getSparkSqlJob()); - break; - } - case PRESTO_JOB: - { - mergePrestoJob(other.getPrestoJob()); - break; - } - case JOBTYPE_NOT_SET: - { - break; - } - } - 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.dataproc.v1.OrderedJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.OrderedJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int jobTypeCase_ = 0; - private java.lang.Object jobType_; - - public JobTypeCase getJobTypeCase() { - return JobTypeCase.forNumber(jobTypeCase_); - } - - public Builder clearJobType() { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object stepId_ = ""; - /** - * - * - *
-     * Required. The step id. The id must be unique among all jobs
-     * within the template.
-     * The step id is used as prefix for job id, as job
-     * `goog-dataproc-workflow-step-id` label, and in
-     * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-     * steps.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepId. - */ - public java.lang.String getStepId() { - java.lang.Object ref = stepId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stepId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The step id. The id must be unique among all jobs
-     * within the template.
-     * The step id is used as prefix for job id, as job
-     * `goog-dataproc-workflow-step-id` label, and in
-     * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-     * steps.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for stepId. - */ - public com.google.protobuf.ByteString getStepIdBytes() { - java.lang.Object ref = stepId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stepId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The step id. The id must be unique among all jobs
-     * within the template.
-     * The step id is used as prefix for job id, as job
-     * `goog-dataproc-workflow-step-id` label, and in
-     * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-     * steps.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The stepId to set. - * @return This builder for chaining. - */ - public Builder setStepId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stepId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The step id. The id must be unique among all jobs
-     * within the template.
-     * The step id is used as prefix for job id, as job
-     * `goog-dataproc-workflow-step-id` label, and in
-     * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-     * steps.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearStepId() { - - stepId_ = getDefaultInstance().getStepId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The step id. The id must be unique among all jobs
-     * within the template.
-     * The step id is used as prefix for job id, as job
-     * `goog-dataproc-workflow-step-id` label, and in
-     * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-     * steps.
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). Cannot begin or end with underscore
-     * or hyphen. Must consist of between 3 and 50 characters.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for stepId to set. - * @return This builder for chaining. - */ - public Builder setStepIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stepId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder> - hadoopJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return jobTypeCase_ == 2; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 2) { - return hadoopJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - hadoopJobBuilder_.setMessage(value); - } - jobTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1.HadoopJob.Builder builderForValue) { - if (hadoopJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - hadoopJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (jobTypeCase_ == 2 - && jobType_ != com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.HadoopJob.newBuilder( - (com.google.cloud.dataproc.v1.HadoopJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 2) { - hadoopJobBuilder_.mergeFrom(value); - } - hadoopJobBuilder_.setMessage(value); - } - jobTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (jobTypeCase_ == 2) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 2) { - jobTypeCase_ = 0; - jobType_ = null; - } - hadoopJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.HadoopJob.Builder getHadoopJobBuilder() { - return getHadoopJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if ((jobTypeCase_ == 2) && (hadoopJobBuilder_ != null)) { - return hadoopJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder> - getHadoopJobFieldBuilder() { - if (hadoopJobBuilder_ == null) { - if (!(jobTypeCase_ == 2)) { - jobType_ = com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); - } - hadoopJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HadoopJob, - com.google.cloud.dataproc.v1.HadoopJob.Builder, - com.google.cloud.dataproc.v1.HadoopJobOrBuilder>( - (com.google.cloud.dataproc.v1.HadoopJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 2; - onChanged(); - ; - return hadoopJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder> - sparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return jobTypeCase_ == 3; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob getSparkJob() { - if (sparkJobBuilder_ == null) { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 3) { - return sparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1.SparkJob.Builder builderForValue) { - if (sparkJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkJob(com.google.cloud.dataproc.v1.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (jobTypeCase_ == 3 - && jobType_ != com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.SparkJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 3) { - sparkJobBuilder_.mergeFrom(value); - } - sparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkJob() { - if (sparkJobBuilder_ == null) { - if (jobTypeCase_ == 3) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 3) { - jobTypeCase_ = 0; - jobType_ = null; - } - sparkJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkJob.Builder getSparkJobBuilder() { - return getSparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() { - if ((jobTypeCase_ == 3) && (sparkJobBuilder_ != null)) { - return sparkJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder> - getSparkJobFieldBuilder() { - if (sparkJobBuilder_ == null) { - if (!(jobTypeCase_ == 3)) { - jobType_ = com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - sparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkJob, - com.google.cloud.dataproc.v1.SparkJob.Builder, - com.google.cloud.dataproc.v1.SparkJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 3; - onChanged(); - ; - return sparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder> - pysparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return jobTypeCase_ == 4; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 4) { - return pysparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - pysparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1.PySparkJob.Builder builderForValue) { - if (pysparkJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - pysparkJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (jobTypeCase_ == 4 - && jobType_ != com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.PySparkJob.newBuilder( - (com.google.cloud.dataproc.v1.PySparkJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 4) { - pysparkJobBuilder_.mergeFrom(value); - } - pysparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 4; - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (jobTypeCase_ == 4) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 4) { - jobTypeCase_ = 0; - jobType_ = null; - } - pysparkJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PySparkJob.Builder getPysparkJobBuilder() { - return getPysparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if ((jobTypeCase_ == 4) && (pysparkJobBuilder_ != null)) { - return pysparkJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder> - getPysparkJobFieldBuilder() { - if (pysparkJobBuilder_ == null) { - if (!(jobTypeCase_ == 4)) { - jobType_ = com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - pysparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PySparkJob, - com.google.cloud.dataproc.v1.PySparkJob.Builder, - com.google.cloud.dataproc.v1.PySparkJobOrBuilder>( - (com.google.cloud.dataproc.v1.PySparkJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 4; - onChanged(); - ; - return pysparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder> - hiveJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return jobTypeCase_ == 5; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJob getHiveJob() { - if (hiveJobBuilder_ == null) { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 5) { - return hiveJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - hiveJobBuilder_.setMessage(value); - } - jobTypeCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1.HiveJob.Builder builderForValue) { - if (hiveJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - hiveJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHiveJob(com.google.cloud.dataproc.v1.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (jobTypeCase_ == 5 - && jobType_ != com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.HiveJob.newBuilder( - (com.google.cloud.dataproc.v1.HiveJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 5) { - hiveJobBuilder_.mergeFrom(value); - } - hiveJobBuilder_.setMessage(value); - } - jobTypeCase_ = 5; - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearHiveJob() { - if (hiveJobBuilder_ == null) { - if (jobTypeCase_ == 5) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 5) { - jobTypeCase_ = 0; - jobType_ = null; - } - hiveJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.HiveJob.Builder getHiveJobBuilder() { - return getHiveJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() { - if ((jobTypeCase_ == 5) && (hiveJobBuilder_ != null)) { - return hiveJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder> - getHiveJobFieldBuilder() { - if (hiveJobBuilder_ == null) { - if (!(jobTypeCase_ == 5)) { - jobType_ = com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance(); - } - hiveJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.HiveJob, - com.google.cloud.dataproc.v1.HiveJob.Builder, - com.google.cloud.dataproc.v1.HiveJobOrBuilder>( - (com.google.cloud.dataproc.v1.HiveJob) jobType_, getParentForChildren(), isClean()); - jobType_ = null; - } - jobTypeCase_ = 5; - onChanged(); - ; - return hiveJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder> - pigJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return jobTypeCase_ == 6; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob getPigJob() { - if (pigJobBuilder_ == null) { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 6) { - return pigJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1.PigJob value) { - if (pigJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - pigJobBuilder_.setMessage(value); - } - jobTypeCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1.PigJob.Builder builderForValue) { - if (pigJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - pigJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePigJob(com.google.cloud.dataproc.v1.PigJob value) { - if (pigJobBuilder_ == null) { - if (jobTypeCase_ == 6 - && jobType_ != com.google.cloud.dataproc.v1.PigJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.PigJob.newBuilder( - (com.google.cloud.dataproc.v1.PigJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 6) { - pigJobBuilder_.mergeFrom(value); - } - pigJobBuilder_.setMessage(value); - } - jobTypeCase_ = 6; - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPigJob() { - if (pigJobBuilder_ == null) { - if (jobTypeCase_ == 6) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 6) { - jobTypeCase_ = 0; - jobType_ = null; - } - pigJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PigJob.Builder getPigJobBuilder() { - return getPigJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() { - if ((jobTypeCase_ == 6) && (pigJobBuilder_ != null)) { - return pigJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder> - getPigJobFieldBuilder() { - if (pigJobBuilder_ == null) { - if (!(jobTypeCase_ == 6)) { - jobType_ = com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - pigJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PigJob, - com.google.cloud.dataproc.v1.PigJob.Builder, - com.google.cloud.dataproc.v1.PigJobOrBuilder>( - (com.google.cloud.dataproc.v1.PigJob) jobType_, getParentForChildren(), isClean()); - jobType_ = null; - } - jobTypeCase_ = 6; - onChanged(); - ; - return pigJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder> - sparkRJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return jobTypeCase_ == 11; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob getSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 11) { - return sparkRJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkRJobBuilder_.setMessage(value); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1.SparkRJob.Builder builderForValue) { - if (sparkRJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkRJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkRJob(com.google.cloud.dataproc.v1.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (jobTypeCase_ == 11 - && jobType_ != com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.SparkRJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkRJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 11) { - sparkRJobBuilder_.mergeFrom(value); - } - sparkRJobBuilder_.setMessage(value); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (jobTypeCase_ == 11) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 11) { - jobTypeCase_ = 0; - jobType_ = null; - } - sparkRJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkRJob.Builder getSparkRJobBuilder() { - return getSparkRJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if ((jobTypeCase_ == 11) && (sparkRJobBuilder_ != null)) { - return sparkRJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder> - getSparkRJobFieldBuilder() { - if (sparkRJobBuilder_ == null) { - if (!(jobTypeCase_ == 11)) { - jobType_ = com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - sparkRJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkRJob, - com.google.cloud.dataproc.v1.SparkRJob.Builder, - com.google.cloud.dataproc.v1.SparkRJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkRJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 11; - onChanged(); - ; - return sparkRJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> - sparkSqlJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return jobTypeCase_ == 7; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 7) { - return sparkSqlJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(value); - } - jobTypeCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob( - com.google.cloud.dataproc.v1.SparkSqlJob.Builder builderForValue) { - if (sparkSqlJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (jobTypeCase_ == 7 - && jobType_ != com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.SparkSqlJob.newBuilder( - (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 7) { - sparkSqlJobBuilder_.mergeFrom(value); - } - sparkSqlJobBuilder_.setMessage(value); - } - jobTypeCase_ = 7; - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (jobTypeCase_ == 7) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 7) { - jobTypeCase_ = 0; - jobType_ = null; - } - sparkSqlJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkSqlJob.Builder getSparkSqlJobBuilder() { - return getSparkSqlJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if ((jobTypeCase_ == 7) && (sparkSqlJobBuilder_ != null)) { - return sparkSqlJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> - getSparkSqlJobFieldBuilder() { - if (sparkSqlJobBuilder_ == null) { - if (!(jobTypeCase_ == 7)) { - jobType_ = com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - sparkSqlJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkSqlJob, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder>( - (com.google.cloud.dataproc.v1.SparkSqlJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 7; - onChanged(); - ; - return sparkSqlJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder> - prestoJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return jobTypeCase_ == 12; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob getPrestoJob() { - if (prestoJobBuilder_ == null) { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 12) { - return prestoJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - prestoJobBuilder_.setMessage(value); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1.PrestoJob.Builder builderForValue) { - if (prestoJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - prestoJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePrestoJob(com.google.cloud.dataproc.v1.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (jobTypeCase_ == 12 - && jobType_ != com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1.PrestoJob.newBuilder( - (com.google.cloud.dataproc.v1.PrestoJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 12) { - prestoJobBuilder_.mergeFrom(value); - } - prestoJobBuilder_.setMessage(value); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPrestoJob() { - if (prestoJobBuilder_ == null) { - if (jobTypeCase_ == 12) { - jobTypeCase_ = 0; - jobType_ = null; - onChanged(); - } - } else { - if (jobTypeCase_ == 12) { - jobTypeCase_ = 0; - jobType_ = null; - } - prestoJobBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.PrestoJob.Builder getPrestoJobBuilder() { - return getPrestoJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if ((jobTypeCase_ == 12) && (prestoJobBuilder_ != null)) { - return prestoJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder> - getPrestoJobFieldBuilder() { - if (prestoJobBuilder_ == null) { - if (!(jobTypeCase_ == 12)) { - jobType_ = com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - prestoJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.PrestoJob, - com.google.cloud.dataproc.v1.PrestoJob.Builder, - com.google.cloud.dataproc.v1.PrestoJobOrBuilder>( - (com.google.cloud.dataproc.v1.PrestoJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 12; - onChanged(); - ; - return prestoJobBuilder_; - } - - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this job.
-     * Label keys must be between 1 and 63 characters long, and must conform to
-     * the following regular expression:
-     * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-     * Label values must be between 1 and 63 characters long, and must conform to
-     * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-     * No more than 32 labels can be associated with a given job.
-     * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.JobScheduling scheduling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> - schedulingBuilder_; - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - public boolean hasScheduling() { - return schedulingBuilder_ != null || scheduling_ != null; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - public com.google.cloud.dataproc.v1.JobScheduling getScheduling() { - if (schedulingBuilder_ == null) { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } else { - return schedulingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling(com.google.cloud.dataproc.v1.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - scheduling_ = value; - onChanged(); - } else { - schedulingBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling( - com.google.cloud.dataproc.v1.JobScheduling.Builder builderForValue) { - if (schedulingBuilder_ == null) { - scheduling_ = builderForValue.build(); - onChanged(); - } else { - schedulingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeScheduling(com.google.cloud.dataproc.v1.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (scheduling_ != null) { - scheduling_ = - com.google.cloud.dataproc.v1.JobScheduling.newBuilder(scheduling_) - .mergeFrom(value) - .buildPartial(); - } else { - scheduling_ = value; - } - onChanged(); - } else { - schedulingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearScheduling() { - if (schedulingBuilder_ == null) { - scheduling_ = null; - onChanged(); - } else { - scheduling_ = null; - schedulingBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobScheduling.Builder getSchedulingBuilder() { - - onChanged(); - return getSchedulingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() { - if (schedulingBuilder_ != null) { - return schedulingBuilder_.getMessageOrBuilder(); - } else { - return scheduling_ == null - ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() - : scheduling_; - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> - getSchedulingFieldBuilder() { - if (schedulingBuilder_ == null) { - schedulingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.JobScheduling, - com.google.cloud.dataproc.v1.JobScheduling.Builder, - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder>( - getScheduling(), getParentForChildren(), isClean()); - scheduling_ = null; - } - return schedulingBuilder_; - } - - private com.google.protobuf.LazyStringList prerequisiteStepIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePrerequisiteStepIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - prerequisiteStepIds_ = new com.google.protobuf.LazyStringArrayList(prerequisiteStepIds_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - public com.google.protobuf.ProtocolStringList getPrerequisiteStepIdsList() { - return prerequisiteStepIds_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of prerequisiteStepIds. - */ - public int getPrerequisiteStepIdsCount() { - return prerequisiteStepIds_.size(); - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - public java.lang.String getPrerequisiteStepIds(int index) { - return prerequisiteStepIds_.get(index); - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - public com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index) { - return prerequisiteStepIds_.getByteString(index); - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The prerequisiteStepIds to set. - * @return This builder for chaining. - */ - public Builder setPrerequisiteStepIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addPrerequisiteStepIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addAllPrerequisiteStepIds(java.lang.Iterable values) { - ensurePrerequisiteStepIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, prerequisiteStepIds_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearPrerequisiteStepIds() { - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The optional list of prerequisite job step_ids.
-     * If not specified, the job will start at the beginning of workflow.
-     * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addPrerequisiteStepIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.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.dataproc.v1.OrderedJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.OrderedJob) - private static final com.google.cloud.dataproc.v1.OrderedJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.OrderedJob(); - } - - public static com.google.cloud.dataproc.v1.OrderedJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OrderedJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OrderedJob(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.dataproc.v1.OrderedJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJobOrBuilder.java deleted file mode 100644 index 198e4fca..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJobOrBuilder.java +++ /dev/null @@ -1,574 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface OrderedJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.OrderedJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The step id. The id must be unique among all jobs
-   * within the template.
-   * The step id is used as prefix for job id, as job
-   * `goog-dataproc-workflow-step-id` label, and in
-   * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-   * steps.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The stepId. - */ - java.lang.String getStepId(); - /** - * - * - *
-   * Required. The step id. The id must be unique among all jobs
-   * within the template.
-   * The step id is used as prefix for job id, as job
-   * `goog-dataproc-workflow-step-id` label, and in
-   * [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other
-   * steps.
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). Cannot begin or end with underscore
-   * or hyphen. Must consist of between 3 and 50 characters.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for stepId. - */ - com.google.protobuf.ByteString getStepIdBytes(); - - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hadoopJob field is set. - */ - boolean hasHadoopJob(); - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - com.google.cloud.dataproc.v1.HadoopJob getHadoopJob(); - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1.HadoopJob hadoop_job = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkJob field is set. - */ - boolean hasSparkJob(); - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - com.google.cloud.dataproc.v1.SparkJob getSparkJob(); - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkJob spark_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pysparkJob field is set. - */ - boolean hasPysparkJob(); - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - com.google.cloud.dataproc.v1.PySparkJob getPysparkJob(); - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PySparkJob pyspark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the hiveJob field is set. - */ - boolean hasHiveJob(); - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - com.google.cloud.dataproc.v1.HiveJob getHiveJob(); - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * .google.cloud.dataproc.v1.HiveJob hive_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the pigJob field is set. - */ - boolean hasPigJob(); - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - com.google.cloud.dataproc.v1.PigJob getPigJob(); - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * .google.cloud.dataproc.v1.PigJob pig_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkRJob field is set. - */ - boolean hasSparkRJob(); - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - com.google.cloud.dataproc.v1.SparkRJob getSparkRJob(); - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkRJob spark_r_job = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkRJobOrBuilder getSparkRJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkSqlJob field is set. - */ - boolean hasSparkSqlJob(); - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob(); - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the prestoJob field is set. - */ - boolean hasPrestoJob(); - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - com.google.cloud.dataproc.v1.PrestoJob getPrestoJob(); - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1.PrestoJob presto_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.PrestoJobOrBuilder getPrestoJobOrBuilder(); - - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this job.
-   * Label keys must be between 1 and 63 characters long, and must conform to
-   * the following regular expression:
-   * [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
-   * Label values must be between 1 and 63 characters long, and must conform to
-   * the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
-   * No more than 32 labels can be associated with a given job.
-   * 
- * - * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - boolean hasScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - com.google.cloud.dataproc.v1.JobScheduling getScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder(); - - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - java.util.List getPrerequisiteStepIdsList(); - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of prerequisiteStepIds. - */ - int getPrerequisiteStepIdsCount(); - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - java.lang.String getPrerequisiteStepIds(int index); - /** - * - * - *
-   * Optional. The optional list of prerequisite job step_ids.
-   * If not specified, the job will start at the beginning of workflow.
-   * 
- * - * repeated string prerequisite_step_ids = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index); - - public com.google.cloud.dataproc.v1.OrderedJob.JobTypeCase getJobTypeCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidation.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidation.java deleted file mode 100644 index 34f525c5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidation.java +++ /dev/null @@ -1,1144 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Configuration for parameter validation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ParameterValidation} - */ -public final class ParameterValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ParameterValidation) - ParameterValidationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ParameterValidation.newBuilder() to construct. - private ParameterValidation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ParameterValidation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ParameterValidation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ParameterValidation( - 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.dataproc.v1.RegexValidation.Builder subBuilder = null; - if (validationTypeCase_ == 1) { - subBuilder = - ((com.google.cloud.dataproc.v1.RegexValidation) validationType_).toBuilder(); - } - validationType_ = - input.readMessage( - com.google.cloud.dataproc.v1.RegexValidation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1.RegexValidation) validationType_); - validationType_ = subBuilder.buildPartial(); - } - validationTypeCase_ = 1; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.ValueValidation.Builder subBuilder = null; - if (validationTypeCase_ == 2) { - subBuilder = - ((com.google.cloud.dataproc.v1.ValueValidation) validationType_).toBuilder(); - } - validationType_ = - input.readMessage( - com.google.cloud.dataproc.v1.ValueValidation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1.ValueValidation) validationType_); - validationType_ = subBuilder.buildPartial(); - } - validationTypeCase_ = 2; - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ParameterValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ParameterValidation.class, - com.google.cloud.dataproc.v1.ParameterValidation.Builder.class); - } - - private int validationTypeCase_ = 0; - private java.lang.Object validationType_; - - public enum ValidationTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REGEX(1), - VALUES(2), - VALIDATIONTYPE_NOT_SET(0); - private final int value; - - private ValidationTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValidationTypeCase valueOf(int value) { - return forNumber(value); - } - - public static ValidationTypeCase forNumber(int value) { - switch (value) { - case 1: - return REGEX; - case 2: - return VALUES; - case 0: - return VALIDATIONTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ValidationTypeCase getValidationTypeCase() { - return ValidationTypeCase.forNumber(validationTypeCase_); - } - - public static final int REGEX_FIELD_NUMBER = 1; - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return validationTypeCase_ == 1; - } - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return The regex. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidation getRegex() { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidationOrBuilder getRegexOrBuilder() { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - - public static final int VALUES_FIELD_NUMBER = 2; - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return Whether the values field is set. - */ - @java.lang.Override - public boolean hasValues() { - return validationTypeCase_ == 2; - } - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return The values. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidation getValues() { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidationOrBuilder getValuesOrBuilder() { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (validationTypeCase_ == 1) { - output.writeMessage(1, (com.google.cloud.dataproc.v1.RegexValidation) validationType_); - } - if (validationTypeCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.ValueValidation) validationType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (validationTypeCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.dataproc.v1.RegexValidation) validationType_); - } - if (validationTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.ValueValidation) validationType_); - } - 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.dataproc.v1.ParameterValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ParameterValidation other = - (com.google.cloud.dataproc.v1.ParameterValidation) obj; - - if (!getValidationTypeCase().equals(other.getValidationTypeCase())) return false; - switch (validationTypeCase_) { - case 1: - if (!getRegex().equals(other.getRegex())) return false; - break; - case 2: - if (!getValues().equals(other.getValues())) return false; - break; - case 0: - default: - } - 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(); - switch (validationTypeCase_) { - case 1: - hash = (37 * hash) + REGEX_FIELD_NUMBER; - hash = (53 * hash) + getRegex().hashCode(); - break; - case 2: - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValues().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ParameterValidation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation 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.dataproc.v1.ParameterValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation parseFrom( - 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.dataproc.v1.ParameterValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation 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.dataproc.v1.ParameterValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation 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.dataproc.v1.ParameterValidation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation 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.dataproc.v1.ParameterValidation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Configuration for parameter validation.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ParameterValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ParameterValidation) - com.google.cloud.dataproc.v1.ParameterValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ParameterValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ParameterValidation.class, - com.google.cloud.dataproc.v1.ParameterValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ParameterValidation.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(); - validationTypeCase_ = 0; - validationType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ParameterValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ParameterValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ParameterValidation build() { - com.google.cloud.dataproc.v1.ParameterValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ParameterValidation buildPartial() { - com.google.cloud.dataproc.v1.ParameterValidation result = - new com.google.cloud.dataproc.v1.ParameterValidation(this); - if (validationTypeCase_ == 1) { - if (regexBuilder_ == null) { - result.validationType_ = validationType_; - } else { - result.validationType_ = regexBuilder_.build(); - } - } - if (validationTypeCase_ == 2) { - if (valuesBuilder_ == null) { - result.validationType_ = validationType_; - } else { - result.validationType_ = valuesBuilder_.build(); - } - } - result.validationTypeCase_ = validationTypeCase_; - 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.dataproc.v1.ParameterValidation) { - return mergeFrom((com.google.cloud.dataproc.v1.ParameterValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ParameterValidation other) { - if (other == com.google.cloud.dataproc.v1.ParameterValidation.getDefaultInstance()) - return this; - switch (other.getValidationTypeCase()) { - case REGEX: - { - mergeRegex(other.getRegex()); - break; - } - case VALUES: - { - mergeValues(other.getValues()); - break; - } - case VALIDATIONTYPE_NOT_SET: - { - break; - } - } - 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.dataproc.v1.ParameterValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ParameterValidation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int validationTypeCase_ = 0; - private java.lang.Object validationType_; - - public ValidationTypeCase getValidationTypeCase() { - return ValidationTypeCase.forNumber(validationTypeCase_); - } - - public Builder clearValidationType() { - validationTypeCase_ = 0; - validationType_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RegexValidation, - com.google.cloud.dataproc.v1.RegexValidation.Builder, - com.google.cloud.dataproc.v1.RegexValidationOrBuilder> - regexBuilder_; - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return validationTypeCase_ == 1; - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return The regex. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidation getRegex() { - if (regexBuilder_ == null) { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } else { - if (validationTypeCase_ == 1) { - return regexBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - public Builder setRegex(com.google.cloud.dataproc.v1.RegexValidation value) { - if (regexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - validationType_ = value; - onChanged(); - } else { - regexBuilder_.setMessage(value); - } - validationTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - public Builder setRegex(com.google.cloud.dataproc.v1.RegexValidation.Builder builderForValue) { - if (regexBuilder_ == null) { - validationType_ = builderForValue.build(); - onChanged(); - } else { - regexBuilder_.setMessage(builderForValue.build()); - } - validationTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - public Builder mergeRegex(com.google.cloud.dataproc.v1.RegexValidation value) { - if (regexBuilder_ == null) { - if (validationTypeCase_ == 1 - && validationType_ - != com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance()) { - validationType_ = - com.google.cloud.dataproc.v1.RegexValidation.newBuilder( - (com.google.cloud.dataproc.v1.RegexValidation) validationType_) - .mergeFrom(value) - .buildPartial(); - } else { - validationType_ = value; - } - onChanged(); - } else { - if (validationTypeCase_ == 1) { - regexBuilder_.mergeFrom(value); - } - regexBuilder_.setMessage(value); - } - validationTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - public Builder clearRegex() { - if (regexBuilder_ == null) { - if (validationTypeCase_ == 1) { - validationTypeCase_ = 0; - validationType_ = null; - onChanged(); - } - } else { - if (validationTypeCase_ == 1) { - validationTypeCase_ = 0; - validationType_ = null; - } - regexBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - public com.google.cloud.dataproc.v1.RegexValidation.Builder getRegexBuilder() { - return getRegexFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidationOrBuilder getRegexOrBuilder() { - if ((validationTypeCase_ == 1) && (regexBuilder_ != null)) { - return regexBuilder_.getMessageOrBuilder(); - } else { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RegexValidation, - com.google.cloud.dataproc.v1.RegexValidation.Builder, - com.google.cloud.dataproc.v1.RegexValidationOrBuilder> - getRegexFieldBuilder() { - if (regexBuilder_ == null) { - if (!(validationTypeCase_ == 1)) { - validationType_ = com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - regexBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.RegexValidation, - com.google.cloud.dataproc.v1.RegexValidation.Builder, - com.google.cloud.dataproc.v1.RegexValidationOrBuilder>( - (com.google.cloud.dataproc.v1.RegexValidation) validationType_, - getParentForChildren(), - isClean()); - validationType_ = null; - } - validationTypeCase_ = 1; - onChanged(); - ; - return regexBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ValueValidation, - com.google.cloud.dataproc.v1.ValueValidation.Builder, - com.google.cloud.dataproc.v1.ValueValidationOrBuilder> - valuesBuilder_; - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return Whether the values field is set. - */ - @java.lang.Override - public boolean hasValues() { - return validationTypeCase_ == 2; - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return The values. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidation getValues() { - if (valuesBuilder_ == null) { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } else { - if (validationTypeCase_ == 2) { - return valuesBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - public Builder setValues(com.google.cloud.dataproc.v1.ValueValidation value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - validationType_ = value; - onChanged(); - } else { - valuesBuilder_.setMessage(value); - } - validationTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - public Builder setValues(com.google.cloud.dataproc.v1.ValueValidation.Builder builderForValue) { - if (valuesBuilder_ == null) { - validationType_ = builderForValue.build(); - onChanged(); - } else { - valuesBuilder_.setMessage(builderForValue.build()); - } - validationTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - public Builder mergeValues(com.google.cloud.dataproc.v1.ValueValidation value) { - if (valuesBuilder_ == null) { - if (validationTypeCase_ == 2 - && validationType_ - != com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance()) { - validationType_ = - com.google.cloud.dataproc.v1.ValueValidation.newBuilder( - (com.google.cloud.dataproc.v1.ValueValidation) validationType_) - .mergeFrom(value) - .buildPartial(); - } else { - validationType_ = value; - } - onChanged(); - } else { - if (validationTypeCase_ == 2) { - valuesBuilder_.mergeFrom(value); - } - valuesBuilder_.setMessage(value); - } - validationTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - if (validationTypeCase_ == 2) { - validationTypeCase_ = 0; - validationType_ = null; - onChanged(); - } - } else { - if (validationTypeCase_ == 2) { - validationTypeCase_ = 0; - validationType_ = null; - } - valuesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - public com.google.cloud.dataproc.v1.ValueValidation.Builder getValuesBuilder() { - return getValuesFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidationOrBuilder getValuesOrBuilder() { - if ((validationTypeCase_ == 2) && (valuesBuilder_ != null)) { - return valuesBuilder_.getMessageOrBuilder(); - } else { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ValueValidation, - com.google.cloud.dataproc.v1.ValueValidation.Builder, - com.google.cloud.dataproc.v1.ValueValidationOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - if (!(validationTypeCase_ == 2)) { - validationType_ = com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - valuesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ValueValidation, - com.google.cloud.dataproc.v1.ValueValidation.Builder, - com.google.cloud.dataproc.v1.ValueValidationOrBuilder>( - (com.google.cloud.dataproc.v1.ValueValidation) validationType_, - getParentForChildren(), - isClean()); - validationType_ = null; - } - validationTypeCase_ = 2; - onChanged(); - ; - return valuesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.ParameterValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ParameterValidation) - private static final com.google.cloud.dataproc.v1.ParameterValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ParameterValidation(); - } - - public static com.google.cloud.dataproc.v1.ParameterValidation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ParameterValidation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ParameterValidation(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.dataproc.v1.ParameterValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidationOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidationOrBuilder.java deleted file mode 100644 index 5528b51c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidationOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ParameterValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ParameterValidation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return Whether the regex field is set. - */ - boolean hasRegex(); - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - * - * @return The regex. - */ - com.google.cloud.dataproc.v1.RegexValidation getRegex(); - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1.RegexValidation regex = 1; - */ - com.google.cloud.dataproc.v1.RegexValidationOrBuilder getRegexOrBuilder(); - - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return Whether the values field is set. - */ - boolean hasValues(); - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - * - * @return The values. - */ - com.google.cloud.dataproc.v1.ValueValidation getValues(); - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1.ValueValidation values = 2; - */ - com.google.cloud.dataproc.v1.ValueValidationOrBuilder getValuesOrBuilder(); - - public com.google.cloud.dataproc.v1.ParameterValidation.ValidationTypeCase - getValidationTypeCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfig.java deleted file mode 100644 index 0b2be90d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfig.java +++ /dev/null @@ -1,959 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Auxiliary services configuration for a workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PeripheralsConfig} - */ -public final class PeripheralsConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.PeripheralsConfig) - PeripheralsConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use PeripheralsConfig.newBuilder() to construct. - private PeripheralsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PeripheralsConfig() { - metastoreService_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PeripheralsConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PeripheralsConfig( - 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(); - - metastoreService_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder subBuilder = null; - if (sparkHistoryServerConfig_ != null) { - subBuilder = sparkHistoryServerConfig_.toBuilder(); - } - sparkHistoryServerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sparkHistoryServerConfig_); - sparkHistoryServerConfig_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_PeripheralsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PeripheralsConfig.class, - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder.class); - } - - public static final int METASTORE_SERVICE_FIELD_NUMBER = 1; - private volatile java.lang.Object metastoreService_; - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[region]/services/[service_id]`
-   * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metastoreService. - */ - @java.lang.Override - public java.lang.String getMetastoreService() { - java.lang.Object ref = metastoreService_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metastoreService_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[region]/services/[service_id]`
-   * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metastoreService. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMetastoreServiceBytes() { - java.lang.Object ref = metastoreService_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metastoreService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SPARK_HISTORY_SERVER_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.SparkHistoryServerConfig sparkHistoryServerConfig_; - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - @java.lang.Override - public boolean hasSparkHistoryServerConfig() { - return sparkHistoryServerConfig_ != null; - } - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig() { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder() { - return getSparkHistoryServerConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metastoreService_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metastoreService_); - } - if (sparkHistoryServerConfig_ != null) { - output.writeMessage(2, getSparkHistoryServerConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metastoreService_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metastoreService_); - } - if (sparkHistoryServerConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, getSparkHistoryServerConfig()); - } - 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.dataproc.v1.PeripheralsConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.PeripheralsConfig other = - (com.google.cloud.dataproc.v1.PeripheralsConfig) obj; - - if (!getMetastoreService().equals(other.getMetastoreService())) return false; - if (hasSparkHistoryServerConfig() != other.hasSparkHistoryServerConfig()) return false; - if (hasSparkHistoryServerConfig()) { - if (!getSparkHistoryServerConfig().equals(other.getSparkHistoryServerConfig())) 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) + METASTORE_SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getMetastoreService().hashCode(); - if (hasSparkHistoryServerConfig()) { - hash = (37 * hash) + SPARK_HISTORY_SERVER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSparkHistoryServerConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig 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.dataproc.v1.PeripheralsConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig parseFrom( - 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.dataproc.v1.PeripheralsConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig 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.dataproc.v1.PeripheralsConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig 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.dataproc.v1.PeripheralsConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig 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.dataproc.v1.PeripheralsConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Auxiliary services configuration for a workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PeripheralsConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.PeripheralsConfig) - com.google.cloud.dataproc.v1.PeripheralsConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_PeripheralsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PeripheralsConfig.class, - com.google.cloud.dataproc.v1.PeripheralsConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.PeripheralsConfig.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(); - metastoreService_ = ""; - - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = null; - } else { - sparkHistoryServerConfig_ = null; - sparkHistoryServerConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PeripheralsConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.PeripheralsConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PeripheralsConfig build() { - com.google.cloud.dataproc.v1.PeripheralsConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PeripheralsConfig buildPartial() { - com.google.cloud.dataproc.v1.PeripheralsConfig result = - new com.google.cloud.dataproc.v1.PeripheralsConfig(this); - result.metastoreService_ = metastoreService_; - if (sparkHistoryServerConfigBuilder_ == null) { - result.sparkHistoryServerConfig_ = sparkHistoryServerConfig_; - } else { - result.sparkHistoryServerConfig_ = sparkHistoryServerConfigBuilder_.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.dataproc.v1.PeripheralsConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.PeripheralsConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.PeripheralsConfig other) { - if (other == com.google.cloud.dataproc.v1.PeripheralsConfig.getDefaultInstance()) return this; - if (!other.getMetastoreService().isEmpty()) { - metastoreService_ = other.metastoreService_; - onChanged(); - } - if (other.hasSparkHistoryServerConfig()) { - mergeSparkHistoryServerConfig(other.getSparkHistoryServerConfig()); - } - 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.dataproc.v1.PeripheralsConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.PeripheralsConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object metastoreService_ = ""; - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[region]/services/[service_id]`
-     * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metastoreService. - */ - public java.lang.String getMetastoreService() { - java.lang.Object ref = metastoreService_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - metastoreService_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[region]/services/[service_id]`
-     * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metastoreService. - */ - public com.google.protobuf.ByteString getMetastoreServiceBytes() { - java.lang.Object ref = metastoreService_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - metastoreService_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[region]/services/[service_id]`
-     * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The metastoreService to set. - * @return This builder for chaining. - */ - public Builder setMetastoreService(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - metastoreService_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[region]/services/[service_id]`
-     * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMetastoreService() { - - metastoreService_ = getDefaultInstance().getMetastoreService(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Metastore service.
-     * Example:
-     * * `projects/[project_id]/locations/[region]/services/[service_id]`
-     * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for metastoreService to set. - * @return This builder for chaining. - */ - public Builder setMetastoreServiceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - metastoreService_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.SparkHistoryServerConfig sparkHistoryServerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder> - sparkHistoryServerConfigBuilder_; - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - public boolean hasSparkHistoryServerConfig() { - return sparkHistoryServerConfigBuilder_ != null || sparkHistoryServerConfig_ != null; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig() { - if (sparkHistoryServerConfigBuilder_ == null) { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } else { - return sparkHistoryServerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig value) { - if (sparkHistoryServerConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sparkHistoryServerConfig_ = value; - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder builderForValue) { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = builderForValue.build(); - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkHistoryServerConfig( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig value) { - if (sparkHistoryServerConfigBuilder_ == null) { - if (sparkHistoryServerConfig_ != null) { - sparkHistoryServerConfig_ = - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.newBuilder( - sparkHistoryServerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - sparkHistoryServerConfig_ = value; - } - onChanged(); - } else { - sparkHistoryServerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSparkHistoryServerConfig() { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfig_ = null; - onChanged(); - } else { - sparkHistoryServerConfig_ = null; - sparkHistoryServerConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder - getSparkHistoryServerConfigBuilder() { - - onChanged(); - return getSparkHistoryServerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder() { - if (sparkHistoryServerConfigBuilder_ != null) { - return sparkHistoryServerConfigBuilder_.getMessageOrBuilder(); - } else { - return sparkHistoryServerConfig_ == null - ? com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance() - : sparkHistoryServerConfig_; - } - } - /** - * - * - *
-     * Optional. The Spark History Server configuration for the workload.
-     * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder> - getSparkHistoryServerConfigFieldBuilder() { - if (sparkHistoryServerConfigBuilder_ == null) { - sparkHistoryServerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.SparkHistoryServerConfig, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder, - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder>( - getSparkHistoryServerConfig(), getParentForChildren(), isClean()); - sparkHistoryServerConfig_ = null; - } - return sparkHistoryServerConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.PeripheralsConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.PeripheralsConfig) - private static final com.google.cloud.dataproc.v1.PeripheralsConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.PeripheralsConfig(); - } - - public static com.google.cloud.dataproc.v1.PeripheralsConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PeripheralsConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PeripheralsConfig(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.dataproc.v1.PeripheralsConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfigOrBuilder.java deleted file mode 100644 index 9797286c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PeripheralsConfigOrBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface PeripheralsConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.PeripheralsConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[region]/services/[service_id]`
-   * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The metastoreService. - */ - java.lang.String getMetastoreService(); - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Metastore service.
-   * Example:
-   * * `projects/[project_id]/locations/[region]/services/[service_id]`
-   * 
- * - * string metastore_service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for metastoreService. - */ - com.google.protobuf.ByteString getMetastoreServiceBytes(); - - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the sparkHistoryServerConfig field is set. - */ - boolean hasSparkHistoryServerConfig(); - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkHistoryServerConfig. - */ - com.google.cloud.dataproc.v1.SparkHistoryServerConfig getSparkHistoryServerConfig(); - /** - * - * - *
-   * Optional. The Spark History Server configuration for the workload.
-   * 
- * - * - * .google.cloud.dataproc.v1.SparkHistoryServerConfig spark_history_server_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder - getSparkHistoryServerConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java deleted file mode 100644 index 6eed2768..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java +++ /dev/null @@ -1,2467 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running [Apache Pig](https://pig.apache.org/)
- * queries on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PigJob} - */ -public final class PigJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.PigJob) - PigJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use PigJob.newBuilder() to construct. - private PigJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PigJob() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PigJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PigJob( - 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(); - queriesCase_ = 1; - queries_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.QueryList) queries_); - queries_ = subBuilder.buildPartial(); - } - queriesCase_ = 2; - break; - } - case 24: - { - continueOnFailure_ = input.readBool(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry scriptVariables__ = - input.readMessage( - ScriptVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - scriptVariables_ - .getMutableMap() - .put(scriptVariables__.getKey(), scriptVariables__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jarFileUris_.add(s); - break; - } - case 58: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetScriptVariables(); - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PigJob.class, - com.google.cloud.dataproc.v1.PigJob.Builder.class); - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public enum QueriesCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - QUERY_FILE_URI(1), - QUERY_LIST(2), - QUERIES_NOT_SET(0); - private final int value; - - private QueriesCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueriesCase valueOf(int value) { - return forNumber(value); - } - - public static QueriesCase forNumber(int value) { - switch (value) { - case 1: - return QUERY_FILE_URI; - case 2: - return QUERY_LIST; - case 0: - return QUERIES_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public static final int QUERY_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_LIST_FIELD_NUMBER = 2; - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - - public static final int CONTINUE_ON_FAILURE_FIELD_NUMBER = 3; - private boolean continueOnFailure_; - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - - public static final int SCRIPT_VARIABLES_FIELD_NUMBER = 4; - - private static final class ScriptVariablesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_ScriptVariablesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PROPERTIES_FIELD_NUMBER = 5; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (queriesCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_); - } - if (queriesCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - output.writeBool(3, continueOnFailure_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetScriptVariables(), ScriptVariablesDefaultEntryHolder.defaultEntry, 4); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 5); - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, jarFileUris_.getRaw(i)); - } - if (loggingConfig_ != null) { - output.writeMessage(7, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (queriesCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queries_); - } - if (queriesCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, continueOnFailure_); - } - for (java.util.Map.Entry entry : - internalGetScriptVariables().getMap().entrySet()) { - com.google.protobuf.MapEntry scriptVariables__ = - ScriptVariablesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, scriptVariables__); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, properties__); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLoggingConfig()); - } - 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.dataproc.v1.PigJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.PigJob other = (com.google.cloud.dataproc.v1.PigJob) obj; - - if (getContinueOnFailure() != other.getContinueOnFailure()) return false; - if (!internalGetScriptVariables().equals(other.internalGetScriptVariables())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; - } - if (!getQueriesCase().equals(other.getQueriesCase())) return false; - switch (queriesCase_) { - case 1: - if (!getQueryFileUri().equals(other.getQueryFileUri())) return false; - break; - case 2: - if (!getQueryList().equals(other.getQueryList())) return false; - break; - case 0: - default: - } - 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) + CONTINUE_ON_FAILURE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getContinueOnFailure()); - if (!internalGetScriptVariables().getMap().isEmpty()) { - hash = (37 * hash) + SCRIPT_VARIABLES_FIELD_NUMBER; - hash = (53 * hash) + internalGetScriptVariables().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - switch (queriesCase_) { - case 1: - hash = (37 * hash) + QUERY_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getQueryFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + QUERY_LIST_FIELD_NUMBER; - hash = (53 * hash) + getQueryList().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.PigJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PigJob 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.dataproc.v1.PigJob parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PigJob parseFrom( - 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.dataproc.v1.PigJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PigJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.PigJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PigJob 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.dataproc.v1.PigJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PigJob 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.dataproc.v1.PigJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PigJob 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.dataproc.v1.PigJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running [Apache Pig](https://pig.apache.org/)
-   * queries on YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PigJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.PigJob) - com.google.cloud.dataproc.v1.PigJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetScriptVariables(); - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - return internalGetMutableScriptVariables(); - case 5: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PigJob.class, - com.google.cloud.dataproc.v1.PigJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.PigJob.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(); - continueOnFailure_ = false; - - internalGetMutableScriptVariables().clear(); - internalGetMutableProperties().clear(); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - queriesCase_ = 0; - queries_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PigJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob build() { - com.google.cloud.dataproc.v1.PigJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PigJob buildPartial() { - com.google.cloud.dataproc.v1.PigJob result = new com.google.cloud.dataproc.v1.PigJob(this); - int from_bitField0_ = bitField0_; - if (queriesCase_ == 1) { - result.queries_ = queries_; - } - if (queriesCase_ == 2) { - if (queryListBuilder_ == null) { - result.queries_ = queries_; - } else { - result.queries_ = queryListBuilder_.build(); - } - } - result.continueOnFailure_ = continueOnFailure_; - result.scriptVariables_ = internalGetScriptVariables(); - result.scriptVariables_.makeImmutable(); - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jarFileUris_ = jarFileUris_; - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.build(); - } - result.queriesCase_ = queriesCase_; - 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.dataproc.v1.PigJob) { - return mergeFrom((com.google.cloud.dataproc.v1.PigJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.PigJob other) { - if (other == com.google.cloud.dataproc.v1.PigJob.getDefaultInstance()) return this; - if (other.getContinueOnFailure() != false) { - setContinueOnFailure(other.getContinueOnFailure()); - } - internalGetMutableScriptVariables().mergeFrom(other.internalGetScriptVariables()); - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - switch (other.getQueriesCase()) { - case QUERY_FILE_URI: - { - queriesCase_ = 1; - queries_ = other.queries_; - onChanged(); - break; - } - case QUERY_LIST: - { - mergeQueryList(other.getQueryList()); - break; - } - case QUERIES_NOT_SET: - { - break; - } - } - 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.dataproc.v1.PigJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.PigJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public Builder clearQueries() { - queriesCase_ = 0; - queries_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - @java.lang.Override - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - @java.lang.Override - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearQueryFileUri() { - if (queriesCase_ == 1) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains the Pig queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The bytes for queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queries_ = value; - onChanged(); - } else { - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList.Builder builderForValue) { - if (queryListBuilder_ == null) { - queries_ = builderForValue.build(); - onChanged(); - } else { - queryListBuilder_.setMessage(builderForValue.build()); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1.QueryList.newBuilder( - (com.google.cloud.dataproc.v1.QueryList) queries_) - .mergeFrom(value) - .buildPartial(); - } else { - queries_ = value; - } - onChanged(); - } else { - if (queriesCase_ == 2) { - queryListBuilder_.mergeFrom(value); - } - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder clearQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - } else { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - } - queryListBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1.QueryList) queries_, - getParentForChildren(), - isClean()); - queries_ = null; - } - queriesCase_ = 2; - onChanged(); - ; - return queryListBuilder_; - } - - private boolean continueOnFailure_; - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The continueOnFailure to set. - * @return This builder for chaining. - */ - public Builder setContinueOnFailure(boolean value) { - - continueOnFailure_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearContinueOnFailure() { - - continueOnFailure_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - private com.google.protobuf.MapField - internalGetMutableScriptVariables() { - onChanged(); - ; - if (scriptVariables_ == null) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - if (!scriptVariables_.isMutable()) { - scriptVariables_ = scriptVariables_.copy(); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearScriptVariables() { - internalGetMutableScriptVariables().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableScriptVariables() { - return internalGetMutableScriptVariables().getMutableMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putScriptVariables(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the Pig
-     * command: `name=[value]`).
-     * 
- * - * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllScriptVariables(java.util.Map values) { - internalGetMutableScriptVariables().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Pig.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-     * /etc/pig/conf/pig.properties, and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-     * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-     * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.PigJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.PigJob) - private static final com.google.cloud.dataproc.v1.PigJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.PigJob(); - } - - public static com.google.cloud.dataproc.v1.PigJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PigJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PigJob(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.dataproc.v1.PigJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJobOrBuilder.java deleted file mode 100644 index 63d44fe8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJobOrBuilder.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface PigJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.PigJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - boolean hasQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - java.lang.String getQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains the Pig queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - com.google.protobuf.ByteString getQueryFileUriBytes(); - - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder(); - - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - boolean getContinueOnFailure(); - - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getScriptVariablesCount(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsScriptVariables(java.lang.String key); - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getScriptVariables(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getScriptVariablesMap(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the Pig
-   * command: `name=[value]`).
-   * 
- * - * map<string, string> script_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Pig.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml,
-   * /etc/pig/conf/pig.properties, and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATH of
-   * the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
-   * 
- * - * repeated string jar_file_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.PigJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJob.java deleted file mode 100644 index 8d244b26..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJob.java +++ /dev/null @@ -1,2302 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running [Presto](https://prestosql.io/) queries.
- * **IMPORTANT**: The [Dataproc Presto Optional
- * Component](https://cloud.google.com/dataproc/docs/concepts/components/presto)
- * must be enabled when the cluster is created to submit a Presto job to the
- * cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PrestoJob} - */ -public final class PrestoJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.PrestoJob) - PrestoJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use PrestoJob.newBuilder() to construct. - private PrestoJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PrestoJob() { - outputFormat_ = ""; - clientTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PrestoJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PrestoJob( - 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(); - queriesCase_ = 1; - queries_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.QueryList) queries_); - queries_ = subBuilder.buildPartial(); - } - queriesCase_ = 2; - break; - } - case 24: - { - continueOnFailure_ = input.readBool(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - outputFormat_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clientTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - clientTags_.add(s); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 58: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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_ & 0x00000001) != 0)) { - clientTags_ = clientTags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PrestoJob.class, - com.google.cloud.dataproc.v1.PrestoJob.Builder.class); - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public enum QueriesCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - QUERY_FILE_URI(1), - QUERY_LIST(2), - QUERIES_NOT_SET(0); - private final int value; - - private QueriesCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueriesCase valueOf(int value) { - return forNumber(value); - } - - public static QueriesCase forNumber(int value) { - switch (value) { - case 1: - return QUERY_FILE_URI; - case 2: - return QUERY_LIST; - case 0: - return QUERIES_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public static final int QUERY_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_LIST_FIELD_NUMBER = 2; - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - - public static final int CONTINUE_ON_FAILURE_FIELD_NUMBER = 3; - private boolean continueOnFailure_; - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - - public static final int OUTPUT_FORMAT_FIELD_NUMBER = 4; - private volatile java.lang.Object outputFormat_; - /** - * - * - *
-   * Optional. The format in which query output will be displayed. See the
-   * Presto documentation for supported output formats
-   * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The outputFormat. - */ - @java.lang.Override - public java.lang.String getOutputFormat() { - java.lang.Object ref = outputFormat_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputFormat_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The format in which query output will be displayed. See the
-   * Presto documentation for supported output formats
-   * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for outputFormat. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputFormatBytes() { - java.lang.Object ref = outputFormat_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLIENT_TAGS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList clientTags_; - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the clientTags. - */ - public com.google.protobuf.ProtocolStringList getClientTagsList() { - return clientTags_; - } - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of clientTags. - */ - public int getClientTagsCount() { - return clientTags_.size(); - } - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The clientTags at the given index. - */ - public java.lang.String getClientTags(int index) { - return clientTags_.get(index); - } - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the clientTags at the given index. - */ - public com.google.protobuf.ByteString getClientTagsBytes(int index) { - return clientTags_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 6; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (queriesCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_); - } - if (queriesCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - output.writeBool(3, continueOnFailure_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputFormat_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, outputFormat_); - } - for (int i = 0; i < clientTags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, clientTags_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 6); - if (loggingConfig_ != null) { - output.writeMessage(7, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (queriesCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queries_); - } - if (queriesCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - if (continueOnFailure_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, continueOnFailure_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputFormat_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, outputFormat_); - } - { - int dataSize = 0; - for (int i = 0; i < clientTags_.size(); i++) { - dataSize += computeStringSizeNoTag(clientTags_.getRaw(i)); - } - size += dataSize; - size += 1 * getClientTagsList().size(); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLoggingConfig()); - } - 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.dataproc.v1.PrestoJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.PrestoJob other = (com.google.cloud.dataproc.v1.PrestoJob) obj; - - if (getContinueOnFailure() != other.getContinueOnFailure()) return false; - if (!getOutputFormat().equals(other.getOutputFormat())) return false; - if (!getClientTagsList().equals(other.getClientTagsList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; - } - if (!getQueriesCase().equals(other.getQueriesCase())) return false; - switch (queriesCase_) { - case 1: - if (!getQueryFileUri().equals(other.getQueryFileUri())) return false; - break; - case 2: - if (!getQueryList().equals(other.getQueryList())) return false; - break; - case 0: - default: - } - 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) + CONTINUE_ON_FAILURE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getContinueOnFailure()); - hash = (37 * hash) + OUTPUT_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getOutputFormat().hashCode(); - if (getClientTagsCount() > 0) { - hash = (37 * hash) + CLIENT_TAGS_FIELD_NUMBER; - hash = (53 * hash) + getClientTagsList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - switch (queriesCase_) { - case 1: - hash = (37 * hash) + QUERY_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getQueryFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + QUERY_LIST_FIELD_NUMBER; - hash = (53 * hash) + getQueryList().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.PrestoJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PrestoJob 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.dataproc.v1.PrestoJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PrestoJob parseFrom( - 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.dataproc.v1.PrestoJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PrestoJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.PrestoJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PrestoJob 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.dataproc.v1.PrestoJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PrestoJob 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.dataproc.v1.PrestoJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PrestoJob 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.dataproc.v1.PrestoJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running [Presto](https://prestosql.io/) queries.
-   * **IMPORTANT**: The [Dataproc Presto Optional
-   * Component](https://cloud.google.com/dataproc/docs/concepts/components/presto)
-   * must be enabled when the cluster is created to submit a Presto job to the
-   * cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PrestoJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.PrestoJob) - com.google.cloud.dataproc.v1.PrestoJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 6: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PrestoJob.class, - com.google.cloud.dataproc.v1.PrestoJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.PrestoJob.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(); - continueOnFailure_ = false; - - outputFormat_ = ""; - - clientTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableProperties().clear(); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - queriesCase_ = 0; - queries_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PrestoJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob build() { - com.google.cloud.dataproc.v1.PrestoJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PrestoJob buildPartial() { - com.google.cloud.dataproc.v1.PrestoJob result = - new com.google.cloud.dataproc.v1.PrestoJob(this); - int from_bitField0_ = bitField0_; - if (queriesCase_ == 1) { - result.queries_ = queries_; - } - if (queriesCase_ == 2) { - if (queryListBuilder_ == null) { - result.queries_ = queries_; - } else { - result.queries_ = queryListBuilder_.build(); - } - } - result.continueOnFailure_ = continueOnFailure_; - result.outputFormat_ = outputFormat_; - if (((bitField0_ & 0x00000001) != 0)) { - clientTags_ = clientTags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.clientTags_ = clientTags_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.build(); - } - result.queriesCase_ = queriesCase_; - 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.dataproc.v1.PrestoJob) { - return mergeFrom((com.google.cloud.dataproc.v1.PrestoJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.PrestoJob other) { - if (other == com.google.cloud.dataproc.v1.PrestoJob.getDefaultInstance()) return this; - if (other.getContinueOnFailure() != false) { - setContinueOnFailure(other.getContinueOnFailure()); - } - if (!other.getOutputFormat().isEmpty()) { - outputFormat_ = other.outputFormat_; - onChanged(); - } - if (!other.clientTags_.isEmpty()) { - if (clientTags_.isEmpty()) { - clientTags_ = other.clientTags_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureClientTagsIsMutable(); - clientTags_.addAll(other.clientTags_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - switch (other.getQueriesCase()) { - case QUERY_FILE_URI: - { - queriesCase_ = 1; - queries_ = other.queries_; - onChanged(); - break; - } - case QUERY_LIST: - { - mergeQueryList(other.getQueryList()); - break; - } - case QUERIES_NOT_SET: - { - break; - } - } - 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.dataproc.v1.PrestoJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.PrestoJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public Builder clearQueries() { - queriesCase_ = 0; - queries_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - @java.lang.Override - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - @java.lang.Override - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearQueryFileUri() { - if (queriesCase_ == 1) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The bytes for queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queries_ = value; - onChanged(); - } else { - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList.Builder builderForValue) { - if (queryListBuilder_ == null) { - queries_ = builderForValue.build(); - onChanged(); - } else { - queryListBuilder_.setMessage(builderForValue.build()); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1.QueryList.newBuilder( - (com.google.cloud.dataproc.v1.QueryList) queries_) - .mergeFrom(value) - .buildPartial(); - } else { - queries_ = value; - } - onChanged(); - } else { - if (queriesCase_ == 2) { - queryListBuilder_.mergeFrom(value); - } - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder clearQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - } else { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - } - queryListBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1.QueryList) queries_, - getParentForChildren(), - isClean()); - queries_ = null; - } - queriesCase_ = 2; - onChanged(); - ; - return queryListBuilder_; - } - - private boolean continueOnFailure_; - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - @java.lang.Override - public boolean getContinueOnFailure() { - return continueOnFailure_; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The continueOnFailure to set. - * @return This builder for chaining. - */ - public Builder setContinueOnFailure(boolean value) { - - continueOnFailure_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Whether to continue executing queries if a query fails.
-     * The default value is `false`. Setting to `true` can be useful when
-     * executing independent parallel queries.
-     * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearContinueOnFailure() { - - continueOnFailure_ = false; - onChanged(); - return this; - } - - private java.lang.Object outputFormat_ = ""; - /** - * - * - *
-     * Optional. The format in which query output will be displayed. See the
-     * Presto documentation for supported output formats
-     * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The outputFormat. - */ - public java.lang.String getOutputFormat() { - java.lang.Object ref = outputFormat_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputFormat_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The format in which query output will be displayed. See the
-     * Presto documentation for supported output formats
-     * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for outputFormat. - */ - public com.google.protobuf.ByteString getOutputFormatBytes() { - java.lang.Object ref = outputFormat_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The format in which query output will be displayed. See the
-     * Presto documentation for supported output formats
-     * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The outputFormat to set. - * @return This builder for chaining. - */ - public Builder setOutputFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - outputFormat_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The format in which query output will be displayed. See the
-     * Presto documentation for supported output formats
-     * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearOutputFormat() { - - outputFormat_ = getDefaultInstance().getOutputFormat(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The format in which query output will be displayed. See the
-     * Presto documentation for supported output formats
-     * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for outputFormat to set. - * @return This builder for chaining. - */ - public Builder setOutputFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - outputFormat_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList clientTags_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureClientTagsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - clientTags_ = new com.google.protobuf.LazyStringArrayList(clientTags_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the clientTags. - */ - public com.google.protobuf.ProtocolStringList getClientTagsList() { - return clientTags_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of clientTags. - */ - public int getClientTagsCount() { - return clientTags_.size(); - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The clientTags at the given index. - */ - public java.lang.String getClientTags(int index) { - return clientTags_.get(index); - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the clientTags at the given index. - */ - public com.google.protobuf.ByteString getClientTagsBytes(int index) { - return clientTags_.getByteString(index); - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The clientTags to set. - * @return This builder for chaining. - */ - public Builder setClientTags(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureClientTagsIsMutable(); - clientTags_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clientTags to add. - * @return This builder for chaining. - */ - public Builder addClientTags(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureClientTagsIsMutable(); - clientTags_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The clientTags to add. - * @return This builder for chaining. - */ - public Builder addAllClientTags(java.lang.Iterable values) { - ensureClientTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clientTags_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClientTags() { - clientTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Presto client tags to attach to this query
-     * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the clientTags to add. - * @return This builder for chaining. - */ - public Builder addClientTagsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureClientTagsIsMutable(); - clientTags_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values. Used to set Presto
-     * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-     * Equivalent to using the --session flag in the Presto CLI
-     * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.PrestoJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.PrestoJob) - private static final com.google.cloud.dataproc.v1.PrestoJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.PrestoJob(); - } - - public static com.google.cloud.dataproc.v1.PrestoJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrestoJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrestoJob(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.dataproc.v1.PrestoJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJobOrBuilder.java deleted file mode 100644 index acd54f71..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJobOrBuilder.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface PrestoJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.PrestoJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - boolean hasQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - java.lang.String getQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - com.google.protobuf.ByteString getQueryFileUriBytes(); - - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder(); - - /** - * - * - *
-   * Optional. Whether to continue executing queries if a query fails.
-   * The default value is `false`. Setting to `true` can be useful when
-   * executing independent parallel queries.
-   * 
- * - * bool continue_on_failure = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The continueOnFailure. - */ - boolean getContinueOnFailure(); - - /** - * - * - *
-   * Optional. The format in which query output will be displayed. See the
-   * Presto documentation for supported output formats
-   * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The outputFormat. - */ - java.lang.String getOutputFormat(); - /** - * - * - *
-   * Optional. The format in which query output will be displayed. See the
-   * Presto documentation for supported output formats
-   * 
- * - * string output_format = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for outputFormat. - */ - com.google.protobuf.ByteString getOutputFormatBytes(); - - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the clientTags. - */ - java.util.List getClientTagsList(); - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of clientTags. - */ - int getClientTagsCount(); - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The clientTags at the given index. - */ - java.lang.String getClientTags(int index); - /** - * - * - *
-   * Optional. Presto client tags to attach to this query
-   * 
- * - * repeated string client_tags = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the clientTags at the given index. - */ - com.google.protobuf.ByteString getClientTagsBytes(int index); - - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values. Used to set Presto
-   * [session properties](https://prestodb.io/docs/current/sql/set-session.html)
-   * Equivalent to using the --session flag in the Presto CLI
-   * 
- * - * map<string, string> properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.PrestoJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatch.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatch.java deleted file mode 100644 index 01199b11..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatch.java +++ /dev/null @@ -1,2122 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A configuration for running an
- * [Apache
- * PySpark](https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html)
- * batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PySparkBatch} - */ -public final class PySparkBatch extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.PySparkBatch) - PySparkBatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use PySparkBatch.newBuilder() to construct. - private PySparkBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PySparkBatch() { - mainPythonFileUri_ = ""; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PySparkBatch(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PySparkBatch( - 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(); - - mainPythonFileUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pythonFileUris_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jarFileUris_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - fileUris_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - archiveUris_.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)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = pythonFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_PySparkBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PySparkBatch.class, - com.google.cloud.dataproc.v1.PySparkBatch.Builder.class); - } - - public static final int MAIN_PYTHON_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object mainPythonFileUri_; - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - @java.lang.Override - public java.lang.String getMainPythonFileUri() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainPythonFileUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainPythonFileUriBytes() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainPythonFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int PYTHON_FILE_URIS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList pythonFileUris_; - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - public com.google.protobuf.ProtocolStringList getPythonFileUrisList() { - return pythonFileUris_; - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - public int getPythonFileUrisCount() { - return pythonFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - public java.lang.String getPythonFileUris(int index) { - return pythonFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - public com.google.protobuf.ByteString getPythonFileUrisBytes(int index) { - return pythonFileUris_.getByteString(index); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainPythonFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainPythonFileUri_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, args_.getRaw(i)); - } - for (int i = 0; i < pythonFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pythonFileUris_.getRaw(i)); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainPythonFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainPythonFileUri_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < pythonFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(pythonFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getPythonFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().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.dataproc.v1.PySparkBatch)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.PySparkBatch other = - (com.google.cloud.dataproc.v1.PySparkBatch) obj; - - if (!getMainPythonFileUri().equals(other.getMainPythonFileUri())) return false; - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getPythonFileUrisList().equals(other.getPythonFileUrisList())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) 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) + MAIN_PYTHON_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainPythonFileUri().hashCode(); - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getPythonFileUrisCount() > 0) { - hash = (37 * hash) + PYTHON_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getPythonFileUrisList().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.PySparkBatch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch 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.dataproc.v1.PySparkBatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch parseFrom( - 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.dataproc.v1.PySparkBatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch 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.dataproc.v1.PySparkBatch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch 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.dataproc.v1.PySparkBatch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch 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.dataproc.v1.PySparkBatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A configuration for running an
-   * [Apache
-   * PySpark](https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html)
-   * batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PySparkBatch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.PySparkBatch) - com.google.cloud.dataproc.v1.PySparkBatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_PySparkBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PySparkBatch.class, - com.google.cloud.dataproc.v1.PySparkBatch.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.PySparkBatch.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(); - mainPythonFileUri_ = ""; - - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_PySparkBatch_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatch getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatch build() { - com.google.cloud.dataproc.v1.PySparkBatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkBatch buildPartial() { - com.google.cloud.dataproc.v1.PySparkBatch result = - new com.google.cloud.dataproc.v1.PySparkBatch(this); - int from_bitField0_ = bitField0_; - result.mainPythonFileUri_ = mainPythonFileUri_; - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = pythonFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pythonFileUris_ = pythonFileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jarFileUris_ = jarFileUris_; - if (((bitField0_ & 0x00000008) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000010) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.archiveUris_ = archiveUris_; - 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.dataproc.v1.PySparkBatch) { - return mergeFrom((com.google.cloud.dataproc.v1.PySparkBatch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.PySparkBatch other) { - if (other == com.google.cloud.dataproc.v1.PySparkBatch.getDefaultInstance()) return this; - if (!other.getMainPythonFileUri().isEmpty()) { - mainPythonFileUri_ = other.mainPythonFileUri_; - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.pythonFileUris_.isEmpty()) { - if (pythonFileUris_.isEmpty()) { - pythonFileUris_ = other.pythonFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePythonFileUrisIsMutable(); - pythonFileUris_.addAll(other.pythonFileUris_); - } - onChanged(); - } - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - 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.dataproc.v1.PySparkBatch parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.PySparkBatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object mainPythonFileUri_ = ""; - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - public java.lang.String getMainPythonFileUri() { - java.lang.Object ref = mainPythonFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainPythonFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - public com.google.protobuf.ByteString getMainPythonFileUriBytes() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainPythonFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mainPythonFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainPythonFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mainPythonFileUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMainPythonFileUri() { - - mainPythonFileUri_ = getDefaultInstance().getMainPythonFileUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mainPythonFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainPythonFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mainPythonFileUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList pythonFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePythonFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = new com.google.protobuf.LazyStringArrayList(pythonFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - public com.google.protobuf.ProtocolStringList getPythonFileUrisList() { - return pythonFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - public int getPythonFileUrisCount() { - return pythonFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - public java.lang.String getPythonFileUris(int index) { - return pythonFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - public com.google.protobuf.ByteString getPythonFileUrisBytes(int index) { - return pythonFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The pythonFileUris to set. - * @return This builder for chaining. - */ - public Builder setPythonFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePythonFileUrisIsMutable(); - pythonFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addPythonFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePythonFileUrisIsMutable(); - pythonFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllPythonFileUris(java.lang.Iterable values) { - ensurePythonFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pythonFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPythonFileUris() { - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addPythonFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePythonFileUrisIsMutable(); - pythonFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000010; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.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.dataproc.v1.PySparkBatch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.PySparkBatch) - private static final com.google.cloud.dataproc.v1.PySparkBatch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.PySparkBatch(); - } - - public static com.google.cloud.dataproc.v1.PySparkBatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PySparkBatch parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PySparkBatch(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.dataproc.v1.PySparkBatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatchOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatchOrBuilder.java deleted file mode 100644 index b65ba0cb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkBatchOrBuilder.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface PySparkBatchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.PySparkBatch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - java.lang.String getMainPythonFileUri(); - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the Spark driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - com.google.protobuf.ByteString getMainPythonFileUriBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - java.util.List getPythonFileUrisList(); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - int getPythonFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - java.lang.String getPythonFileUris(int index); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: `.py`, `.egg`, and `.zip`.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - com.google.protobuf.ByteString getPythonFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJob.java deleted file mode 100644 index 1afcb043..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJob.java +++ /dev/null @@ -1,2793 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running
- * [Apache
- * PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
- * applications on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PySparkJob} - */ -public final class PySparkJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.PySparkJob) - PySparkJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use PySparkJob.newBuilder() to construct. - private PySparkJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PySparkJob() { - mainPythonFileUri_ = ""; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PySparkJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PySparkJob( - 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(); - - mainPythonFileUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pythonFileUris_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jarFileUris_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - fileUris_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - archiveUris_.add(s); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 66: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = pythonFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PySparkJob.class, - com.google.cloud.dataproc.v1.PySparkJob.Builder.class); - } - - public static final int MAIN_PYTHON_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object mainPythonFileUri_; - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - @java.lang.Override - public java.lang.String getMainPythonFileUri() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainPythonFileUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainPythonFileUriBytes() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainPythonFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int PYTHON_FILE_URIS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList pythonFileUris_; - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - public com.google.protobuf.ProtocolStringList getPythonFileUrisList() { - return pythonFileUris_; - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - public int getPythonFileUrisCount() { - return pythonFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - public java.lang.String getPythonFileUris(int index) { - return pythonFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - public com.google.protobuf.ByteString getPythonFileUrisBytes(int index) { - return pythonFileUris_.getByteString(index); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 7; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainPythonFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainPythonFileUri_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, args_.getRaw(i)); - } - for (int i = 0; i < pythonFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pythonFileUris_.getRaw(i)); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 7); - if (loggingConfig_ != null) { - output.writeMessage(8, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainPythonFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainPythonFileUri_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < pythonFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(pythonFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getPythonFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().size(); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLoggingConfig()); - } - 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.dataproc.v1.PySparkJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.PySparkJob other = (com.google.cloud.dataproc.v1.PySparkJob) obj; - - if (!getMainPythonFileUri().equals(other.getMainPythonFileUri())) return false; - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getPythonFileUrisList().equals(other.getPythonFileUrisList())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) 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) + MAIN_PYTHON_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainPythonFileUri().hashCode(); - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getPythonFileUrisCount() > 0) { - hash = (37 * hash) + PYTHON_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getPythonFileUrisList().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.PySparkJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkJob 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.dataproc.v1.PySparkJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkJob parseFrom( - 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.dataproc.v1.PySparkJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.PySparkJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.PySparkJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkJob 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.dataproc.v1.PySparkJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkJob 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.dataproc.v1.PySparkJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.PySparkJob 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.dataproc.v1.PySparkJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running
-   * [Apache
-   * PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
-   * applications on YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.PySparkJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.PySparkJob) - com.google.cloud.dataproc.v1.PySparkJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 7: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.PySparkJob.class, - com.google.cloud.dataproc.v1.PySparkJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.PySparkJob.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(); - mainPythonFileUri_ = ""; - - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableProperties().clear(); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_PySparkJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob build() { - com.google.cloud.dataproc.v1.PySparkJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.PySparkJob buildPartial() { - com.google.cloud.dataproc.v1.PySparkJob result = - new com.google.cloud.dataproc.v1.PySparkJob(this); - int from_bitField0_ = bitField0_; - result.mainPythonFileUri_ = mainPythonFileUri_; - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = pythonFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pythonFileUris_ = pythonFileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jarFileUris_ = jarFileUris_; - if (((bitField0_ & 0x00000008) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000010) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.archiveUris_ = archiveUris_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.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.dataproc.v1.PySparkJob) { - return mergeFrom((com.google.cloud.dataproc.v1.PySparkJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.PySparkJob other) { - if (other == com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance()) return this; - if (!other.getMainPythonFileUri().isEmpty()) { - mainPythonFileUri_ = other.mainPythonFileUri_; - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.pythonFileUris_.isEmpty()) { - if (pythonFileUris_.isEmpty()) { - pythonFileUris_ = other.pythonFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePythonFileUrisIsMutable(); - pythonFileUris_.addAll(other.pythonFileUris_); - } - onChanged(); - } - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - 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.dataproc.v1.PySparkJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.PySparkJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object mainPythonFileUri_ = ""; - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - public java.lang.String getMainPythonFileUri() { - java.lang.Object ref = mainPythonFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainPythonFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - public com.google.protobuf.ByteString getMainPythonFileUriBytes() { - java.lang.Object ref = mainPythonFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainPythonFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mainPythonFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainPythonFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mainPythonFileUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMainPythonFileUri() { - - mainPythonFileUri_ = getDefaultInstance().getMainPythonFileUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main Python file to use as the driver. Must
-     * be a .py file.
-     * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mainPythonFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainPythonFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mainPythonFileUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList pythonFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePythonFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - pythonFileUris_ = new com.google.protobuf.LazyStringArrayList(pythonFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - public com.google.protobuf.ProtocolStringList getPythonFileUrisList() { - return pythonFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - public int getPythonFileUrisCount() { - return pythonFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - public java.lang.String getPythonFileUris(int index) { - return pythonFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - public com.google.protobuf.ByteString getPythonFileUrisBytes(int index) { - return pythonFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The pythonFileUris to set. - * @return This builder for chaining. - */ - public Builder setPythonFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePythonFileUrisIsMutable(); - pythonFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addPythonFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePythonFileUrisIsMutable(); - pythonFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllPythonFileUris(java.lang.Iterable values) { - ensurePythonFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pythonFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPythonFileUris() { - pythonFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS file URIs of Python files to pass to the PySpark
-     * framework. Supported file types: .py, .egg, and .zip.
-     * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the pythonFileUris to add. - * @return This builder for chaining. - */ - public Builder addPythonFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePythonFileUrisIsMutable(); - pythonFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Python driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000010; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure PySpark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.PySparkJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.PySparkJob) - private static final com.google.cloud.dataproc.v1.PySparkJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.PySparkJob(); - } - - public static com.google.cloud.dataproc.v1.PySparkJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PySparkJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PySparkJob(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.dataproc.v1.PySparkJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJobOrBuilder.java deleted file mode 100644 index 89648ac7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJobOrBuilder.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface PySparkJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.PySparkJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainPythonFileUri. - */ - java.lang.String getMainPythonFileUri(); - /** - * - * - *
-   * Required. The HCFS URI of the main Python file to use as the driver. Must
-   * be a .py file.
-   * 
- * - * string main_python_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainPythonFileUri. - */ - com.google.protobuf.ByteString getMainPythonFileUriBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the pythonFileUris. - */ - java.util.List getPythonFileUrisList(); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of pythonFileUris. - */ - int getPythonFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The pythonFileUris at the given index. - */ - java.lang.String getPythonFileUris(int index); - /** - * - * - *
-   * Optional. HCFS file URIs of Python files to pass to the PySpark
-   * framework. Supported file types: .py, .egg, and .zip.
-   * 
- * - * repeated string python_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the pythonFileUris at the given index. - */ - com.google.protobuf.ByteString getPythonFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Python driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure PySpark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryList.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryList.java deleted file mode 100644 index 1f47fc8a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryList.java +++ /dev/null @@ -1,890 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A list of queries to run on a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.QueryList} - */ -public final class QueryList extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.QueryList) - QueryListOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryList.newBuilder() to construct. - private QueryList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private QueryList() { - queries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private QueryList( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queries_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queries_.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)) { - queries_ = queries_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_QueryList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_QueryList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.QueryList.class, - com.google.cloud.dataproc.v1.QueryList.Builder.class); - } - - public static final int QUERIES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList queries_; - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the queries. - */ - public com.google.protobuf.ProtocolStringList getQueriesList() { - return queries_; - } - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of queries. - */ - public int getQueriesCount() { - return queries_.size(); - } - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The queries at the given index. - */ - public java.lang.String getQueries(int index) { - return queries_.get(index); - } - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the queries at the given index. - */ - public com.google.protobuf.ByteString getQueriesBytes(int index) { - return queries_.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 < queries_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < queries_.size(); i++) { - dataSize += computeStringSizeNoTag(queries_.getRaw(i)); - } - size += dataSize; - size += 1 * getQueriesList().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.dataproc.v1.QueryList)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.QueryList other = (com.google.cloud.dataproc.v1.QueryList) obj; - - if (!getQueriesList().equals(other.getQueriesList())) 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 (getQueriesCount() > 0) { - hash = (37 * hash) + QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getQueriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.QueryList parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.QueryList 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.dataproc.v1.QueryList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.QueryList parseFrom( - 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.dataproc.v1.QueryList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.QueryList parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.QueryList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.QueryList 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.dataproc.v1.QueryList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.QueryList 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.dataproc.v1.QueryList parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.QueryList 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.dataproc.v1.QueryList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A list of queries to run on a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.QueryList} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.QueryList) - com.google.cloud.dataproc.v1.QueryListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_QueryList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_QueryList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.QueryList.class, - com.google.cloud.dataproc.v1.QueryList.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.QueryList.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(); - queries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_QueryList_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList build() { - com.google.cloud.dataproc.v1.QueryList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList buildPartial() { - com.google.cloud.dataproc.v1.QueryList result = - new com.google.cloud.dataproc.v1.QueryList(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - queries_ = queries_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.queries_ = queries_; - 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.dataproc.v1.QueryList) { - return mergeFrom((com.google.cloud.dataproc.v1.QueryList) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.QueryList other) { - if (other == com.google.cloud.dataproc.v1.QueryList.getDefaultInstance()) return this; - if (!other.queries_.isEmpty()) { - if (queries_.isEmpty()) { - queries_ = other.queries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQueriesIsMutable(); - queries_.addAll(other.queries_); - } - 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.dataproc.v1.QueryList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.QueryList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList queries_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureQueriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - queries_ = new com.google.protobuf.LazyStringArrayList(queries_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the queries. - */ - public com.google.protobuf.ProtocolStringList getQueriesList() { - return queries_.getUnmodifiableView(); - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of queries. - */ - public int getQueriesCount() { - return queries_.size(); - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The queries at the given index. - */ - public java.lang.String getQueries(int index) { - return queries_.get(index); - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the queries at the given index. - */ - public com.google.protobuf.ByteString getQueriesBytes(int index) { - return queries_.getByteString(index); - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The queries to set. - * @return This builder for chaining. - */ - public Builder setQueries(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureQueriesIsMutable(); - queries_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The queries to add. - * @return This builder for chaining. - */ - public Builder addQueries(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureQueriesIsMutable(); - queries_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The queries to add. - * @return This builder for chaining. - */ - public Builder addAllQueries(java.lang.Iterable values) { - ensureQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queries_); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearQueries() { - queries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The queries to execute. You do not need to end a query expression
-     * with a semicolon. Multiple queries can be specified in one
-     * string by separating each with a semicolon. Here is an example of a
-     * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-     *     "hiveJob": {
-     *       "queryList": {
-     *         "queries": [
-     *           "query1",
-     *           "query2",
-     *           "query3;query4",
-     *         ]
-     *       }
-     *     }
-     * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes of the queries to add. - * @return This builder for chaining. - */ - public Builder addQueriesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureQueriesIsMutable(); - queries_.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.dataproc.v1.QueryList) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.QueryList) - private static final com.google.cloud.dataproc.v1.QueryList DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.QueryList(); - } - - public static com.google.cloud.dataproc.v1.QueryList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryList(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.dataproc.v1.QueryList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryListOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryListOrBuilder.java deleted file mode 100644 index 05bb09a0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryListOrBuilder.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface QueryListOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.QueryList) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the queries. - */ - java.util.List getQueriesList(); - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of queries. - */ - int getQueriesCount(); - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The queries at the given index. - */ - java.lang.String getQueries(int index); - /** - * - * - *
-   * Required. The queries to execute. You do not need to end a query expression
-   * with a semicolon. Multiple queries can be specified in one
-   * string by separating each with a semicolon. Here is an example of a
-   * Dataproc API snippet that uses a QueryList to specify a HiveJob:
-   *     "hiveJob": {
-   *       "queryList": {
-   *         "queries": [
-   *           "query1",
-   *           "query2",
-   *           "query3;query4",
-   *         ]
-   *       }
-   *     }
-   * 
- * - * repeated string queries = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the queries at the given index. - */ - com.google.protobuf.ByteString getQueriesBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidation.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidation.java deleted file mode 100644 index c7d2c233..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidation.java +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Validation based on regular expressions.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RegexValidation} - */ -public final class RegexValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.RegexValidation) - RegexValidationOrBuilder { - private static final long serialVersionUID = 0L; - // Use RegexValidation.newBuilder() to construct. - private RegexValidation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RegexValidation() { - regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RegexValidation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RegexValidation( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - regexes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - regexes_.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)) { - regexes_ = regexes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_RegexValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RegexValidation.class, - com.google.cloud.dataproc.v1.RegexValidation.Builder.class); - } - - public static final int REGEXES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList regexes_; - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the regexes. - */ - public com.google.protobuf.ProtocolStringList getRegexesList() { - return regexes_; - } - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of regexes. - */ - public int getRegexesCount() { - return regexes_.size(); - } - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The regexes at the given index. - */ - public java.lang.String getRegexes(int index) { - return regexes_.get(index); - } - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the regexes at the given index. - */ - public com.google.protobuf.ByteString getRegexesBytes(int index) { - return regexes_.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 < regexes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regexes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < regexes_.size(); i++) { - dataSize += computeStringSizeNoTag(regexes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRegexesList().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.dataproc.v1.RegexValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.RegexValidation other = - (com.google.cloud.dataproc.v1.RegexValidation) obj; - - if (!getRegexesList().equals(other.getRegexesList())) 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 (getRegexesCount() > 0) { - hash = (37 * hash) + REGEXES_FIELD_NUMBER; - hash = (53 * hash) + getRegexesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.RegexValidation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RegexValidation 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.dataproc.v1.RegexValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RegexValidation parseFrom( - 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.dataproc.v1.RegexValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RegexValidation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.RegexValidation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RegexValidation 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.dataproc.v1.RegexValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RegexValidation 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.dataproc.v1.RegexValidation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RegexValidation 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.dataproc.v1.RegexValidation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RegexValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.RegexValidation) - com.google.cloud.dataproc.v1.RegexValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_RegexValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RegexValidation.class, - com.google.cloud.dataproc.v1.RegexValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.RegexValidation.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(); - regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidation build() { - com.google.cloud.dataproc.v1.RegexValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RegexValidation buildPartial() { - com.google.cloud.dataproc.v1.RegexValidation result = - new com.google.cloud.dataproc.v1.RegexValidation(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - regexes_ = regexes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.regexes_ = regexes_; - 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.dataproc.v1.RegexValidation) { - return mergeFrom((com.google.cloud.dataproc.v1.RegexValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.RegexValidation other) { - if (other == com.google.cloud.dataproc.v1.RegexValidation.getDefaultInstance()) return this; - if (!other.regexes_.isEmpty()) { - if (regexes_.isEmpty()) { - regexes_ = other.regexes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRegexesIsMutable(); - regexes_.addAll(other.regexes_); - } - 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.dataproc.v1.RegexValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.RegexValidation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList regexes_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRegexesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - regexes_ = new com.google.protobuf.LazyStringArrayList(regexes_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the regexes. - */ - public com.google.protobuf.ProtocolStringList getRegexesList() { - return regexes_.getUnmodifiableView(); - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of regexes. - */ - public int getRegexesCount() { - return regexes_.size(); - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The regexes at the given index. - */ - public java.lang.String getRegexes(int index) { - return regexes_.get(index); - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the regexes at the given index. - */ - public com.google.protobuf.ByteString getRegexesBytes(int index) { - return regexes_.getByteString(index); - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The regexes to set. - * @return This builder for chaining. - */ - public Builder setRegexes(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRegexesIsMutable(); - regexes_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The regexes to add. - * @return This builder for chaining. - */ - public Builder addRegexes(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRegexesIsMutable(); - regexes_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The regexes to add. - * @return This builder for chaining. - */ - public Builder addAllRegexes(java.lang.Iterable values) { - ensureRegexesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, regexes_); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegexes() { - regexes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. RE2 regular expressions used to validate the parameter's value.
-     * The value must match the regex in its entirety (substring
-     * matches are not sufficient).
-     * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes of the regexes to add. - * @return This builder for chaining. - */ - public Builder addRegexesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRegexesIsMutable(); - regexes_.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.dataproc.v1.RegexValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.RegexValidation) - private static final com.google.cloud.dataproc.v1.RegexValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.RegexValidation(); - } - - public static com.google.cloud.dataproc.v1.RegexValidation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RegexValidation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegexValidation(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.dataproc.v1.RegexValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidationOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidationOrBuilder.java deleted file mode 100644 index d1b982af..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidationOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface RegexValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.RegexValidation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the regexes. - */ - java.util.List getRegexesList(); - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of regexes. - */ - int getRegexesCount(); - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The regexes at the given index. - */ - java.lang.String getRegexes(int index); - /** - * - * - *
-   * Required. RE2 regular expressions used to validate the parameter's value.
-   * The value must match the regex in its entirety (substring
-   * matches are not sufficient).
-   * 
- * - * repeated string regexes = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the regexes at the given index. - */ - com.google.protobuf.ByteString getRegexesBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegionName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegionName.java deleted file mode 100644 index f73d1f21..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegionName.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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.dataproc.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 RegionName implements ResourceName { - private static final PathTemplate PROJECT_REGION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/regions/{region}"); - private volatile Map fieldValuesMap; - private final String project; - private final String region; - - @Deprecated - protected RegionName() { - project = null; - region = null; - } - - private RegionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - } - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static RegionName of(String project, String region) { - return newBuilder().setProject(project).setRegion(region).build(); - } - - public static String format(String project, String region) { - return newBuilder().setProject(project).setRegion(region).build().toString(); - } - - public static RegionName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_REGION.validatedMatch( - formattedString, "RegionName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("region")); - } - - 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 (RegionName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_REGION.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 (region != null) { - fieldMapBuilder.put("region", region); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_REGION.instantiate("project", project, "region", region); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - RegionName that = ((RegionName) o); - return Objects.equals(this.project, that.project) && Objects.equals(this.region, that.region); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(region); - return h; - } - - /** Builder for projects/{project}/regions/{region}. */ - public static class Builder { - private String project; - private String region; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setRegion(String region) { - this.region = region; - return this; - } - - private Builder(RegionName regionName) { - this.project = regionName.project; - this.region = regionName.region; - } - - public RegionName build() { - return new RegionName(this); - } - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinity.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinity.java deleted file mode 100644 index 24344364..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinity.java +++ /dev/null @@ -1,1251 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Reservation Affinity for consuming Zonal reservation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ReservationAffinity} - */ -public final class ReservationAffinity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ReservationAffinity) - ReservationAffinityOrBuilder { - private static final long serialVersionUID = 0L; - // Use ReservationAffinity.newBuilder() to construct. - private ReservationAffinity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ReservationAffinity() { - consumeReservationType_ = 0; - key_ = ""; - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReservationAffinity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ReservationAffinity( - 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 8: - { - int rawValue = input.readEnum(); - - consumeReservationType_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - values_.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)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ReservationAffinity.class, - com.google.cloud.dataproc.v1.ReservationAffinity.Builder.class); - } - - /** - * - * - *
-   * Indicates whether to consume capacity from an reservation or not.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.ReservationAffinity.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** TYPE_UNSPECIFIED = 0; */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * Do not consume from any allocated capacity.
-     * 
- * - * NO_RESERVATION = 1; - */ - NO_RESERVATION(1), - /** - * - * - *
-     * Consume any reservation available.
-     * 
- * - * ANY_RESERVATION = 2; - */ - ANY_RESERVATION(2), - /** - * - * - *
-     * Must consume from a specific reservation. Must specify key value fields
-     * for specifying the reservations.
-     * 
- * - * SPECIFIC_RESERVATION = 3; - */ - SPECIFIC_RESERVATION(3), - UNRECOGNIZED(-1), - ; - - /** TYPE_UNSPECIFIED = 0; */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Do not consume from any allocated capacity.
-     * 
- * - * NO_RESERVATION = 1; - */ - public static final int NO_RESERVATION_VALUE = 1; - /** - * - * - *
-     * Consume any reservation available.
-     * 
- * - * ANY_RESERVATION = 2; - */ - public static final int ANY_RESERVATION_VALUE = 2; - /** - * - * - *
-     * Must consume from a specific reservation. Must specify key value fields
-     * for specifying the reservations.
-     * 
- * - * SPECIFIC_RESERVATION = 3; - */ - public static final int SPECIFIC_RESERVATION_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 NO_RESERVATION; - case 2: - return ANY_RESERVATION; - case 3: - return SPECIFIC_RESERVATION; - 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.dataproc.v1.ReservationAffinity.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.dataproc.v1.ReservationAffinity.Type) - } - - public static final int CONSUME_RESERVATION_TYPE_FIELD_NUMBER = 1; - private int consumeReservationType_; - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for consumeReservationType. - */ - @java.lang.Override - public int getConsumeReservationTypeValue() { - return consumeReservationType_; - } - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity.Type getConsumeReservationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ReservationAffinity.Type result = - com.google.cloud.dataproc.v1.ReservationAffinity.Type.valueOf(consumeReservationType_); - return result == null - ? com.google.cloud.dataproc.v1.ReservationAffinity.Type.UNRECOGNIZED - : result; - } - - public static final int KEY_FIELD_NUMBER = 2; - private volatile java.lang.Object key_; - /** - * - * - *
-   * Optional. Corresponds to the label key of reservation resource.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Corresponds to the label key of reservation resource.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList values_; - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_; - } - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.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 (consumeReservationType_ - != com.google.cloud.dataproc.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, consumeReservationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); - } - for (int i = 0; i < values_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, values_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (consumeReservationType_ - != com.google.cloud.dataproc.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, consumeReservationType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); - } - { - int dataSize = 0; - for (int i = 0; i < values_.size(); i++) { - dataSize += computeStringSizeNoTag(values_.getRaw(i)); - } - size += dataSize; - size += 1 * getValuesList().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.dataproc.v1.ReservationAffinity)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ReservationAffinity other = - (com.google.cloud.dataproc.v1.ReservationAffinity) obj; - - if (consumeReservationType_ != other.consumeReservationType_) return false; - if (!getKey().equals(other.getKey())) return false; - if (!getValuesList().equals(other.getValuesList())) 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) + CONSUME_RESERVATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + consumeReservationType_; - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - if (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity 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.dataproc.v1.ReservationAffinity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity parseFrom( - 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.dataproc.v1.ReservationAffinity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity 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.dataproc.v1.ReservationAffinity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity 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.dataproc.v1.ReservationAffinity parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity 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.dataproc.v1.ReservationAffinity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ReservationAffinity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ReservationAffinity) - com.google.cloud.dataproc.v1.ReservationAffinityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ReservationAffinity.class, - com.google.cloud.dataproc.v1.ReservationAffinity.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ReservationAffinity.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(); - consumeReservationType_ = 0; - - key_ = ""; - - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ReservationAffinity_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ReservationAffinity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity build() { - com.google.cloud.dataproc.v1.ReservationAffinity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity buildPartial() { - com.google.cloud.dataproc.v1.ReservationAffinity result = - new com.google.cloud.dataproc.v1.ReservationAffinity(this); - int from_bitField0_ = bitField0_; - result.consumeReservationType_ = consumeReservationType_; - result.key_ = key_; - if (((bitField0_ & 0x00000001) != 0)) { - values_ = values_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - 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.dataproc.v1.ReservationAffinity) { - return mergeFrom((com.google.cloud.dataproc.v1.ReservationAffinity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ReservationAffinity other) { - if (other == com.google.cloud.dataproc.v1.ReservationAffinity.getDefaultInstance()) - return this; - if (other.consumeReservationType_ != 0) { - setConsumeReservationTypeValue(other.getConsumeReservationTypeValue()); - } - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - 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.dataproc.v1.ReservationAffinity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ReservationAffinity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int consumeReservationType_ = 0; - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for consumeReservationType. - */ - @java.lang.Override - public int getConsumeReservationTypeValue() { - return consumeReservationType_; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for consumeReservationType to set. - * @return This builder for chaining. - */ - public Builder setConsumeReservationTypeValue(int value) { - - consumeReservationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ReservationAffinity.Type getConsumeReservationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.ReservationAffinity.Type result = - com.google.cloud.dataproc.v1.ReservationAffinity.Type.valueOf(consumeReservationType_); - return result == null - ? com.google.cloud.dataproc.v1.ReservationAffinity.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The consumeReservationType to set. - * @return This builder for chaining. - */ - public Builder setConsumeReservationType( - com.google.cloud.dataproc.v1.ReservationAffinity.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - consumeReservationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearConsumeReservationType() { - - consumeReservationType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object key_ = ""; - /** - * - * - *
-     * Optional. Corresponds to the label key of reservation resource.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Corresponds to the label key of reservation resource.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for key. - */ - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Corresponds to the label key of reservation resource.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label key of reservation resource.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label key of reservation resource.
-     * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList values_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(values_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.getByteString(index); - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The values to set. - * @return This builder for chaining. - */ - public Builder setValues(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The values to add. - * @return This builder for chaining. - */ - public Builder addAllValues(java.lang.Iterable values) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Corresponds to the label values of reservation resource.
-     * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the values to add. - * @return This builder for chaining. - */ - public Builder addValuesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureValuesIsMutable(); - values_.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.dataproc.v1.ReservationAffinity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ReservationAffinity) - private static final com.google.cloud.dataproc.v1.ReservationAffinity DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ReservationAffinity(); - } - - public static com.google.cloud.dataproc.v1.ReservationAffinity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReservationAffinity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationAffinity(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.dataproc.v1.ReservationAffinity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinityOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinityOrBuilder.java deleted file mode 100644 index 21a9f125..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinityOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ReservationAffinityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ReservationAffinity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for consumeReservationType. - */ - int getConsumeReservationTypeValue(); - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - com.google.cloud.dataproc.v1.ReservationAffinity.Type getConsumeReservationType(); - - /** - * - * - *
-   * Optional. Corresponds to the label key of reservation resource.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The key. - */ - java.lang.String getKey(); - /** - * - * - *
-   * Optional. Corresponds to the label key of reservation resource.
-   * 
- * - * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for key. - */ - com.google.protobuf.ByteString getKeyBytes(); - - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of values. - */ - int getValuesCount(); - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - java.lang.String getValues(int index); - /** - * - * - *
-   * Optional. Corresponds to the label values of reservation resource.
-   * 
- * - * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - com.google.protobuf.ByteString getValuesBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfig.java deleted file mode 100644 index 4cf2f48a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfig.java +++ /dev/null @@ -1,1172 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Runtime configuration for a workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RuntimeConfig} - */ -public final class RuntimeConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.RuntimeConfig) - RuntimeConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use RuntimeConfig.newBuilder() to construct. - private RuntimeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RuntimeConfig() { - version_ = ""; - containerImage_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RuntimeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RuntimeConfig( - 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(); - - version_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - containerImage_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RuntimeConfig.class, - com.google.cloud.dataproc.v1.RuntimeConfig.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - * - * - *
-   * Optional. Version of the batch runtime.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-   * Optional. Version of the batch runtime.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 CONTAINER_IMAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object containerImage_; - /** - * - * - *
-   * Optional. Optional custom container image for the job runtime environment. If
-   * not specified, a default container image will be used.
-   * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The containerImage. - */ - @java.lang.Override - public java.lang.String getContainerImage() { - java.lang.Object ref = containerImage_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerImage_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Optional custom container image for the job runtime environment. If
-   * not specified, a default container image will be used.
-   * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for containerImage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContainerImageBytes() { - java.lang.Object ref = containerImage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - containerImage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROPERTIES_FIELD_NUMBER = 3; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerImage_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerImage_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerImage_); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); - } - 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.dataproc.v1.RuntimeConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.RuntimeConfig other = - (com.google.cloud.dataproc.v1.RuntimeConfig) obj; - - if (!getVersion().equals(other.getVersion())) return false; - if (!getContainerImage().equals(other.getContainerImage())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) 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_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getContainerImage().hashCode(); - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig 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.dataproc.v1.RuntimeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig parseFrom( - 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.dataproc.v1.RuntimeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig 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.dataproc.v1.RuntimeConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig 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.dataproc.v1.RuntimeConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig 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.dataproc.v1.RuntimeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Runtime configuration for a workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RuntimeConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.RuntimeConfig) - com.google.cloud.dataproc.v1.RuntimeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RuntimeConfig.class, - com.google.cloud.dataproc.v1.RuntimeConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.RuntimeConfig.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(); - version_ = ""; - - containerImage_ = ""; - - internalGetMutableProperties().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.RuntimeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeConfig build() { - com.google.cloud.dataproc.v1.RuntimeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeConfig buildPartial() { - com.google.cloud.dataproc.v1.RuntimeConfig result = - new com.google.cloud.dataproc.v1.RuntimeConfig(this); - int from_bitField0_ = bitField0_; - result.version_ = version_; - result.containerImage_ = containerImage_; - result.properties_ = internalGetProperties(); - result.properties_.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.dataproc.v1.RuntimeConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.RuntimeConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.RuntimeConfig other) { - if (other == com.google.cloud.dataproc.v1.RuntimeConfig.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getContainerImage().isEmpty()) { - containerImage_ = other.containerImage_; - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - 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.dataproc.v1.RuntimeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.RuntimeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object version_ = ""; - /** - * - * - *
-     * Optional. Version of the batch runtime.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Version of the batch runtime.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - } - /** - * - * - *
-     * Optional. Version of the batch runtime.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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; - } - /** - * - * - *
-     * Optional. Version of the batch runtime.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Version of the batch runtime.
-     * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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 containerImage_ = ""; - /** - * - * - *
-     * Optional. Optional custom container image for the job runtime environment. If
-     * not specified, a default container image will be used.
-     * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The containerImage. - */ - public java.lang.String getContainerImage() { - java.lang.Object ref = containerImage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerImage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Optional custom container image for the job runtime environment. If
-     * not specified, a default container image will be used.
-     * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for containerImage. - */ - public com.google.protobuf.ByteString getContainerImageBytes() { - java.lang.Object ref = containerImage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - containerImage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Optional custom container image for the job runtime environment. If
-     * not specified, a default container image will be used.
-     * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The containerImage to set. - * @return This builder for chaining. - */ - public Builder setContainerImage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - containerImage_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Optional custom container image for the job runtime environment. If
-     * not specified, a default container image will be used.
-     * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearContainerImage() { - - containerImage_ = getDefaultInstance().getContainerImage(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Optional custom container image for the job runtime environment. If
-     * not specified, a default container image will be used.
-     * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for containerImage to set. - * @return This builder for chaining. - */ - public Builder setContainerImageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - containerImage_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, which are used to configure workload
-     * execution.
-     * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().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.dataproc.v1.RuntimeConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.RuntimeConfig) - private static final com.google.cloud.dataproc.v1.RuntimeConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.RuntimeConfig(); - } - - public static com.google.cloud.dataproc.v1.RuntimeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RuntimeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RuntimeConfig(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.dataproc.v1.RuntimeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfigOrBuilder.java deleted file mode 100644 index 2b60b9b3..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeConfigOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface RuntimeConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.RuntimeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Version of the batch runtime.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - java.lang.String getVersion(); - /** - * - * - *
-   * Optional. Version of the batch runtime.
-   * 
- * - * string version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for version. - */ - com.google.protobuf.ByteString getVersionBytes(); - - /** - * - * - *
-   * Optional. Optional custom container image for the job runtime environment. If
-   * not specified, a default container image will be used.
-   * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The containerImage. - */ - java.lang.String getContainerImage(); - /** - * - * - *
-   * Optional. Optional custom container image for the job runtime environment. If
-   * not specified, a default container image will be used.
-   * 
- * - * string container_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for containerImage. - */ - com.google.protobuf.ByteString getContainerImageBytes(); - - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, which are used to configure workload
-   * execution.
-   * 
- * - * map<string, string> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfo.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfo.java deleted file mode 100644 index d8bcda15..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfo.java +++ /dev/null @@ -1,1163 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Runtime information about workload execution.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RuntimeInfo} - */ -public final class RuntimeInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.RuntimeInfo) - RuntimeInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use RuntimeInfo.newBuilder() to construct. - private RuntimeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RuntimeInfo() { - outputUri_ = ""; - diagnosticOutputUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RuntimeInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RuntimeInfo( - 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)) { - endpoints_ = - com.google.protobuf.MapField.newMapField( - EndpointsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry endpoints__ = - input.readMessage( - EndpointsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - endpoints_.getMutableMap().put(endpoints__.getKey(), endpoints__.getValue()); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - outputUri_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - diagnosticOutputUri_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetEndpoints(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RuntimeInfo.class, - com.google.cloud.dataproc.v1.RuntimeInfo.Builder.class); - } - - public static final int ENDPOINTS_FIELD_NUMBER = 1; - - private static final class EndpointsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField endpoints_; - - private com.google.protobuf.MapField internalGetEndpoints() { - if (endpoints_ == null) { - return com.google.protobuf.MapField.emptyMapField(EndpointsDefaultEntryHolder.defaultEntry); - } - return endpoints_; - } - - public int getEndpointsCount() { - return internalGetEndpoints().getMap().size(); - } - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public boolean containsEndpoints(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetEndpoints().getMap().containsKey(key); - } - /** Use {@link #getEndpointsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getEndpoints() { - return getEndpointsMap(); - } - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getEndpointsMap() { - return internalGetEndpoints().getMap(); - } - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getEndpointsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetEndpoints().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getEndpointsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetEndpoints().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object outputUri_; - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-   * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - @java.lang.Override - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-   * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIAGNOSTIC_OUTPUT_URI_FIELD_NUMBER = 3; - private volatile java.lang.Object diagnosticOutputUri_; - /** - * - * - *
-   * Output only. A URI pointing to the location of the diagnostics tarball.
-   * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The diagnosticOutputUri. - */ - @java.lang.Override - public java.lang.String getDiagnosticOutputUri() { - java.lang.Object ref = diagnosticOutputUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - diagnosticOutputUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. A URI pointing to the location of the diagnostics tarball.
-   * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for diagnosticOutputUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDiagnosticOutputUriBytes() { - java.lang.Object ref = diagnosticOutputUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - diagnosticOutputUri_ = 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 { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetEndpoints(), EndpointsDefaultEntryHolder.defaultEntry, 1); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, outputUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diagnosticOutputUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, diagnosticOutputUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetEndpoints().getMap().entrySet()) { - com.google.protobuf.MapEntry endpoints__ = - EndpointsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, outputUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diagnosticOutputUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, diagnosticOutputUri_); - } - 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.dataproc.v1.RuntimeInfo)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.RuntimeInfo other = (com.google.cloud.dataproc.v1.RuntimeInfo) obj; - - if (!internalGetEndpoints().equals(other.internalGetEndpoints())) return false; - if (!getOutputUri().equals(other.getOutputUri())) return false; - if (!getDiagnosticOutputUri().equals(other.getDiagnosticOutputUri())) 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 (!internalGetEndpoints().getMap().isEmpty()) { - hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + internalGetEndpoints().hashCode(); - } - hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; - hash = (53 * hash) + getOutputUri().hashCode(); - hash = (37 * hash) + DIAGNOSTIC_OUTPUT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiagnosticOutputUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo 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.dataproc.v1.RuntimeInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo parseFrom( - 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.dataproc.v1.RuntimeInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo 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.dataproc.v1.RuntimeInfo parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo 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.dataproc.v1.RuntimeInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo 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.dataproc.v1.RuntimeInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Runtime information about workload execution.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.RuntimeInfo} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.RuntimeInfo) - com.google.cloud.dataproc.v1.RuntimeInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetEndpoints(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableEndpoints(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.RuntimeInfo.class, - com.google.cloud.dataproc.v1.RuntimeInfo.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.RuntimeInfo.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(); - internalGetMutableEndpoints().clear(); - outputUri_ = ""; - - diagnosticOutputUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeInfo getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.RuntimeInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeInfo build() { - com.google.cloud.dataproc.v1.RuntimeInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.RuntimeInfo buildPartial() { - com.google.cloud.dataproc.v1.RuntimeInfo result = - new com.google.cloud.dataproc.v1.RuntimeInfo(this); - int from_bitField0_ = bitField0_; - result.endpoints_ = internalGetEndpoints(); - result.endpoints_.makeImmutable(); - result.outputUri_ = outputUri_; - result.diagnosticOutputUri_ = diagnosticOutputUri_; - 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.dataproc.v1.RuntimeInfo) { - return mergeFrom((com.google.cloud.dataproc.v1.RuntimeInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.RuntimeInfo other) { - if (other == com.google.cloud.dataproc.v1.RuntimeInfo.getDefaultInstance()) return this; - internalGetMutableEndpoints().mergeFrom(other.internalGetEndpoints()); - if (!other.getOutputUri().isEmpty()) { - outputUri_ = other.outputUri_; - onChanged(); - } - if (!other.getDiagnosticOutputUri().isEmpty()) { - diagnosticOutputUri_ = other.diagnosticOutputUri_; - 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.dataproc.v1.RuntimeInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.RuntimeInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField endpoints_; - - private com.google.protobuf.MapField - internalGetEndpoints() { - if (endpoints_ == null) { - return com.google.protobuf.MapField.emptyMapField(EndpointsDefaultEntryHolder.defaultEntry); - } - return endpoints_; - } - - private com.google.protobuf.MapField - internalGetMutableEndpoints() { - onChanged(); - ; - if (endpoints_ == null) { - endpoints_ = - com.google.protobuf.MapField.newMapField(EndpointsDefaultEntryHolder.defaultEntry); - } - if (!endpoints_.isMutable()) { - endpoints_ = endpoints_.copy(); - } - return endpoints_; - } - - public int getEndpointsCount() { - return internalGetEndpoints().getMap().size(); - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public boolean containsEndpoints(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetEndpoints().getMap().containsKey(key); - } - /** Use {@link #getEndpointsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getEndpoints() { - return getEndpointsMap(); - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map getEndpointsMap() { - return internalGetEndpoints().getMap(); - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getEndpointsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetEndpoints().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.lang.String getEndpointsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetEndpoints().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearEndpoints() { - internalGetMutableEndpoints().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeEndpoints(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableEndpoints().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableEndpoints() { - return internalGetMutableEndpoints().getMutableMap(); - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder putEndpoints(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableEndpoints().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-     * URIs.
-     * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder putAllEndpoints(java.util.Map values) { - internalGetMutableEndpoints().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object outputUri_ = ""; - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-     * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - public java.lang.String getOutputUri() { - java.lang.Object ref = outputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-     * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - public com.google.protobuf.ByteString getOutputUriBytes() { - java.lang.Object ref = outputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-     * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - outputUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-     * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - - outputUri_ = getDefaultInstance().getOutputUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-     * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for outputUri to set. - * @return This builder for chaining. - */ - public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - outputUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object diagnosticOutputUri_ = ""; - /** - * - * - *
-     * Output only. A URI pointing to the location of the diagnostics tarball.
-     * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The diagnosticOutputUri. - */ - public java.lang.String getDiagnosticOutputUri() { - java.lang.Object ref = diagnosticOutputUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - diagnosticOutputUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the diagnostics tarball.
-     * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for diagnosticOutputUri. - */ - public com.google.protobuf.ByteString getDiagnosticOutputUriBytes() { - java.lang.Object ref = diagnosticOutputUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - diagnosticOutputUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the diagnostics tarball.
-     * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The diagnosticOutputUri to set. - * @return This builder for chaining. - */ - public Builder setDiagnosticOutputUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - diagnosticOutputUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the diagnostics tarball.
-     * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDiagnosticOutputUri() { - - diagnosticOutputUri_ = getDefaultInstance().getDiagnosticOutputUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A URI pointing to the location of the diagnostics tarball.
-     * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for diagnosticOutputUri to set. - * @return This builder for chaining. - */ - public Builder setDiagnosticOutputUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - diagnosticOutputUri_ = 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.dataproc.v1.RuntimeInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.RuntimeInfo) - private static final com.google.cloud.dataproc.v1.RuntimeInfo DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.RuntimeInfo(); - } - - public static com.google.cloud.dataproc.v1.RuntimeInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RuntimeInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RuntimeInfo(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.dataproc.v1.RuntimeInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfoOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfoOrBuilder.java deleted file mode 100644 index 0c52ec1c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RuntimeInfoOrBuilder.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface RuntimeInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.RuntimeInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getEndpointsCount(); - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - boolean containsEndpoints(java.lang.String key); - /** Use {@link #getEndpointsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getEndpoints(); - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.Map getEndpointsMap(); - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getEndpointsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Output only. Map of remote access endpoints (such as web interfaces and APIs) to their
-   * URIs.
-   * 
- * - * map<string, string> endpoints = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.lang.String getEndpointsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-   * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - /** - * - * - *
-   * Output only. A URI pointing to the location of the stdout and stderr of the workload.
-   * 
- * - * string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); - - /** - * - * - *
-   * Output only. A URI pointing to the location of the diagnostics tarball.
-   * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The diagnosticOutputUri. - */ - java.lang.String getDiagnosticOutputUri(); - /** - * - * - *
-   * Output only. A URI pointing to the location of the diagnostics tarball.
-   * 
- * - * string diagnostic_output_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for diagnosticOutputUri. - */ - com.google.protobuf.ByteString getDiagnosticOutputUriBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java deleted file mode 100644 index 1cf38ac7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java +++ /dev/null @@ -1,1070 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Security related configuration, including encryption, Kerberos, etc.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SecurityConfig} - */ -public final class SecurityConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SecurityConfig) - SecurityConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use SecurityConfig.newBuilder() to construct. - private SecurityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SecurityConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SecurityConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SecurityConfig( - 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.dataproc.v1.KerberosConfig.Builder subBuilder = null; - if (kerberosConfig_ != null) { - subBuilder = kerberosConfig_.toBuilder(); - } - kerberosConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.KerberosConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kerberosConfig_); - kerberosConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataproc.v1.IdentityConfig.Builder subBuilder = null; - if (identityConfig_ != null) { - subBuilder = identityConfig_.toBuilder(); - } - identityConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.IdentityConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(identityConfig_); - identityConfig_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SecurityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SecurityConfig.class, - com.google.cloud.dataproc.v1.SecurityConfig.Builder.class); - } - - public static final int KERBEROS_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.KerberosConfig kerberosConfig_; - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kerberosConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfig getKerberosConfig() { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return getKerberosConfig(); - } - - public static final int IDENTITY_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.IdentityConfig identityConfig_; - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the identityConfig field is set. - */ - @java.lang.Override - public boolean hasIdentityConfig() { - return identityConfig_ != null; - } - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The identityConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.IdentityConfig getIdentityConfig() { - return identityConfig_ == null - ? com.google.cloud.dataproc.v1.IdentityConfig.getDefaultInstance() - : identityConfig_; - } - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.IdentityConfigOrBuilder getIdentityConfigOrBuilder() { - return getIdentityConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (kerberosConfig_ != null) { - output.writeMessage(1, getKerberosConfig()); - } - if (identityConfig_ != null) { - output.writeMessage(2, getIdentityConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kerberosConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKerberosConfig()); - } - if (identityConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIdentityConfig()); - } - 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.dataproc.v1.SecurityConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SecurityConfig other = - (com.google.cloud.dataproc.v1.SecurityConfig) obj; - - if (hasKerberosConfig() != other.hasKerberosConfig()) return false; - if (hasKerberosConfig()) { - if (!getKerberosConfig().equals(other.getKerberosConfig())) return false; - } - if (hasIdentityConfig() != other.hasIdentityConfig()) return false; - if (hasIdentityConfig()) { - if (!getIdentityConfig().equals(other.getIdentityConfig())) 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 (hasKerberosConfig()) { - hash = (37 * hash) + KERBEROS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKerberosConfig().hashCode(); - } - if (hasIdentityConfig()) { - hash = (37 * hash) + IDENTITY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getIdentityConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SecurityConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig 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.dataproc.v1.SecurityConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig parseFrom( - 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.dataproc.v1.SecurityConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig 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.dataproc.v1.SecurityConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig 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.dataproc.v1.SecurityConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig 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.dataproc.v1.SecurityConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Security related configuration, including encryption, Kerberos, etc.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SecurityConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SecurityConfig) - com.google.cloud.dataproc.v1.SecurityConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SecurityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SecurityConfig.class, - com.google.cloud.dataproc.v1.SecurityConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SecurityConfig.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 (kerberosConfigBuilder_ == null) { - kerberosConfig_ = null; - } else { - kerberosConfig_ = null; - kerberosConfigBuilder_ = null; - } - if (identityConfigBuilder_ == null) { - identityConfig_ = null; - } else { - identityConfig_ = null; - identityConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SecurityConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SecurityConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SecurityConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SecurityConfig build() { - com.google.cloud.dataproc.v1.SecurityConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SecurityConfig buildPartial() { - com.google.cloud.dataproc.v1.SecurityConfig result = - new com.google.cloud.dataproc.v1.SecurityConfig(this); - if (kerberosConfigBuilder_ == null) { - result.kerberosConfig_ = kerberosConfig_; - } else { - result.kerberosConfig_ = kerberosConfigBuilder_.build(); - } - if (identityConfigBuilder_ == null) { - result.identityConfig_ = identityConfig_; - } else { - result.identityConfig_ = identityConfigBuilder_.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.dataproc.v1.SecurityConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.SecurityConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SecurityConfig other) { - if (other == com.google.cloud.dataproc.v1.SecurityConfig.getDefaultInstance()) return this; - if (other.hasKerberosConfig()) { - mergeKerberosConfig(other.getKerberosConfig()); - } - if (other.hasIdentityConfig()) { - mergeIdentityConfig(other.getIdentityConfig()); - } - 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.dataproc.v1.SecurityConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SecurityConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.KerberosConfig kerberosConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KerberosConfig, - com.google.cloud.dataproc.v1.KerberosConfig.Builder, - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder> - kerberosConfigBuilder_; - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return kerberosConfigBuilder_ != null || kerberosConfig_ != null; - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kerberosConfig. - */ - public com.google.cloud.dataproc.v1.KerberosConfig getKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } else { - return kerberosConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setKerberosConfig(com.google.cloud.dataproc.v1.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kerberosConfig_ = value; - onChanged(); - } else { - kerberosConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setKerberosConfig( - com.google.cloud.dataproc.v1.KerberosConfig.Builder builderForValue) { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = builderForValue.build(); - onChanged(); - } else { - kerberosConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeKerberosConfig(com.google.cloud.dataproc.v1.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (kerberosConfig_ != null) { - kerberosConfig_ = - com.google.cloud.dataproc.v1.KerberosConfig.newBuilder(kerberosConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - kerberosConfig_ = value; - } - onChanged(); - } else { - kerberosConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = null; - onChanged(); - } else { - kerberosConfig_ = null; - kerberosConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.KerberosConfig.Builder getKerberosConfigBuilder() { - - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - if (kerberosConfigBuilder_ != null) { - return kerberosConfigBuilder_.getMessageOrBuilder(); - } else { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - } - /** - * - * - *
-     * Optional. Kerberos related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KerberosConfig, - com.google.cloud.dataproc.v1.KerberosConfig.Builder, - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder> - getKerberosConfigFieldBuilder() { - if (kerberosConfigBuilder_ == null) { - kerberosConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KerberosConfig, - com.google.cloud.dataproc.v1.KerberosConfig.Builder, - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder>( - getKerberosConfig(), getParentForChildren(), isClean()); - kerberosConfig_ = null; - } - return kerberosConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.IdentityConfig identityConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.IdentityConfig, - com.google.cloud.dataproc.v1.IdentityConfig.Builder, - com.google.cloud.dataproc.v1.IdentityConfigOrBuilder> - identityConfigBuilder_; - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the identityConfig field is set. - */ - public boolean hasIdentityConfig() { - return identityConfigBuilder_ != null || identityConfig_ != null; - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The identityConfig. - */ - public com.google.cloud.dataproc.v1.IdentityConfig getIdentityConfig() { - if (identityConfigBuilder_ == null) { - return identityConfig_ == null - ? com.google.cloud.dataproc.v1.IdentityConfig.getDefaultInstance() - : identityConfig_; - } else { - return identityConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setIdentityConfig(com.google.cloud.dataproc.v1.IdentityConfig value) { - if (identityConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - identityConfig_ = value; - onChanged(); - } else { - identityConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setIdentityConfig( - com.google.cloud.dataproc.v1.IdentityConfig.Builder builderForValue) { - if (identityConfigBuilder_ == null) { - identityConfig_ = builderForValue.build(); - onChanged(); - } else { - identityConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeIdentityConfig(com.google.cloud.dataproc.v1.IdentityConfig value) { - if (identityConfigBuilder_ == null) { - if (identityConfig_ != null) { - identityConfig_ = - com.google.cloud.dataproc.v1.IdentityConfig.newBuilder(identityConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - identityConfig_ = value; - } - onChanged(); - } else { - identityConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearIdentityConfig() { - if (identityConfigBuilder_ == null) { - identityConfig_ = null; - onChanged(); - } else { - identityConfig_ = null; - identityConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.IdentityConfig.Builder getIdentityConfigBuilder() { - - onChanged(); - return getIdentityConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.IdentityConfigOrBuilder getIdentityConfigOrBuilder() { - if (identityConfigBuilder_ != null) { - return identityConfigBuilder_.getMessageOrBuilder(); - } else { - return identityConfig_ == null - ? com.google.cloud.dataproc.v1.IdentityConfig.getDefaultInstance() - : identityConfig_; - } - } - /** - * - * - *
-     * Optional. Identity related configuration, including service account based
-     * secure multi-tenancy user mappings.
-     * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.IdentityConfig, - com.google.cloud.dataproc.v1.IdentityConfig.Builder, - com.google.cloud.dataproc.v1.IdentityConfigOrBuilder> - getIdentityConfigFieldBuilder() { - if (identityConfigBuilder_ == null) { - identityConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.IdentityConfig, - com.google.cloud.dataproc.v1.IdentityConfig.Builder, - com.google.cloud.dataproc.v1.IdentityConfigOrBuilder>( - getIdentityConfig(), getParentForChildren(), isClean()); - identityConfig_ = null; - } - return identityConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.SecurityConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SecurityConfig) - private static final com.google.cloud.dataproc.v1.SecurityConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SecurityConfig(); - } - - public static com.google.cloud.dataproc.v1.SecurityConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SecurityConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityConfig(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.dataproc.v1.SecurityConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfigOrBuilder.java deleted file mode 100644 index 15cabbf9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfigOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface SecurityConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SecurityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The kerberosConfig. - */ - com.google.cloud.dataproc.v1.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Optional. Kerberos related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the identityConfig field is set. - */ - boolean hasIdentityConfig(); - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The identityConfig. - */ - com.google.cloud.dataproc.v1.IdentityConfig getIdentityConfig(); - /** - * - * - *
-   * Optional. Identity related configuration, including service account based
-   * secure multi-tenancy user mappings.
-   * 
- * - * - * .google.cloud.dataproc.v1.IdentityConfig identity_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.IdentityConfigOrBuilder getIdentityConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SharedProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SharedProto.java deleted file mode 100644 index d1d12ca9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SharedProto.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public final class SharedProto { - private SharedProto() {} - - 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_dataproc_v1_RuntimeConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_RuntimeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_EnvironmentConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ExecutionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_PeripheralsConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_RuntimeInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_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/dataproc/v1/shared.proto\022" - + "\030google.cloud.dataproc.v1\032\037google/api/fi" - + "eld_behavior.proto\"\310\001\n\rRuntimeConfig\022\024\n\007" - + "version\030\001 \001(\tB\003\340A\001\022\034\n\017container_image\030\002 " - + "\001(\tB\003\340A\001\022P\n\nproperties\030\003 \003(\01327.google.cl" - + "oud.dataproc.v1.RuntimeConfig.Properties" - + "EntryB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\253\001\n\021EnvironmentCon" - + "fig\022H\n\020execution_config\030\001 \001(\0132).google.c" - + "loud.dataproc.v1.ExecutionConfigB\003\340A\001\022L\n" - + "\022peripherals_config\030\002 \001(\0132+.google.cloud" - + ".dataproc.v1.PeripheralsConfigB\003\340A\001\"\246\001\n\017" - + "ExecutionConfig\022\034\n\017service_account\030\002 \001(\t" - + "B\003\340A\001\022\032\n\013network_uri\030\004 \001(\tB\003\340A\001H\000\022\035\n\016sub" - + "network_uri\030\005 \001(\tB\003\340A\001H\000\022\031\n\014network_tags" - + "\030\006 \003(\tB\003\340A\001\022\024\n\007kms_key\030\007 \001(\tB\003\340A\001B\t\n\007net" - + "work\"9\n\030SparkHistoryServerConfig\022\035\n\020data" - + "proc_cluster\030\001 \001(\tB\003\340A\001\"\221\001\n\021PeripheralsC" - + "onfig\022\036\n\021metastore_service\030\001 \001(\tB\003\340A\001\022\\\n" - + "\033spark_history_server_config\030\002 \001(\01322.goo" - + "gle.cloud.dataproc.v1.SparkHistoryServer" - + "ConfigB\003\340A\001\"\312\001\n\013RuntimeInfo\022L\n\tendpoints" - + "\030\001 \003(\01324.google.cloud.dataproc.v1.Runtim" - + "eInfo.EndpointsEntryB\003\340A\003\022\027\n\noutput_uri\030" - + "\002 \001(\tB\003\340A\003\022\"\n\025diagnostic_output_uri\030\003 \001(" - + "\tB\003\340A\003\0320\n\016EndpointsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\177\n\020GkeClusterConfig\022\037\n\022" - + "gke_cluster_target\030\002 \001(\tB\003\340A\001\022J\n\020node_po" - + "ol_target\030\003 \003(\0132+.google.cloud.dataproc." - + "v1.GkeNodePoolTargetB\003\340A\001\"\362\001\n\027Kubernetes" - + "ClusterConfig\022!\n\024kubernetes_namespace\030\001 " - + "\001(\tB\003\340A\001\022M\n\022gke_cluster_config\030\002 \001(\0132*.g" - + "oogle.cloud.dataproc.v1.GkeClusterConfig" - + "B\003\340A\002H\000\022[\n\032kubernetes_software_config\030\003 " - + "\001(\01322.google.cloud.dataproc.v1.Kubernete" - + "sSoftwareConfigB\003\340A\001B\010\n\006config\"\303\002\n\030Kuber" - + "netesSoftwareConfig\022c\n\021component_version" - + "\030\001 \003(\0132H.google.cloud.dataproc.v1.Kubern" - + "etesSoftwareConfig.ComponentVersionEntry" - + "\022V\n\nproperties\030\002 \003(\0132B.google.cloud.data" - + "proc.v1.KubernetesSoftwareConfig.Propert" - + "iesEntry\0327\n\025ComponentVersionEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017PropertiesE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\236\002\n" - + "\021GkeNodePoolTarget\022\026\n\tnode_pool\030\001 \001(\tB\003\340" - + "A\002\022D\n\005roles\030\002 \003(\01620.google.cloud.datapro" - + "c.v1.GkeNodePoolTarget.RoleB\003\340A\002\022J\n\020node" - + "_pool_config\030\003 \001(\0132+.google.cloud.datapr" - + "oc.v1.GkeNodePoolConfigB\003\340A\001\"_\n\004Role\022\024\n\020" - + "ROLE_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020\001\022\016\n\nCONTR" - + "OLLER\020\002\022\020\n\014SPARK_DRIVER\020\003\022\022\n\016SPARK_EXECU" - + "TOR\020\004\"\355\004\n\021GkeNodePoolConfig\022N\n\006config\030\002 " - + "\001(\01329.google.cloud.dataproc.v1.GkeNodePo" - + "olConfig.GkeNodeConfigB\003\340A\001\022\026\n\tlocations" - + "\030\r \003(\tB\003\340A\001\022b\n\013autoscaling\030\004 \001(\0132H.googl" - + "e.cloud.dataproc.v1.GkeNodePoolConfig.Gk" - + "eNodePoolAutoscalingConfigB\003\340A\001\032\346\001\n\rGkeN" - + "odeConfig\022\031\n\014machine_type\030\001 \001(\tB\003\340A\001\022\030\n\013" - + "preemptible\030\n \001(\010B\003\340A\001\022\034\n\017local_ssd_coun" - + "t\030\007 \001(\005B\003\340A\001\022c\n\014accelerators\030\013 \003(\0132H.goo" - + "gle.cloud.dataproc.v1.GkeNodePoolConfig." - + "GkeNodePoolAcceleratorConfigB\003\340A\001\022\035\n\020min" - + "_cpu_platform\030\r \001(\tB\003\340A\001\032S\n\034GkeNodePoolA" - + "cceleratorConfig\022\031\n\021accelerator_count\030\001 " - + "\001(\003\022\030\n\020accelerator_type\030\002 \001(\t\032N\n\034GkeNode" - + "PoolAutoscalingConfig\022\026\n\016min_node_count\030" - + "\002 \001(\005\022\026\n\016max_node_count\030\003 \001(\005*\277\001\n\tCompon" - + "ent\022\031\n\025COMPONENT_UNSPECIFIED\020\000\022\014\n\010ANACON" - + "DA\020\005\022\n\n\006DOCKER\020\r\022\t\n\005DRUID\020\t\022\t\n\005FLINK\020\016\022\t" - + "\n\005HBASE\020\013\022\020\n\014HIVE_WEBHCAT\020\003\022\013\n\007JUPYTER\020\001" - + "\022\n\n\006PRESTO\020\006\022\n\n\006RANGER\020\014\022\010\n\004SOLR\020\n\022\014\n\010ZE" - + "PPELIN\020\004\022\r\n\tZOOKEEPER\020\010*J\n\rFailureAction" - + "\022\036\n\032FAILURE_ACTION_UNSPECIFIED\020\000\022\r\n\tNO_A" - + "CTION\020\001\022\n\n\006DELETE\020\002Bo\n\034com.google.cloud." - + "dataproc.v1B\013SharedProtoP\001Z@google.golan" - + "g.org/genproto/googleapis/cloud/dataproc" - + "/v1;dataprocb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_RuntimeConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor, - new java.lang.String[] { - "Version", "ContainerImage", "Properties", - }); - internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_RuntimeConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_RuntimeConfig_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_EnvironmentConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_EnvironmentConfig_descriptor, - new java.lang.String[] { - "ExecutionConfig", "PeripheralsConfig", - }); - internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_ExecutionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ExecutionConfig_descriptor, - new java.lang.String[] { - "ServiceAccount", "NetworkUri", "SubnetworkUri", "NetworkTags", "KmsKey", "Network", - }); - internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor, - new java.lang.String[] { - "DataprocCluster", - }); - internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1_PeripheralsConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_PeripheralsConfig_descriptor, - new java.lang.String[] { - "MetastoreService", "SparkHistoryServerConfig", - }); - internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1_RuntimeInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor, - new java.lang.String[] { - "Endpoints", "OutputUri", "DiagnosticOutputUri", - }); - internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_RuntimeInfo_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_RuntimeInfo_EndpointsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1_GkeClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeClusterConfig_descriptor, - new java.lang.String[] { - "GkeClusterTarget", "NodePoolTarget", - }); - internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_KubernetesClusterConfig_descriptor, - new java.lang.String[] { - "KubernetesNamespace", "GkeClusterConfig", "KubernetesSoftwareConfig", "Config", - }); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor, - new java.lang.String[] { - "ComponentVersion", "Properties", - }); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_descriptor = - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_ComponentVersionEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_KubernetesSoftwareConfig_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeNodePoolTarget_descriptor, - new java.lang.String[] { - "NodePool", "Roles", "NodePoolConfig", - }); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor, - new java.lang.String[] { - "Config", "Locations", "Autoscaling", - }); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor = - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodeConfig_descriptor, - new java.lang.String[] { - "MachineType", "Preemptible", "LocalSsdCount", "Accelerators", "MinCpuPlatform", - }); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor = - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAcceleratorConfig_descriptor, - new java.lang.String[] { - "AcceleratorCount", "AcceleratorType", - }); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor = - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GkeNodePoolConfig_GkeNodePoolAutoscalingConfig_descriptor, - new java.lang.String[] { - "MinNodeCount", "MaxNodeCount", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfig.java deleted file mode 100644 index 01d8b14f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfig.java +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Shielded Instance Config for clusters using [Compute Engine Shielded
- * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ShieldedInstanceConfig} - */ -public final class ShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ShieldedInstanceConfig) - ShieldedInstanceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ShieldedInstanceConfig.newBuilder() to construct. - private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ShieldedInstanceConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ShieldedInstanceConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ShieldedInstanceConfig( - 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: - { - enableSecureBoot_ = input.readBool(); - break; - } - case 16: - { - enableVtpm_ = input.readBool(); - break; - } - case 24: - { - enableIntegrityMonitoring_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.class, - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder.class); - } - - public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; - private boolean enableSecureBoot_; - /** - * - * - *
-   * Optional. Defines whether instances have Secure Boot enabled.
-   * 
- * - * bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableSecureBoot. - */ - @java.lang.Override - public boolean getEnableSecureBoot() { - return enableSecureBoot_; - } - - public static final int ENABLE_VTPM_FIELD_NUMBER = 2; - private boolean enableVtpm_; - /** - * - * - *
-   * Optional. Defines whether instances have the vTPM enabled.
-   * 
- * - * bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableVtpm. - */ - @java.lang.Override - public boolean getEnableVtpm() { - return enableVtpm_; - } - - public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3; - private boolean enableIntegrityMonitoring_; - /** - * - * - *
-   * Optional. Defines whether instances have integrity monitoring enabled.
-   * 
- * - * bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableIntegrityMonitoring. - */ - @java.lang.Override - public boolean getEnableIntegrityMonitoring() { - return enableIntegrityMonitoring_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (enableSecureBoot_ != false) { - output.writeBool(1, enableSecureBoot_); - } - if (enableVtpm_ != false) { - output.writeBool(2, enableVtpm_); - } - if (enableIntegrityMonitoring_ != false) { - output.writeBool(3, enableIntegrityMonitoring_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enableSecureBoot_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); - } - if (enableVtpm_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_); - } - if (enableIntegrityMonitoring_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_); - } - 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.dataproc.v1.ShieldedInstanceConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ShieldedInstanceConfig other = - (com.google.cloud.dataproc.v1.ShieldedInstanceConfig) obj; - - if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; - if (getEnableVtpm() != other.getEnableVtpm()) return false; - if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) 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) + ENABLE_SECURE_BOOT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); - hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); - hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig 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.dataproc.v1.ShieldedInstanceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig parseFrom( - 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.dataproc.v1.ShieldedInstanceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig 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.dataproc.v1.ShieldedInstanceConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig 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.dataproc.v1.ShieldedInstanceConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig 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.dataproc.v1.ShieldedInstanceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Shielded Instance Config for clusters using [Compute Engine Shielded
-   * VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ShieldedInstanceConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ShieldedInstanceConfig) - com.google.cloud.dataproc.v1.ShieldedInstanceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.class, - com.google.cloud.dataproc.v1.ShieldedInstanceConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ShieldedInstanceConfig.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(); - enableSecureBoot_ = false; - - enableVtpm_ = false; - - enableIntegrityMonitoring_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_ShieldedInstanceConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ShieldedInstanceConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig build() { - com.google.cloud.dataproc.v1.ShieldedInstanceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ShieldedInstanceConfig buildPartial() { - com.google.cloud.dataproc.v1.ShieldedInstanceConfig result = - new com.google.cloud.dataproc.v1.ShieldedInstanceConfig(this); - result.enableSecureBoot_ = enableSecureBoot_; - result.enableVtpm_ = enableVtpm_; - result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_; - 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.dataproc.v1.ShieldedInstanceConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.ShieldedInstanceConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ShieldedInstanceConfig other) { - if (other == com.google.cloud.dataproc.v1.ShieldedInstanceConfig.getDefaultInstance()) - return this; - if (other.getEnableSecureBoot() != false) { - setEnableSecureBoot(other.getEnableSecureBoot()); - } - if (other.getEnableVtpm() != false) { - setEnableVtpm(other.getEnableVtpm()); - } - if (other.getEnableIntegrityMonitoring() != false) { - setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring()); - } - 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.dataproc.v1.ShieldedInstanceConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.ShieldedInstanceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enableSecureBoot_; - /** - * - * - *
-     * Optional. Defines whether instances have Secure Boot enabled.
-     * 
- * - * bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableSecureBoot. - */ - @java.lang.Override - public boolean getEnableSecureBoot() { - return enableSecureBoot_; - } - /** - * - * - *
-     * Optional. Defines whether instances have Secure Boot enabled.
-     * 
- * - * bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableSecureBoot to set. - * @return This builder for chaining. - */ - public Builder setEnableSecureBoot(boolean value) { - - enableSecureBoot_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Defines whether instances have Secure Boot enabled.
-     * 
- * - * bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableSecureBoot() { - - enableSecureBoot_ = false; - onChanged(); - return this; - } - - private boolean enableVtpm_; - /** - * - * - *
-     * Optional. Defines whether instances have the vTPM enabled.
-     * 
- * - * bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableVtpm. - */ - @java.lang.Override - public boolean getEnableVtpm() { - return enableVtpm_; - } - /** - * - * - *
-     * Optional. Defines whether instances have the vTPM enabled.
-     * 
- * - * bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableVtpm to set. - * @return This builder for chaining. - */ - public Builder setEnableVtpm(boolean value) { - - enableVtpm_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Defines whether instances have the vTPM enabled.
-     * 
- * - * bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableVtpm() { - - enableVtpm_ = false; - onChanged(); - return this; - } - - private boolean enableIntegrityMonitoring_; - /** - * - * - *
-     * Optional. Defines whether instances have integrity monitoring enabled.
-     * 
- * - * bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableIntegrityMonitoring. - */ - @java.lang.Override - public boolean getEnableIntegrityMonitoring() { - return enableIntegrityMonitoring_; - } - /** - * - * - *
-     * Optional. Defines whether instances have integrity monitoring enabled.
-     * 
- * - * bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The enableIntegrityMonitoring to set. - * @return This builder for chaining. - */ - public Builder setEnableIntegrityMonitoring(boolean value) { - - enableIntegrityMonitoring_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Defines whether instances have integrity monitoring enabled.
-     * 
- * - * bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEnableIntegrityMonitoring() { - - enableIntegrityMonitoring_ = 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.dataproc.v1.ShieldedInstanceConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ShieldedInstanceConfig) - private static final com.google.cloud.dataproc.v1.ShieldedInstanceConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ShieldedInstanceConfig(); - } - - public static com.google.cloud.dataproc.v1.ShieldedInstanceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ShieldedInstanceConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ShieldedInstanceConfig(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.dataproc.v1.ShieldedInstanceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfigOrBuilder.java deleted file mode 100644 index 26e0a138..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfigOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface ShieldedInstanceConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ShieldedInstanceConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Defines whether instances have Secure Boot enabled.
-   * 
- * - * bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableSecureBoot. - */ - boolean getEnableSecureBoot(); - - /** - * - * - *
-   * Optional. Defines whether instances have the vTPM enabled.
-   * 
- * - * bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableVtpm. - */ - boolean getEnableVtpm(); - - /** - * - * - *
-   * Optional. Defines whether instances have integrity monitoring enabled.
-   * 
- * - * bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The enableIntegrityMonitoring. - */ - boolean getEnableIntegrityMonitoring(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfig.java deleted file mode 100644 index dcec205e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfig.java +++ /dev/null @@ -1,1595 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies the selection and config of software inside the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SoftwareConfig} - */ -public final class SoftwareConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SoftwareConfig) - SoftwareConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use SoftwareConfig.newBuilder() to construct. - private SoftwareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SoftwareConfig() { - imageVersion_ = ""; - optionalComponents_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SoftwareConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SoftwareConfig( - 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(); - - imageVersion_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 24: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - optionalComponents_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - optionalComponents_.add(rawValue); - break; - } - case 26: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - optionalComponents_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - optionalComponents_.add(rawValue); - } - input.popLimit(oldLimit); - 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_ & 0x00000002) != 0)) { - optionalComponents_ = java.util.Collections.unmodifiableList(optionalComponents_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SoftwareConfig.class, - com.google.cloud.dataproc.v1.SoftwareConfig.Builder.class); - } - - public static final int IMAGE_VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object imageVersion_; - /** - * - * - *
-   * Optional. The version of software inside the cluster. It must be one of the
-   * supported [Dataproc
-   * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-   * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-   * ["preview"
-   * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-   * If unspecified, it defaults to the latest Debian version.
-   * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageVersion. - */ - @java.lang.Override - public java.lang.String getImageVersion() { - java.lang.Object ref = imageVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageVersion_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The version of software inside the cluster. It must be one of the
-   * supported [Dataproc
-   * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-   * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-   * ["preview"
-   * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-   * If unspecified, it defaults to the latest Debian version.
-   * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getImageVersionBytes() { - java.lang.Object ref = imageVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - imageVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROPERTIES_FIELD_NUMBER = 2; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int OPTIONAL_COMPONENTS_FIELD_NUMBER = 3; - private java.util.List optionalComponents_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1.Component> - optionalComponents_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1.Component>() { - public com.google.cloud.dataproc.v1.Component convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.Component result = - com.google.cloud.dataproc.v1.Component.valueOf(from); - return result == null ? com.google.cloud.dataproc.v1.Component.UNRECOGNIZED : result; - } - }; - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the optionalComponents. - */ - @java.lang.Override - public java.util.List getOptionalComponentsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.dataproc.v1.Component>( - optionalComponents_, optionalComponents_converter_); - } - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of optionalComponents. - */ - @java.lang.Override - public int getOptionalComponentsCount() { - return optionalComponents_.size(); - } - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Component getOptionalComponents(int index) { - return optionalComponents_converter_.convert(optionalComponents_.get(index)); - } - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - @java.lang.Override - public java.util.List getOptionalComponentsValueList() { - return optionalComponents_; - } - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of optionalComponents at the given index. - */ - @java.lang.Override - public int getOptionalComponentsValue(int index) { - return optionalComponents_.get(index); - } - - private int optionalComponentsMemoizedSerializedSize; - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageVersion_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 2); - if (getOptionalComponentsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(optionalComponentsMemoizedSerializedSize); - } - for (int i = 0; i < optionalComponents_.size(); i++) { - output.writeEnumNoTag(optionalComponents_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageVersion_); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, properties__); - } - { - int dataSize = 0; - for (int i = 0; i < optionalComponents_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(optionalComponents_.get(i)); - } - size += dataSize; - if (!getOptionalComponentsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); - } - optionalComponentsMemoizedSerializedSize = dataSize; - } - 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.dataproc.v1.SoftwareConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SoftwareConfig other = - (com.google.cloud.dataproc.v1.SoftwareConfig) obj; - - if (!getImageVersion().equals(other.getImageVersion())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!optionalComponents_.equals(other.optionalComponents_)) 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) + IMAGE_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getImageVersion().hashCode(); - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (getOptionalComponentsCount() > 0) { - hash = (37 * hash) + OPTIONAL_COMPONENTS_FIELD_NUMBER; - hash = (53 * hash) + optionalComponents_.hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig 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.dataproc.v1.SoftwareConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig parseFrom( - 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.dataproc.v1.SoftwareConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig 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.dataproc.v1.SoftwareConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig 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.dataproc.v1.SoftwareConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig 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.dataproc.v1.SoftwareConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies the selection and config of software inside the cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SoftwareConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SoftwareConfig) - com.google.cloud.dataproc.v1.SoftwareConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SoftwareConfig.class, - com.google.cloud.dataproc.v1.SoftwareConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SoftwareConfig.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(); - imageVersion_ = ""; - - internalGetMutableProperties().clear(); - optionalComponents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_SoftwareConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SoftwareConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SoftwareConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SoftwareConfig build() { - com.google.cloud.dataproc.v1.SoftwareConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SoftwareConfig buildPartial() { - com.google.cloud.dataproc.v1.SoftwareConfig result = - new com.google.cloud.dataproc.v1.SoftwareConfig(this); - int from_bitField0_ = bitField0_; - result.imageVersion_ = imageVersion_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (((bitField0_ & 0x00000002) != 0)) { - optionalComponents_ = java.util.Collections.unmodifiableList(optionalComponents_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.optionalComponents_ = optionalComponents_; - 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.dataproc.v1.SoftwareConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.SoftwareConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SoftwareConfig other) { - if (other == com.google.cloud.dataproc.v1.SoftwareConfig.getDefaultInstance()) return this; - if (!other.getImageVersion().isEmpty()) { - imageVersion_ = other.imageVersion_; - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (!other.optionalComponents_.isEmpty()) { - if (optionalComponents_.isEmpty()) { - optionalComponents_ = other.optionalComponents_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureOptionalComponentsIsMutable(); - optionalComponents_.addAll(other.optionalComponents_); - } - 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.dataproc.v1.SoftwareConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SoftwareConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object imageVersion_ = ""; - /** - * - * - *
-     * Optional. The version of software inside the cluster. It must be one of the
-     * supported [Dataproc
-     * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-     * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-     * ["preview"
-     * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-     * If unspecified, it defaults to the latest Debian version.
-     * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageVersion. - */ - public java.lang.String getImageVersion() { - java.lang.Object ref = imageVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - imageVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The version of software inside the cluster. It must be one of the
-     * supported [Dataproc
-     * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-     * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-     * ["preview"
-     * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-     * If unspecified, it defaults to the latest Debian version.
-     * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageVersion. - */ - public com.google.protobuf.ByteString getImageVersionBytes() { - java.lang.Object ref = imageVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - imageVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The version of software inside the cluster. It must be one of the
-     * supported [Dataproc
-     * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-     * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-     * ["preview"
-     * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-     * If unspecified, it defaults to the latest Debian version.
-     * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The imageVersion to set. - * @return This builder for chaining. - */ - public Builder setImageVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - imageVersion_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The version of software inside the cluster. It must be one of the
-     * supported [Dataproc
-     * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-     * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-     * ["preview"
-     * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-     * If unspecified, it defaults to the latest Debian version.
-     * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearImageVersion() { - - imageVersion_ = getDefaultInstance().getImageVersion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The version of software inside the cluster. It must be one of the
-     * supported [Dataproc
-     * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-     * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-     * ["preview"
-     * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-     * If unspecified, it defaults to the latest Debian version.
-     * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for imageVersion to set. - * @return This builder for chaining. - */ - public Builder setImageVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - imageVersion_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. The properties to set on daemon config files.
-     * Property keys are specified in `prefix:property` format, for example
-     * `core:hadoop.tmp.dir`. The following are supported prefixes
-     * and their mappings:
-     * * capacity-scheduler: `capacity-scheduler.xml`
-     * * core:   `core-site.xml`
-     * * distcp: `distcp-default.xml`
-     * * hdfs:   `hdfs-site.xml`
-     * * hive:   `hive-site.xml`
-     * * mapred: `mapred-site.xml`
-     * * pig:    `pig.properties`
-     * * spark:  `spark-defaults.conf`
-     * * yarn:   `yarn-site.xml`
-     * For more information, see [Cluster
-     * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-     * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private java.util.List optionalComponents_ = - java.util.Collections.emptyList(); - - private void ensureOptionalComponentsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - optionalComponents_ = new java.util.ArrayList(optionalComponents_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the optionalComponents. - */ - public java.util.List getOptionalComponentsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.cloud.dataproc.v1.Component>( - optionalComponents_, optionalComponents_converter_); - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of optionalComponents. - */ - public int getOptionalComponentsCount() { - return optionalComponents_.size(); - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - public com.google.cloud.dataproc.v1.Component getOptionalComponents(int index) { - return optionalComponents_converter_.convert(optionalComponents_.get(index)); - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The optionalComponents to set. - * @return This builder for chaining. - */ - public Builder setOptionalComponents(int index, com.google.cloud.dataproc.v1.Component value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalComponentsIsMutable(); - optionalComponents_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addOptionalComponents(com.google.cloud.dataproc.v1.Component value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalComponentsIsMutable(); - optionalComponents_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addAllOptionalComponents( - java.lang.Iterable values) { - ensureOptionalComponentsIsMutable(); - for (com.google.cloud.dataproc.v1.Component value : values) { - optionalComponents_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearOptionalComponents() { - optionalComponents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - public java.util.List getOptionalComponentsValueList() { - return java.util.Collections.unmodifiableList(optionalComponents_); - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of optionalComponents at the given index. - */ - public int getOptionalComponentsValue(int index) { - return optionalComponents_.get(index); - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of optionalComponents at the given index. - * @return This builder for chaining. - */ - public Builder setOptionalComponentsValue(int index, int value) { - ensureOptionalComponentsIsMutable(); - optionalComponents_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addOptionalComponentsValue(int value) { - ensureOptionalComponentsIsMutable(); - optionalComponents_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The set of components to activate on the cluster.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The enum numeric values on the wire for optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addAllOptionalComponentsValue(java.lang.Iterable values) { - ensureOptionalComponentsIsMutable(); - for (int value : values) { - optionalComponents_.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.dataproc.v1.SoftwareConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SoftwareConfig) - private static final com.google.cloud.dataproc.v1.SoftwareConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SoftwareConfig(); - } - - public static com.google.cloud.dataproc.v1.SoftwareConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SoftwareConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SoftwareConfig(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.dataproc.v1.SoftwareConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfigOrBuilder.java deleted file mode 100644 index 427f8991..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfigOrBuilder.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface SoftwareConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SoftwareConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The version of software inside the cluster. It must be one of the
-   * supported [Dataproc
-   * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-   * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-   * ["preview"
-   * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-   * If unspecified, it defaults to the latest Debian version.
-   * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The imageVersion. - */ - java.lang.String getImageVersion(); - /** - * - * - *
-   * Optional. The version of software inside the cluster. It must be one of the
-   * supported [Dataproc
-   * Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
-   * such as "1.2" (including a subminor version, such as "1.2.29"), or the
-   * ["preview"
-   * version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
-   * If unspecified, it defaults to the latest Debian version.
-   * 
- * - * string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for imageVersion. - */ - com.google.protobuf.ByteString getImageVersionBytes(); - - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The properties to set on daemon config files.
-   * Property keys are specified in `prefix:property` format, for example
-   * `core:hadoop.tmp.dir`. The following are supported prefixes
-   * and their mappings:
-   * * capacity-scheduler: `capacity-scheduler.xml`
-   * * core:   `core-site.xml`
-   * * distcp: `distcp-default.xml`
-   * * hdfs:   `hdfs-site.xml`
-   * * hive:   `hive-site.xml`
-   * * mapred: `mapred-site.xml`
-   * * pig:    `pig.properties`
-   * * spark:  `spark-defaults.conf`
-   * * yarn:   `yarn-site.xml`
-   * For more information, see [Cluster
-   * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
-   * 
- * - * map<string, string> properties = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the optionalComponents. - */ - java.util.List getOptionalComponentsList(); - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of optionalComponents. - */ - int getOptionalComponentsCount(); - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - com.google.cloud.dataproc.v1.Component getOptionalComponents(int index); - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - java.util.List getOptionalComponentsValueList(); - /** - * - * - *
-   * Optional. The set of components to activate on the cluster.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.Component optional_components = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of optionalComponents at the given index. - */ - int getOptionalComponentsValue(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatch.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatch.java deleted file mode 100644 index 0f00a9d6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatch.java +++ /dev/null @@ -1,2198 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A configuration for running an [Apache Spark](http://spark.apache.org/)
- * batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkBatch} - */ -public final class SparkBatch extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkBatch) - SparkBatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkBatch.newBuilder() to construct. - private SparkBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkBatch() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkBatch(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkBatch( - 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(); - driverCase_ = 1; - driver_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 2; - driver_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - jarFileUris_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - fileUris_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - archiveUris_.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)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkBatch.class, - com.google.cloud.dataproc.v1.SparkBatch.Builder.class); - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public enum DriverCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MAIN_JAR_FILE_URI(1), - MAIN_CLASS(2), - DRIVER_NOT_SET(0); - private final int value; - - private DriverCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DriverCase valueOf(int value) { - return forNumber(value); - } - - public static DriverCase forNumber(int value) { - switch (value) { - case 1: - return MAIN_JAR_FILE_URI; - case 2: - return MAIN_CLASS; - case 0: - return DRIVER_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public static final int MAIN_JAR_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainJarFileUri field is set. - */ - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainJarFileUri. - */ - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainJarFileUri. - */ - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAIN_CLASS_FIELD_NUMBER = 2; - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainClass field is set. - */ - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainClass. - */ - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainClass. - */ - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.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 (driverCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, driver_); - } - if (driverCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, driver_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (driverCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, driver_); - } - if (driverCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, driver_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().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.dataproc.v1.SparkBatch)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkBatch other = (com.google.cloud.dataproc.v1.SparkBatch) obj; - - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; - if (!getDriverCase().equals(other.getDriverCase())) return false; - switch (driverCase_) { - case 1: - if (!getMainJarFileUri().equals(other.getMainJarFileUri())) return false; - break; - case 2: - if (!getMainClass().equals(other.getMainClass())) return false; - break; - case 0: - default: - } - 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 (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - switch (driverCase_) { - case 1: - hash = (37 * hash) + MAIN_JAR_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainJarFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + MAIN_CLASS_FIELD_NUMBER; - hash = (53 * hash) + getMainClass().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkBatch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkBatch 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.dataproc.v1.SparkBatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkBatch parseFrom( - 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.dataproc.v1.SparkBatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkBatch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkBatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkBatch 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.dataproc.v1.SparkBatch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkBatch 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.dataproc.v1.SparkBatch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkBatch 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.dataproc.v1.SparkBatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A configuration for running an [Apache Spark](http://spark.apache.org/)
-   * batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkBatch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkBatch) - com.google.cloud.dataproc.v1.SparkBatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkBatch.class, - com.google.cloud.dataproc.v1.SparkBatch.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkBatch.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(); - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - driverCase_ = 0; - driver_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkBatch_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatch getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatch build() { - com.google.cloud.dataproc.v1.SparkBatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkBatch buildPartial() { - com.google.cloud.dataproc.v1.SparkBatch result = - new com.google.cloud.dataproc.v1.SparkBatch(this); - int from_bitField0_ = bitField0_; - if (driverCase_ == 1) { - result.driver_ = driver_; - } - if (driverCase_ == 2) { - result.driver_ = driver_; - } - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.jarFileUris_ = jarFileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.archiveUris_ = archiveUris_; - result.driverCase_ = driverCase_; - 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.dataproc.v1.SparkBatch) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkBatch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkBatch other) { - if (other == com.google.cloud.dataproc.v1.SparkBatch.getDefaultInstance()) return this; - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - onChanged(); - } - switch (other.getDriverCase()) { - case MAIN_JAR_FILE_URI: - { - driverCase_ = 1; - driver_ = other.driver_; - onChanged(); - break; - } - case MAIN_CLASS: - { - driverCase_ = 2; - driver_ = other.driver_; - onChanged(); - break; - } - case DRIVER_NOT_SET: - { - break; - } - } - 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.dataproc.v1.SparkBatch parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkBatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public Builder clearDriver() { - driverCase_ = 0; - driver_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainJarFileUri field is set. - */ - @java.lang.Override - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainJarFileUri. - */ - @java.lang.Override - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainJarFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMainJarFileUri() { - if (driverCase_ == 1) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Optional. The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainClass field is set. - */ - @java.lang.Override - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainClass. - */ - @java.lang.Override - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainClass. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClass(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMainClass() { - if (driverCase_ == 2) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Optional. The name of the driver main class. The jar file that contains the class
-     * must be in the classpath or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClassBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the classpath of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.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.dataproc.v1.SparkBatch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkBatch) - private static final com.google.cloud.dataproc.v1.SparkBatch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkBatch(); - } - - public static com.google.cloud.dataproc.v1.SparkBatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkBatch parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkBatch(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.dataproc.v1.SparkBatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatchOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatchOrBuilder.java deleted file mode 100644 index 8ce57703..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkBatchOrBuilder.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkBatchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkBatch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainJarFileUri field is set. - */ - boolean hasMainJarFileUri(); - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainJarFileUri. - */ - java.lang.String getMainJarFileUri(); - /** - * - * - *
-   * Optional. The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainJarFileUri. - */ - com.google.protobuf.ByteString getMainJarFileUriBytes(); - - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return Whether the mainClass field is set. - */ - boolean hasMainClass(); - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The mainClass. - */ - java.lang.String getMainClass(); - /** - * - * - *
-   * Optional. The name of the driver main class. The jar file that contains the class
-   * must be in the classpath or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for mainClass. - */ - com.google.protobuf.ByteString getMainClassBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the classpath of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); - - public com.google.cloud.dataproc.v1.SparkBatch.DriverCase getDriverCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfig.java deleted file mode 100644 index 309d3884..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfig.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Spark History Server configuration for the workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkHistoryServerConfig} - */ -public final class SparkHistoryServerConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkHistoryServerConfig) - SparkHistoryServerConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkHistoryServerConfig.newBuilder() to construct. - private SparkHistoryServerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkHistoryServerConfig() { - dataprocCluster_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkHistoryServerConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkHistoryServerConfig( - 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(); - - dataprocCluster_ = 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.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.class, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder.class); - } - - public static final int DATAPROC_CLUSTER_FIELD_NUMBER = 1; - private volatile java.lang.Object dataprocCluster_; - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-   * Server for the workload.
-   * Example:
-   * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-   * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dataprocCluster. - */ - @java.lang.Override - public java.lang.String getDataprocCluster() { - java.lang.Object ref = dataprocCluster_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataprocCluster_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-   * Server for the workload.
-   * Example:
-   * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-   * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for dataprocCluster. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataprocClusterBytes() { - java.lang.Object ref = dataprocCluster_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataprocCluster_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataprocCluster_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataprocCluster_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataprocCluster_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataprocCluster_); - } - 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.dataproc.v1.SparkHistoryServerConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkHistoryServerConfig other = - (com.google.cloud.dataproc.v1.SparkHistoryServerConfig) obj; - - if (!getDataprocCluster().equals(other.getDataprocCluster())) 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) + DATAPROC_CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getDataprocCluster().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig 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.dataproc.v1.SparkHistoryServerConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig parseFrom( - 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.dataproc.v1.SparkHistoryServerConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig 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.dataproc.v1.SparkHistoryServerConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig 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.dataproc.v1.SparkHistoryServerConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig 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.dataproc.v1.SparkHistoryServerConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Spark History Server configuration for the workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkHistoryServerConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkHistoryServerConfig) - com.google.cloud.dataproc.v1.SparkHistoryServerConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.class, - com.google.cloud.dataproc.v1.SparkHistoryServerConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkHistoryServerConfig.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(); - dataprocCluster_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.SharedProto - .internal_static_google_cloud_dataproc_v1_SparkHistoryServerConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig build() { - com.google.cloud.dataproc.v1.SparkHistoryServerConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkHistoryServerConfig buildPartial() { - com.google.cloud.dataproc.v1.SparkHistoryServerConfig result = - new com.google.cloud.dataproc.v1.SparkHistoryServerConfig(this); - result.dataprocCluster_ = dataprocCluster_; - 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.dataproc.v1.SparkHistoryServerConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkHistoryServerConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkHistoryServerConfig other) { - if (other == com.google.cloud.dataproc.v1.SparkHistoryServerConfig.getDefaultInstance()) - return this; - if (!other.getDataprocCluster().isEmpty()) { - dataprocCluster_ = other.dataprocCluster_; - 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.dataproc.v1.SparkHistoryServerConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.SparkHistoryServerConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataprocCluster_ = ""; - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-     * Server for the workload.
-     * Example:
-     * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-     * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dataprocCluster. - */ - public java.lang.String getDataprocCluster() { - java.lang.Object ref = dataprocCluster_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataprocCluster_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-     * Server for the workload.
-     * Example:
-     * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-     * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for dataprocCluster. - */ - public com.google.protobuf.ByteString getDataprocClusterBytes() { - java.lang.Object ref = dataprocCluster_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataprocCluster_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-     * Server for the workload.
-     * Example:
-     * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-     * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The dataprocCluster to set. - * @return This builder for chaining. - */ - public Builder setDataprocCluster(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataprocCluster_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-     * Server for the workload.
-     * Example:
-     * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-     * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDataprocCluster() { - - dataprocCluster_ = getDefaultInstance().getDataprocCluster(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-     * Server for the workload.
-     * Example:
-     * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-     * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for dataprocCluster to set. - * @return This builder for chaining. - */ - public Builder setDataprocClusterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataprocCluster_ = 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.dataproc.v1.SparkHistoryServerConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkHistoryServerConfig) - private static final com.google.cloud.dataproc.v1.SparkHistoryServerConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkHistoryServerConfig(); - } - - public static com.google.cloud.dataproc.v1.SparkHistoryServerConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkHistoryServerConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkHistoryServerConfig(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.dataproc.v1.SparkHistoryServerConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfigOrBuilder.java deleted file mode 100644 index 80e16401..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkHistoryServerConfigOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/shared.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkHistoryServerConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkHistoryServerConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-   * Server for the workload.
-   * Example:
-   * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-   * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The dataprocCluster. - */ - java.lang.String getDataprocCluster(); - /** - * - * - *
-   * Optional. Resource name of an existing Dataproc Cluster to act as a Spark History
-   * Server for the workload.
-   * Example:
-   * * `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
-   * 
- * - * string dataproc_cluster = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for dataprocCluster. - */ - com.google.protobuf.ByteString getDataprocClusterBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java deleted file mode 100644 index eec98138..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java +++ /dev/null @@ -1,2869 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running [Apache Spark](http://spark.apache.org/)
- * applications on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkJob} - */ -public final class SparkJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkJob) - SparkJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkJob.newBuilder() to construct. - private SparkJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkJob() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkJob( - 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(); - driverCase_ = 1; - driver_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - driverCase_ = 2; - driver_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - jarFileUris_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - fileUris_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - archiveUris_.add(s); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 66: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkJob.class, - com.google.cloud.dataproc.v1.SparkJob.Builder.class); - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public enum DriverCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MAIN_JAR_FILE_URI(1), - MAIN_CLASS(2), - DRIVER_NOT_SET(0); - private final int value; - - private DriverCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DriverCase valueOf(int value) { - return forNumber(value); - } - - public static DriverCase forNumber(int value) { - switch (value) { - case 1: - return MAIN_JAR_FILE_URI; - case 2: - return MAIN_CLASS; - case 0: - return DRIVER_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public static final int MAIN_JAR_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MAIN_CLASS_FIELD_NUMBER = 2; - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } - } - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 7; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (driverCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, driver_); - } - if (driverCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, driver_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 7); - if (loggingConfig_ != null) { - output.writeMessage(8, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (driverCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, driver_); - } - if (driverCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, driver_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().size(); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLoggingConfig()); - } - 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.dataproc.v1.SparkJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkJob other = (com.google.cloud.dataproc.v1.SparkJob) obj; - - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; - } - if (!getDriverCase().equals(other.getDriverCase())) return false; - switch (driverCase_) { - case 1: - if (!getMainJarFileUri().equals(other.getMainJarFileUri())) return false; - break; - case 2: - if (!getMainClass().equals(other.getMainClass())) return false; - break; - case 0: - default: - } - 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 (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - switch (driverCase_) { - case 1: - hash = (37 * hash) + MAIN_JAR_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainJarFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + MAIN_CLASS_FIELD_NUMBER; - hash = (53 * hash) + getMainClass().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkJob 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.dataproc.v1.SparkJob parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkJob parseFrom( - 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.dataproc.v1.SparkJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkJob 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.dataproc.v1.SparkJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkJob 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.dataproc.v1.SparkJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkJob 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.dataproc.v1.SparkJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running [Apache Spark](http://spark.apache.org/)
-   * applications on YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkJob) - com.google.cloud.dataproc.v1.SparkJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 7: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 7: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkJob.class, - com.google.cloud.dataproc.v1.SparkJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkJob.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(); - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableProperties().clear(); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - driverCase_ = 0; - driver_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob build() { - com.google.cloud.dataproc.v1.SparkJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkJob buildPartial() { - com.google.cloud.dataproc.v1.SparkJob result = - new com.google.cloud.dataproc.v1.SparkJob(this); - int from_bitField0_ = bitField0_; - if (driverCase_ == 1) { - result.driver_ = driver_; - } - if (driverCase_ == 2) { - result.driver_ = driver_; - } - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.jarFileUris_ = jarFileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.archiveUris_ = archiveUris_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.build(); - } - result.driverCase_ = driverCase_; - 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.dataproc.v1.SparkJob) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkJob other) { - if (other == com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance()) return this; - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - switch (other.getDriverCase()) { - case MAIN_JAR_FILE_URI: - { - driverCase_ = 1; - driver_ = other.driver_; - onChanged(); - break; - } - case MAIN_CLASS: - { - driverCase_ = 2; - driver_ = other.driver_; - onChanged(); - break; - } - case DRIVER_NOT_SET: - { - break; - } - } - 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.dataproc.v1.SparkJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int driverCase_ = 0; - private java.lang.Object driver_; - - public DriverCase getDriverCase() { - return DriverCase.forNumber(driverCase_); - } - - public Builder clearDriver() { - driverCase_ = 0; - driver_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - @java.lang.Override - public boolean hasMainJarFileUri() { - return driverCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - @java.lang.Override - public java.lang.String getMainJarFileUri() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 1) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainJarFileUriBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 1) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 1) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @param value The mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearMainJarFileUri() { - if (driverCase_ == 1) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the jar file that contains the main class.
-     * 
- * - * string main_jar_file_uri = 1; - * - * @param value The bytes for mainJarFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainJarFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 1; - driver_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - @java.lang.Override - public boolean hasMainClass() { - return driverCase_ == 2; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - @java.lang.Override - public java.lang.String getMainClass() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (driverCase_ == 2) { - driver_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainClassBytes() { - java.lang.Object ref = ""; - if (driverCase_ == 2) { - ref = driver_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (driverCase_ == 2) { - driver_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @param value The mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClass(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @return This builder for chaining. - */ - public Builder clearMainClass() { - if (driverCase_ == 2) { - driverCase_ = 0; - driver_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The name of the driver's main class. The jar file that contains the class
-     * must be in the default CLASSPATH or specified in `jar_file_uris`.
-     * 
- * - * string main_class = 2; - * - * @param value The bytes for mainClass to set. - * @return This builder for chaining. - */ - public Builder setMainClassBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - driverCase_ = 2; - driver_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver. Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-     * Spark driver and tasks.
-     * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000008; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure Spark.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.SparkJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkJob) - private static final com.google.cloud.dataproc.v1.SparkJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkJob(); - } - - public static com.google.cloud.dataproc.v1.SparkJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkJob(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.dataproc.v1.SparkJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJobOrBuilder.java deleted file mode 100644 index 4505f598..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJobOrBuilder.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return Whether the mainJarFileUri field is set. - */ - boolean hasMainJarFileUri(); - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The mainJarFileUri. - */ - java.lang.String getMainJarFileUri(); - /** - * - * - *
-   * The HCFS URI of the jar file that contains the main class.
-   * 
- * - * string main_jar_file_uri = 1; - * - * @return The bytes for mainJarFileUri. - */ - com.google.protobuf.ByteString getMainJarFileUriBytes(); - - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return Whether the mainClass field is set. - */ - boolean hasMainClass(); - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The mainClass. - */ - java.lang.String getMainClass(); - /** - * - * - *
-   * The name of the driver's main class. The jar file that contains the class
-   * must be in the default CLASSPATH or specified in `jar_file_uris`.
-   * 
- * - * string main_class = 2; - * - * @return The bytes for mainClass. - */ - com.google.protobuf.ByteString getMainClassBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver. Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to add to the CLASSPATHs of the
-   * Spark driver and tasks.
-   * 
- * - * repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure Spark.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.SparkJob.DriverCase getDriverCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatch.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatch.java deleted file mode 100644 index f694d617..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatch.java +++ /dev/null @@ -1,1541 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A configuration for running an
- * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
- * batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkRBatch} - */ -public final class SparkRBatch extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkRBatch) - SparkRBatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkRBatch.newBuilder() to construct. - private SparkRBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkRBatch() { - mainRFileUri_ = ""; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkRBatch(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkRBatch( - 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(); - - mainRFileUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fileUris_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - archiveUris_.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)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkRBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkRBatch.class, - com.google.cloud.dataproc.v1.SparkRBatch.Builder.class); - } - - public static final int MAIN_R_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object mainRFileUri_; - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a `.R` or `.r` file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - @java.lang.Override - public java.lang.String getMainRFileUri() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainRFileUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a `.R` or `.r` file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainRFileUriBytes() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainRFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainRFileUri_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, args_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, archiveUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainRFileUri_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().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.dataproc.v1.SparkRBatch)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkRBatch other = (com.google.cloud.dataproc.v1.SparkRBatch) obj; - - if (!getMainRFileUri().equals(other.getMainRFileUri())) return false; - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) 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) + MAIN_R_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainRFileUri().hashCode(); - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkRBatch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch 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.dataproc.v1.SparkRBatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch parseFrom( - 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.dataproc.v1.SparkRBatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch 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.dataproc.v1.SparkRBatch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch 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.dataproc.v1.SparkRBatch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch 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.dataproc.v1.SparkRBatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A configuration for running an
-   * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
-   * batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkRBatch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkRBatch) - com.google.cloud.dataproc.v1.SparkRBatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkRBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkRBatch.class, - com.google.cloud.dataproc.v1.SparkRBatch.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkRBatch.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(); - mainRFileUri_ = ""; - - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkRBatch_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatch getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatch build() { - com.google.cloud.dataproc.v1.SparkRBatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRBatch buildPartial() { - com.google.cloud.dataproc.v1.SparkRBatch result = - new com.google.cloud.dataproc.v1.SparkRBatch(this); - int from_bitField0_ = bitField0_; - result.mainRFileUri_ = mainRFileUri_; - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.archiveUris_ = archiveUris_; - 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.dataproc.v1.SparkRBatch) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkRBatch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkRBatch other) { - if (other == com.google.cloud.dataproc.v1.SparkRBatch.getDefaultInstance()) return this; - if (!other.getMainRFileUri().isEmpty()) { - mainRFileUri_ = other.mainRFileUri_; - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - 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.dataproc.v1.SparkRBatch parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkRBatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object mainRFileUri_ = ""; - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a `.R` or `.r` file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - public java.lang.String getMainRFileUri() { - java.lang.Object ref = mainRFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainRFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a `.R` or `.r` file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - public com.google.protobuf.ByteString getMainRFileUriBytes() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainRFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a `.R` or `.r` file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mainRFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainRFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mainRFileUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a `.R` or `.r` file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMainRFileUri() { - - mainRFileUri_ = getDefaultInstance().getMainRFileUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a `.R` or `.r` file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mainRFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainRFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mainRFileUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the Spark driver. Do not include arguments
-     * that can be set as batch properties, such as `--conf`, since a collision
-     * can occur that causes an incorrect batch submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.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.dataproc.v1.SparkRBatch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkRBatch) - private static final com.google.cloud.dataproc.v1.SparkRBatch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkRBatch(); - } - - public static com.google.cloud.dataproc.v1.SparkRBatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkRBatch parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkRBatch(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.dataproc.v1.SparkRBatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatchOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatchOrBuilder.java deleted file mode 100644 index 1083a669..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRBatchOrBuilder.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkRBatchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkRBatch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a `.R` or `.r` file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - java.lang.String getMainRFileUri(); - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a `.R` or `.r` file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - com.google.protobuf.ByteString getMainRFileUriBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the Spark driver. Do not include arguments
-   * that can be set as batch properties, such as `--conf`, since a collision
-   * can occur that causes an incorrect batch submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJob.java deleted file mode 100644 index 069616e6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJob.java +++ /dev/null @@ -1,2213 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running
- * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
- * applications on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkRJob} - */ -public final class SparkRJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkRJob) - SparkRJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkRJob.newBuilder() to construct. - private SparkRJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkRJob() { - mainRFileUri_ = ""; - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkRJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkRJob( - 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(); - - mainRFileUri_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - args_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fileUris_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - archiveUris_.add(s); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 50: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = 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_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkRJob.class, - com.google.cloud.dataproc.v1.SparkRJob.Builder.class); - } - - public static final int MAIN_R_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object mainRFileUri_; - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a .R file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - @java.lang.Override - public java.lang.String getMainRFileUri() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainRFileUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a .R file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMainRFileUriBytes() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainRFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ARGS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList args_; - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_; - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - - public static final int FILE_URIS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList fileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - - public static final int ARCHIVE_URIS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList archiveUris_; - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - - public static final int PROPERTIES_FIELD_NUMBER = 5; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 6; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainRFileUri_); - } - for (int i = 0; i < args_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, args_.getRaw(i)); - } - for (int i = 0; i < fileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fileUris_.getRaw(i)); - } - for (int i = 0; i < archiveUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, archiveUris_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 5); - if (loggingConfig_ != null) { - output.writeMessage(6, getLoggingConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainRFileUri_); - } - { - int dataSize = 0; - for (int i = 0; i < args_.size(); i++) { - dataSize += computeStringSizeNoTag(args_.getRaw(i)); - } - size += dataSize; - size += 1 * getArgsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < fileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getFileUrisList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < archiveUris_.size(); i++) { - dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getArchiveUrisList().size(); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLoggingConfig()); - } - 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.dataproc.v1.SparkRJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkRJob other = (com.google.cloud.dataproc.v1.SparkRJob) obj; - - if (!getMainRFileUri().equals(other.getMainRFileUri())) return false; - if (!getArgsList().equals(other.getArgsList())) return false; - if (!getFileUrisList().equals(other.getFileUrisList())) return false; - if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) 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) + MAIN_R_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getMainRFileUri().hashCode(); - if (getArgsCount() > 0) { - hash = (37 * hash) + ARGS_FIELD_NUMBER; - hash = (53 * hash) + getArgsList().hashCode(); - } - if (getFileUrisCount() > 0) { - hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getFileUrisList().hashCode(); - } - if (getArchiveUrisCount() > 0) { - hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getArchiveUrisList().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkRJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRJob 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.dataproc.v1.SparkRJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( - 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.dataproc.v1.SparkRJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkRJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRJob 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.dataproc.v1.SparkRJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRJob 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.dataproc.v1.SparkRJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkRJob 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.dataproc.v1.SparkRJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running
-   * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
-   * applications on YARN.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkRJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkRJob) - com.google.cloud.dataproc.v1.SparkRJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 5: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkRJob.class, - com.google.cloud.dataproc.v1.SparkRJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkRJob.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(); - mainRFileUri_ = ""; - - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableProperties().clear(); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob build() { - com.google.cloud.dataproc.v1.SparkRJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkRJob buildPartial() { - com.google.cloud.dataproc.v1.SparkRJob result = - new com.google.cloud.dataproc.v1.SparkRJob(this); - int from_bitField0_ = bitField0_; - result.mainRFileUri_ = mainRFileUri_; - if (((bitField0_ & 0x00000001) != 0)) { - args_ = args_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.args_ = args_; - if (((bitField0_ & 0x00000002) != 0)) { - fileUris_ = fileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.fileUris_ = fileUris_; - if (((bitField0_ & 0x00000004) != 0)) { - archiveUris_ = archiveUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.archiveUris_ = archiveUris_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.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.dataproc.v1.SparkRJob) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkRJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkRJob other) { - if (other == com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance()) return this; - if (!other.getMainRFileUri().isEmpty()) { - mainRFileUri_ = other.mainRFileUri_; - onChanged(); - } - if (!other.args_.isEmpty()) { - if (args_.isEmpty()) { - args_ = other.args_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureArgsIsMutable(); - args_.addAll(other.args_); - } - onChanged(); - } - if (!other.fileUris_.isEmpty()) { - if (fileUris_.isEmpty()) { - fileUris_ = other.fileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureFileUrisIsMutable(); - fileUris_.addAll(other.fileUris_); - } - onChanged(); - } - if (!other.archiveUris_.isEmpty()) { - if (archiveUris_.isEmpty()) { - archiveUris_ = other.archiveUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureArchiveUrisIsMutable(); - archiveUris_.addAll(other.archiveUris_); - } - onChanged(); - } - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - 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.dataproc.v1.SparkRJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkRJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object mainRFileUri_ = ""; - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a .R file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - public java.lang.String getMainRFileUri() { - java.lang.Object ref = mainRFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mainRFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a .R file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - public com.google.protobuf.ByteString getMainRFileUriBytes() { - java.lang.Object ref = mainRFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mainRFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a .R file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The mainRFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainRFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mainRFileUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a .R file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearMainRFileUri() { - - mainRFileUri_ = getDefaultInstance().getMainRFileUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the main R file to use as the driver.
-     * Must be a .R file.
-     * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for mainRFileUri to set. - * @return This builder for chaining. - */ - public Builder setMainRFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mainRFileUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList args_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArgsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - args_ = new com.google.protobuf.LazyStringArrayList(args_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - public com.google.protobuf.ProtocolStringList getArgsList() { - return args_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - public int getArgsCount() { - return args_.size(); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - public java.lang.String getArgs(int index) { - return args_.get(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - public com.google.protobuf.ByteString getArgsBytes(int index) { - return args_.getByteString(index); - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The args to set. - * @return This builder for chaining. - */ - public Builder setArgs(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The args to add. - * @return This builder for chaining. - */ - public Builder addArgs(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The args to add. - * @return This builder for chaining. - */ - public Builder addAllArgs(java.lang.Iterable values) { - ensureArgsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArgs() { - args_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The arguments to pass to the driver.  Do not include arguments,
-     * such as `--conf`, that can be set as job properties, since a collision may
-     * occur that causes an incorrect job submission.
-     * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the args to add. - * @return This builder for chaining. - */ - public Builder addArgsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArgsIsMutable(); - args_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList fileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - public com.google.protobuf.ProtocolStringList getFileUrisList() { - return fileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - public int getFileUrisCount() { - return fileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - public java.lang.String getFileUris(int index) { - return fileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - public com.google.protobuf.ByteString getFileUrisBytes(int index) { - return fileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The fileUris to set. - * @return This builder for chaining. - */ - public Builder setFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The fileUris to add. - * @return This builder for chaining. - */ - public Builder addAllFileUris(java.lang.Iterable values) { - ensureFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearFileUris() { - fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be placed in the working directory of
-     * each executor. Useful for naively parallel tasks.
-     * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the fileUris to add. - * @return This builder for chaining. - */ - public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFileUrisIsMutable(); - fileUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList archiveUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureArchiveUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - public com.google.protobuf.ProtocolStringList getArchiveUrisList() { - return archiveUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - public int getArchiveUrisCount() { - return archiveUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - public java.lang.String getArchiveUris(int index) { - return archiveUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { - return archiveUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The archiveUris to set. - * @return This builder for chaining. - */ - public Builder setArchiveUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The archiveUris to add. - * @return This builder for chaining. - */ - public Builder addAllArchiveUris(java.lang.Iterable values) { - ensureArchiveUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearArchiveUris() { - archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted into the working directory
-     * of each executor. Supported file types:
-     * .jar, .tar, .tar.gz, .tgz, and .zip.
-     * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the archiveUris to add. - * @return This builder for chaining. - */ - public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureArchiveUrisIsMutable(); - archiveUris_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure SparkR.
-     * Properties that conflict with values set by the Dataproc API may be
-     * overwritten. Can include properties set in
-     * /etc/spark/conf/spark-defaults.conf and classes in user code.
-     * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.SparkRJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkRJob) - private static final com.google.cloud.dataproc.v1.SparkRJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkRJob(); - } - - public static com.google.cloud.dataproc.v1.SparkRJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkRJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkRJob(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.dataproc.v1.SparkRJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJobOrBuilder.java deleted file mode 100644 index 583317e7..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJobOrBuilder.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkRJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkRJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a .R file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The mainRFileUri. - */ - java.lang.String getMainRFileUri(); - /** - * - * - *
-   * Required. The HCFS URI of the main R file to use as the driver.
-   * Must be a .R file.
-   * 
- * - * string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for mainRFileUri. - */ - com.google.protobuf.ByteString getMainRFileUriBytes(); - - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the args. - */ - java.util.List getArgsList(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of args. - */ - int getArgsCount(); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The args at the given index. - */ - java.lang.String getArgs(int index); - /** - * - * - *
-   * Optional. The arguments to pass to the driver.  Do not include arguments,
-   * such as `--conf`, that can be set as job properties, since a collision may
-   * occur that causes an incorrect job submission.
-   * 
- * - * repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the args at the given index. - */ - com.google.protobuf.ByteString getArgsBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the fileUris. - */ - java.util.List getFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of fileUris. - */ - int getFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The fileUris at the given index. - */ - java.lang.String getFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of files to be placed in the working directory of
-   * each executor. Useful for naively parallel tasks.
-   * 
- * - * repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the fileUris at the given index. - */ - com.google.protobuf.ByteString getFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the archiveUris. - */ - java.util.List getArchiveUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of archiveUris. - */ - int getArchiveUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The archiveUris at the given index. - */ - java.lang.String getArchiveUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of archives to be extracted into the working directory
-   * of each executor. Supported file types:
-   * .jar, .tar, .tar.gz, .tgz, and .zip.
-   * 
- * - * repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the archiveUris at the given index. - */ - com.google.protobuf.ByteString getArchiveUrisBytes(int index); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure SparkR.
-   * Properties that conflict with values set by the Dataproc API may be
-   * overwritten. Can include properties set in
-   * /etc/spark/conf/spark-defaults.conf and classes in user code.
-   * 
- * - * map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatch.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatch.java deleted file mode 100644 index 170cbce5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatch.java +++ /dev/null @@ -1,1275 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A configuration for running
- * [Apache Spark SQL](http://spark.apache.org/sql/) queries as a batch workload.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlBatch} - */ -public final class SparkSqlBatch extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkSqlBatch) - SparkSqlBatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkSqlBatch.newBuilder() to construct. - private SparkSqlBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkSqlBatch() { - queryFileUri_ = ""; - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkSqlBatch(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkSqlBatch( - 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(); - - queryFileUri_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryVariables_ = - com.google.protobuf.MapField.newMapField( - QueryVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry queryVariables__ = - input.readMessage( - QueryVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - queryVariables_ - .getMutableMap() - .put(queryVariables__.getKey(), queryVariables__.getValue()); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - jarFileUris_.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_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetQueryVariables(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkSqlBatch.class, - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder.class); - } - - public static final int QUERY_FILE_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object queryFileUri_; - /** - * - * - *
-   * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-   * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The queryFileUri. - */ - @java.lang.Override - public java.lang.String getQueryFileUri() { - java.lang.Object ref = queryFileUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - queryFileUri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-   * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for queryFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = queryFileUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_VARIABLES_FIELD_NUMBER = 2; - - private static final class QueryVariablesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_QueryVariablesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField queryVariables_; - - private com.google.protobuf.MapField - internalGetQueryVariables() { - if (queryVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - QueryVariablesDefaultEntryHolder.defaultEntry); - } - return queryVariables_; - } - - public int getQueryVariablesCount() { - return internalGetQueryVariables().getMap().size(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsQueryVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetQueryVariables().getMap().containsKey(key); - } - /** Use {@link #getQueryVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getQueryVariables() { - return getQueryVariablesMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getQueryVariablesMap() { - return internalGetQueryVariables().getMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getQueryVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetQueryVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getQueryVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetQueryVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryFileUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryFileUri_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetQueryVariables(), QueryVariablesDefaultEntryHolder.defaultEntry, 2); - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jarFileUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryFileUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryFileUri_); - } - for (java.util.Map.Entry entry : - internalGetQueryVariables().getMap().entrySet()) { - com.google.protobuf.MapEntry queryVariables__ = - QueryVariablesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, queryVariables__); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getJarFileUrisList().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.dataproc.v1.SparkSqlBatch)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkSqlBatch other = - (com.google.cloud.dataproc.v1.SparkSqlBatch) obj; - - if (!getQueryFileUri().equals(other.getQueryFileUri())) return false; - if (!internalGetQueryVariables().equals(other.internalGetQueryVariables())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) 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) + QUERY_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getQueryFileUri().hashCode(); - if (!internalGetQueryVariables().getMap().isEmpty()) { - hash = (37 * hash) + QUERY_VARIABLES_FIELD_NUMBER; - hash = (53 * hash) + internalGetQueryVariables().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch 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.dataproc.v1.SparkSqlBatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch parseFrom( - 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.dataproc.v1.SparkSqlBatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch 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.dataproc.v1.SparkSqlBatch parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch 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.dataproc.v1.SparkSqlBatch parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch 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.dataproc.v1.SparkSqlBatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A configuration for running
-   * [Apache Spark SQL](http://spark.apache.org/sql/) queries as a batch workload.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlBatch} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkSqlBatch) - com.google.cloud.dataproc.v1.SparkSqlBatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetQueryVariables(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableQueryVariables(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkSqlBatch.class, - com.google.cloud.dataproc.v1.SparkSqlBatch.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkSqlBatch.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(); - queryFileUri_ = ""; - - internalGetMutableQueryVariables().clear(); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.BatchesProto - .internal_static_google_cloud_dataproc_v1_SparkSqlBatch_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatch getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatch build() { - com.google.cloud.dataproc.v1.SparkSqlBatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlBatch buildPartial() { - com.google.cloud.dataproc.v1.SparkSqlBatch result = - new com.google.cloud.dataproc.v1.SparkSqlBatch(this); - int from_bitField0_ = bitField0_; - result.queryFileUri_ = queryFileUri_; - result.queryVariables_ = internalGetQueryVariables(); - result.queryVariables_.makeImmutable(); - if (((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.jarFileUris_ = jarFileUris_; - 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.dataproc.v1.SparkSqlBatch) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkSqlBatch) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkSqlBatch other) { - if (other == com.google.cloud.dataproc.v1.SparkSqlBatch.getDefaultInstance()) return this; - if (!other.getQueryFileUri().isEmpty()) { - queryFileUri_ = other.queryFileUri_; - onChanged(); - } - internalGetMutableQueryVariables().mergeFrom(other.internalGetQueryVariables()); - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - 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.dataproc.v1.SparkSqlBatch parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkSqlBatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object queryFileUri_ = ""; - /** - * - * - *
-     * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-     * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The queryFileUri. - */ - public java.lang.String getQueryFileUri() { - java.lang.Object ref = queryFileUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - queryFileUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-     * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for queryFileUri. - */ - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = queryFileUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryFileUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-     * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - queryFileUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-     * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearQueryFileUri() { - - queryFileUri_ = getDefaultInstance().getQueryFileUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-     * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - queryFileUri_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField queryVariables_; - - private com.google.protobuf.MapField - internalGetQueryVariables() { - if (queryVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - QueryVariablesDefaultEntryHolder.defaultEntry); - } - return queryVariables_; - } - - private com.google.protobuf.MapField - internalGetMutableQueryVariables() { - onChanged(); - ; - if (queryVariables_ == null) { - queryVariables_ = - com.google.protobuf.MapField.newMapField(QueryVariablesDefaultEntryHolder.defaultEntry); - } - if (!queryVariables_.isMutable()) { - queryVariables_ = queryVariables_.copy(); - } - return queryVariables_; - } - - public int getQueryVariablesCount() { - return internalGetQueryVariables().getMap().size(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsQueryVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetQueryVariables().getMap().containsKey(key); - } - /** Use {@link #getQueryVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getQueryVariables() { - return getQueryVariablesMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getQueryVariablesMap() { - return internalGetQueryVariables().getMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getQueryVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetQueryVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getQueryVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetQueryVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearQueryVariables() { - internalGetMutableQueryVariables().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeQueryVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableQueryVariables().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableQueryVariables() { - return internalGetMutableQueryVariables().getMutableMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putQueryVariables(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableQueryVariables().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: `SET name="value";`).
-     * 
- * - * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllQueryVariables(java.util.Map values) { - internalGetMutableQueryVariables().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.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.dataproc.v1.SparkSqlBatch) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkSqlBatch) - private static final com.google.cloud.dataproc.v1.SparkSqlBatch DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkSqlBatch(); - } - - public static com.google.cloud.dataproc.v1.SparkSqlBatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkSqlBatch parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkSqlBatch(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.dataproc.v1.SparkSqlBatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatchOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatchOrBuilder.java deleted file mode 100644 index ed8a233c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlBatchOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/batches.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkSqlBatchOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkSqlBatch) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-   * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The queryFileUri. - */ - java.lang.String getQueryFileUri(); - /** - * - * - *
-   * Required. The HCFS URI of the script that contains Spark SQL queries to execute.
-   * 
- * - * string query_file_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for queryFileUri. - */ - com.google.protobuf.ByteString getQueryFileUriBytes(); - - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getQueryVariablesCount(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsQueryVariables(java.lang.String key); - /** Use {@link #getQueryVariablesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getQueryVariables(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getQueryVariablesMap(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getQueryVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: `SET name="value";`).
-   * 
- * - * map<string, string> query_variables = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getQueryVariablesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java deleted file mode 100644 index 1a337c17..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java +++ /dev/null @@ -1,2347 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc job for running [Apache Spark
- * SQL](http://spark.apache.org/sql/) queries.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlJob} - */ -public final class SparkSqlJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkSqlJob) - SparkSqlJobOrBuilder { - private static final long serialVersionUID = 0L; - // Use SparkSqlJob.newBuilder() to construct. - private SparkSqlJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SparkSqlJob() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SparkSqlJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SparkSqlJob( - 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(); - queriesCase_ = 1; - queries_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.QueryList) queries_); - queries_ = subBuilder.buildPartial(); - } - queriesCase_ = 2; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry scriptVariables__ = - input.readMessage( - ScriptVariablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - scriptVariables_ - .getMutableMap() - .put(scriptVariables__.getKey(), scriptVariables__.getValue()); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = - com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry properties__ = - input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - properties_.getMutableMap().put(properties__.getKey(), properties__.getValue()); - break; - } - case 50: - { - com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loggingConfig_); - loggingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 450: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - jarFileUris_.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_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetScriptVariables(); - case 4: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkSqlJob.class, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder.class); - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public enum QueriesCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - QUERY_FILE_URI(1), - QUERY_LIST(2), - QUERIES_NOT_SET(0); - private final int value; - - private QueriesCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueriesCase valueOf(int value) { - return forNumber(value); - } - - public static QueriesCase forNumber(int value) { - switch (value) { - case 1: - return QUERY_FILE_URI; - case 2: - return QUERY_LIST; - case 0: - return QUERIES_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public static final int QUERY_FILE_URI_FIELD_NUMBER = 1; - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } - } - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_LIST_FIELD_NUMBER = 2; - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - - public static final int SCRIPT_VARIABLES_FIELD_NUMBER = 3; - - private static final class ScriptVariablesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_ScriptVariablesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PROPERTIES_FIELD_NUMBER = 4; - - private static final class PropertiesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_PropertiesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int JAR_FILE_URIS_FIELD_NUMBER = 56; - private com.google.protobuf.LazyStringList jarFileUris_; - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_; - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - - public static final int LOGGING_CONFIG_FIELD_NUMBER = 6; - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - @java.lang.Override - public boolean hasLoggingConfig() { - return loggingConfig_ != null; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - return getLoggingConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (queriesCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queries_); - } - if (queriesCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetScriptVariables(), ScriptVariablesDefaultEntryHolder.defaultEntry, 3); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 4); - if (loggingConfig_ != null) { - output.writeMessage(6, getLoggingConfig()); - } - for (int i = 0; i < jarFileUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 56, jarFileUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (queriesCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queries_); - } - if (queriesCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.QueryList) queries_); - } - for (java.util.Map.Entry entry : - internalGetScriptVariables().getMap().entrySet()) { - com.google.protobuf.MapEntry scriptVariables__ = - ScriptVariablesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, scriptVariables__); - } - for (java.util.Map.Entry entry : - internalGetProperties().getMap().entrySet()) { - com.google.protobuf.MapEntry properties__ = - PropertiesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, properties__); - } - if (loggingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLoggingConfig()); - } - { - int dataSize = 0; - for (int i = 0; i < jarFileUris_.size(); i++) { - dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); - } - size += dataSize; - size += 2 * getJarFileUrisList().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.dataproc.v1.SparkSqlJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SparkSqlJob other = (com.google.cloud.dataproc.v1.SparkSqlJob) obj; - - if (!internalGetScriptVariables().equals(other.internalGetScriptVariables())) return false; - if (!internalGetProperties().equals(other.internalGetProperties())) return false; - if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; - if (hasLoggingConfig() != other.hasLoggingConfig()) return false; - if (hasLoggingConfig()) { - if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; - } - if (!getQueriesCase().equals(other.getQueriesCase())) return false; - switch (queriesCase_) { - case 1: - if (!getQueryFileUri().equals(other.getQueryFileUri())) return false; - break; - case 2: - if (!getQueryList().equals(other.getQueryList())) return false; - break; - case 0: - default: - } - 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 (!internalGetScriptVariables().getMap().isEmpty()) { - hash = (37 * hash) + SCRIPT_VARIABLES_FIELD_NUMBER; - hash = (53 * hash) + internalGetScriptVariables().hashCode(); - } - if (!internalGetProperties().getMap().isEmpty()) { - hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; - hash = (53 * hash) + internalGetProperties().hashCode(); - } - if (getJarFileUrisCount() > 0) { - hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; - hash = (53 * hash) + getJarFileUrisList().hashCode(); - } - if (hasLoggingConfig()) { - hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLoggingConfig().hashCode(); - } - switch (queriesCase_) { - case 1: - hash = (37 * hash) + QUERY_FILE_URI_FIELD_NUMBER; - hash = (53 * hash) + getQueryFileUri().hashCode(); - break; - case 2: - hash = (37 * hash) + QUERY_LIST_FIELD_NUMBER; - hash = (53 * hash) + getQueryList().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob 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.dataproc.v1.SparkSqlJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob parseFrom( - 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.dataproc.v1.SparkSqlJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob 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.dataproc.v1.SparkSqlJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob 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.dataproc.v1.SparkSqlJob parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob 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.dataproc.v1.SparkSqlJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc job for running [Apache Spark
-   * SQL](http://spark.apache.org/sql/) queries.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SparkSqlJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkSqlJob) - com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetScriptVariables(); - case 4: - return internalGetProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableScriptVariables(); - case 4: - return internalGetMutableProperties(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SparkSqlJob.class, - com.google.cloud.dataproc.v1.SparkSqlJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SparkSqlJob.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(); - internalGetMutableScriptVariables().clear(); - internalGetMutableProperties().clear(); - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - queriesCase_ = 0; - queries_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SparkSqlJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob build() { - com.google.cloud.dataproc.v1.SparkSqlJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SparkSqlJob buildPartial() { - com.google.cloud.dataproc.v1.SparkSqlJob result = - new com.google.cloud.dataproc.v1.SparkSqlJob(this); - int from_bitField0_ = bitField0_; - if (queriesCase_ == 1) { - result.queries_ = queries_; - } - if (queriesCase_ == 2) { - if (queryListBuilder_ == null) { - result.queries_ = queries_; - } else { - result.queries_ = queryListBuilder_.build(); - } - } - result.scriptVariables_ = internalGetScriptVariables(); - result.scriptVariables_.makeImmutable(); - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = jarFileUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.jarFileUris_ = jarFileUris_; - if (loggingConfigBuilder_ == null) { - result.loggingConfig_ = loggingConfig_; - } else { - result.loggingConfig_ = loggingConfigBuilder_.build(); - } - result.queriesCase_ = queriesCase_; - 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.dataproc.v1.SparkSqlJob) { - return mergeFrom((com.google.cloud.dataproc.v1.SparkSqlJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkSqlJob other) { - if (other == com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance()) return this; - internalGetMutableScriptVariables().mergeFrom(other.internalGetScriptVariables()); - internalGetMutableProperties().mergeFrom(other.internalGetProperties()); - if (!other.jarFileUris_.isEmpty()) { - if (jarFileUris_.isEmpty()) { - jarFileUris_ = other.jarFileUris_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureJarFileUrisIsMutable(); - jarFileUris_.addAll(other.jarFileUris_); - } - onChanged(); - } - if (other.hasLoggingConfig()) { - mergeLoggingConfig(other.getLoggingConfig()); - } - switch (other.getQueriesCase()) { - case QUERY_FILE_URI: - { - queriesCase_ = 1; - queries_ = other.queries_; - onChanged(); - break; - } - case QUERY_LIST: - { - mergeQueryList(other.getQueryList()); - break; - } - case QUERIES_NOT_SET: - { - break; - } - } - 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.dataproc.v1.SparkSqlJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SparkSqlJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int queriesCase_ = 0; - private java.lang.Object queries_; - - public QueriesCase getQueriesCase() { - return QueriesCase.forNumber(queriesCase_); - } - - public Builder clearQueries() { - queriesCase_ = 0; - queries_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - @java.lang.Override - public boolean hasQueryFileUri() { - return queriesCase_ == 1; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - @java.lang.Override - public java.lang.String getQueryFileUri() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queriesCase_ == 1) { - queries_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryFileUriBytes() { - java.lang.Object ref = ""; - if (queriesCase_ == 1) { - ref = queries_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (queriesCase_ == 1) { - queries_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearQueryFileUri() { - if (queriesCase_ == 1) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * The HCFS URI of the script that contains SQL queries.
-     * 
- * - * string query_file_uri = 1; - * - * @param value The bytes for queryFileUri to set. - * @return This builder for chaining. - */ - public Builder setQueryFileUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queriesCase_ = 1; - queries_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - @java.lang.Override - public boolean hasQueryList() { - return queriesCase_ == 2; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queries_ = value; - onChanged(); - } else { - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1.QueryList.Builder builderForValue) { - if (queryListBuilder_ == null) { - queries_ = builderForValue.build(); - onChanged(); - } else { - queryListBuilder_.setMessage(builderForValue.build()); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1.QueryList.newBuilder( - (com.google.cloud.dataproc.v1.QueryList) queries_) - .mergeFrom(value) - .buildPartial(); - } else { - queries_ = value; - } - onChanged(); - } else { - if (queriesCase_ == 2) { - queryListBuilder_.mergeFrom(value); - } - queryListBuilder_.setMessage(value); - } - queriesCase_ = 2; - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public Builder clearQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - onChanged(); - } - } else { - if (queriesCase_ == 2) { - queriesCase_ = 0; - queries_ = null; - } - queryListBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1.QueryList) queries_; - } - return com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.QueryList, - com.google.cloud.dataproc.v1.QueryList.Builder, - com.google.cloud.dataproc.v1.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1.QueryList) queries_, - getParentForChildren(), - isClean()); - queries_ = null; - } - queriesCase_ = 2; - onChanged(); - ; - return queryListBuilder_; - } - - private com.google.protobuf.MapField scriptVariables_; - - private com.google.protobuf.MapField - internalGetScriptVariables() { - if (scriptVariables_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - return scriptVariables_; - } - - private com.google.protobuf.MapField - internalGetMutableScriptVariables() { - onChanged(); - ; - if (scriptVariables_ == null) { - scriptVariables_ = - com.google.protobuf.MapField.newMapField( - ScriptVariablesDefaultEntryHolder.defaultEntry); - } - if (!scriptVariables_.isMutable()) { - scriptVariables_ = scriptVariables_.copy(); - } - return scriptVariables_; - } - - public int getScriptVariablesCount() { - return internalGetScriptVariables().getMap().size(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetScriptVariables().getMap().containsKey(key); - } - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getScriptVariables() { - return getScriptVariablesMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getScriptVariablesMap() { - return internalGetScriptVariables().getMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getScriptVariablesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetScriptVariables().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearScriptVariables() { - internalGetMutableScriptVariables().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeScriptVariables(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableScriptVariables() { - return internalGetMutableScriptVariables().getMutableMap(); - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putScriptVariables(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableScriptVariables().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Mapping of query variable names to values (equivalent to the
-     * Spark SQL command: SET `name="value";`).
-     * 
- * - * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllScriptVariables(java.util.Map values) { - internalGetMutableScriptVariables().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField properties_; - - private com.google.protobuf.MapField - internalGetProperties() { - if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); - } - return properties_; - } - - private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged(); - ; - if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); - } - return properties_; - } - - public int getPropertiesCount() { - return internalGetProperties().getMap().size(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetProperties().getMap().containsKey(key); - } - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getProperties() { - return getPropertiesMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getPropertiesOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetProperties().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearProperties() { - internalGetMutableProperties().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeProperties(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableProperties() { - return internalGetMutableProperties().getMutableMap(); - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putProperties(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableProperties().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. A mapping of property names to values, used to configure
-     * Spark SQL's SparkConf. Properties that conflict with values set by the
-     * Dataproc API may be overwritten.
-     * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllProperties(java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList jarFileUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureJarFileUrisIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); - bitField0_ |= 0x00000004; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - public com.google.protobuf.ProtocolStringList getJarFileUrisList() { - return jarFileUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - public int getJarFileUrisCount() { - return jarFileUris_.size(); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - public java.lang.String getJarFileUris(int index) { - return jarFileUris_.get(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { - return jarFileUris_.getByteString(index); - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The jarFileUris to set. - * @return This builder for chaining. - */ - public Builder setJarFileUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addAllJarFileUris(java.lang.Iterable values) { - ensureJarFileUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearJarFileUris() { - jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-     * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the jarFileUris to add. - * @return This builder for chaining. - */ - public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureJarFileUrisIsMutable(); - jarFileUris_.add(value); - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - public boolean hasLoggingConfig() { - return loggingConfigBuilder_ != null || loggingConfig_ != null; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - loggingConfig_ = value; - onChanged(); - } else { - loggingConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = builderForValue.build(); - onChanged(); - } else { - loggingConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - loggingConfig_ = value; - } - onChanged(); - } else { - loggingConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLoggingConfig() { - if (loggingConfigBuilder_ == null) { - loggingConfig_ = null; - onChanged(); - } else { - loggingConfig_ = null; - loggingConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.LoggingConfig, - com.google.cloud.dataproc.v1.LoggingConfig.Builder, - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( - getLoggingConfig(), getParentForChildren(), isClean()); - loggingConfig_ = null; - } - return loggingConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.SparkSqlJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkSqlJob) - private static final com.google.cloud.dataproc.v1.SparkSqlJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkSqlJob(); - } - - public static com.google.cloud.dataproc.v1.SparkSqlJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SparkSqlJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SparkSqlJob(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.dataproc.v1.SparkSqlJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJobOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJobOrBuilder.java deleted file mode 100644 index 3ba69d14..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJobOrBuilder.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface SparkSqlJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SparkSqlJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return Whether the queryFileUri field is set. - */ - boolean hasQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The queryFileUri. - */ - java.lang.String getQueryFileUri(); - /** - * - * - *
-   * The HCFS URI of the script that contains SQL queries.
-   * 
- * - * string query_file_uri = 1; - * - * @return The bytes for queryFileUri. - */ - com.google.protobuf.ByteString getQueryFileUriBytes(); - - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1.QueryListOrBuilder getQueryListOrBuilder(); - - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getScriptVariablesCount(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsScriptVariables(java.lang.String key); - /** Use {@link #getScriptVariablesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getScriptVariables(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getScriptVariablesMap(); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. Mapping of query variable names to values (equivalent to the
-   * Spark SQL command: SET `name="value";`).
-   * 
- * - * map<string, string> script_variables = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getScriptVariablesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPropertiesCount(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsProperties(java.lang.String key); - /** Use {@link #getPropertiesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getProperties(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getPropertiesMap(); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A mapping of property names to values, used to configure
-   * Spark SQL's SparkConf. Properties that conflict with values set by the
-   * Dataproc API may be overwritten.
-   * 
- * - * map<string, string> properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getPropertiesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the jarFileUris. - */ - java.util.List getJarFileUrisList(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of jarFileUris. - */ - int getJarFileUrisCount(); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The jarFileUris at the given index. - */ - java.lang.String getJarFileUris(int index); - /** - * - * - *
-   * Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.
-   * 
- * - * repeated string jar_file_uris = 56 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the jarFileUris at the given index. - */ - com.google.protobuf.ByteString getJarFileUrisBytes(int index); - - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the loggingConfig field is set. - */ - boolean hasLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.SparkSqlJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java deleted file mode 100644 index a3f346c9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java +++ /dev/null @@ -1,1428 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to start a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.StartClusterRequest} - */ -public final class StartClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.StartClusterRequest) - StartClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use StartClusterRequest.newBuilder() to construct. - private StartClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StartClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - clusterUuid_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StartClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StartClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StartClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.StartClusterRequest.class, - com.google.cloud.dataproc.v1.StartClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 2; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 4; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); - } - 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.dataproc.v1.StartClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.StartClusterRequest other = - (com.google.cloud.dataproc.v1.StartClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (!getRequestId().equals(other.getRequestId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest 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.dataproc.v1.StartClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest parseFrom( - 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.dataproc.v1.StartClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest 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.dataproc.v1.StartClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest 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.dataproc.v1.StartClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest 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.dataproc.v1.StartClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to start a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.StartClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.StartClusterRequest) - com.google.cloud.dataproc.v1.StartClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StartClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.StartClusterRequest.class, - com.google.cloud.dataproc.v1.StartClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.StartClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - clusterUuid_ = ""; - - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StartClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StartClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.StartClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StartClusterRequest build() { - com.google.cloud.dataproc.v1.StartClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StartClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.StartClusterRequest result = - new com.google.cloud.dataproc.v1.StartClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - result.requestId_ = requestId_; - 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.dataproc.v1.StartClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.StartClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.StartClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.StartClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.StartClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.StartClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.StartClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.StartClusterRequest) - private static final com.google.cloud.dataproc.v1.StartClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.StartClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.StartClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StartClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StartClusterRequest(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.dataproc.v1.StartClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java deleted file mode 100644 index 9a483467..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface StartClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.StartClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java deleted file mode 100644 index 8edd0a3a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java +++ /dev/null @@ -1,1428 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to stop a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.StopClusterRequest} - */ -public final class StopClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.StopClusterRequest) - StopClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use StopClusterRequest.newBuilder() to construct. - private StopClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StopClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - clusterUuid_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StopClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StopClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StopClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.StopClusterRequest.class, - com.google.cloud.dataproc.v1.StopClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 2; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 4; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterUuid_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); - } - 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.dataproc.v1.StopClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.StopClusterRequest other = - (com.google.cloud.dataproc.v1.StopClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (!getRequestId().equals(other.getRequestId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest 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.dataproc.v1.StopClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest parseFrom( - 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.dataproc.v1.StopClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest 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.dataproc.v1.StopClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest 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.dataproc.v1.StopClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest 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.dataproc.v1.StopClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to stop a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.StopClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.StopClusterRequest) - com.google.cloud.dataproc.v1.StopClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StopClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.StopClusterRequest.class, - com.google.cloud.dataproc.v1.StopClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.StopClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - clusterUuid_ = ""; - - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_StopClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StopClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.StopClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StopClusterRequest build() { - com.google.cloud.dataproc.v1.StopClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.StopClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.StopClusterRequest result = - new com.google.cloud.dataproc.v1.StopClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - result.requestId_ = requestId_; - 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.dataproc.v1.StopClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.StopClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.StopClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.StopClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.StopClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.StopClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterUuid_ = ""; - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Specifying the `cluster_uuid` means the RPC will fail
-     * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-     * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * Recommendation: Set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.StopClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.StopClusterRequest) - private static final com.google.cloud.dataproc.v1.StopClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.StopClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.StopClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StopClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StopClusterRequest(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.dataproc.v1.StopClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java deleted file mode 100644 index 8b9a1297..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface StopClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.StopClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Optional. Specifying the `cluster_uuid` means the RPC will fail
-   * (with error NOT_FOUND) if a cluster with the specified UUID does not exist.
-   * 
- * - * string cluster_uuid = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * Recommendation: Set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java deleted file mode 100644 index c46e7489..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java +++ /dev/null @@ -1,1329 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to submit a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SubmitJobRequest} - */ -public final class SubmitJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SubmitJobRequest) - SubmitJobRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubmitJobRequest.newBuilder() to construct. - private SubmitJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SubmitJobRequest() { - projectId_ = ""; - region_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubmitJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SubmitJobRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.Job.Builder subBuilder = null; - if (job_ != null) { - subBuilder = job_.toBuilder(); - } - job_ = - input.readMessage(com.google.cloud.dataproc.v1.Job.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(job_); - job_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SubmitJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SubmitJobRequest.class, - com.google.cloud.dataproc.v1.SubmitJobRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 3; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1.Job job_; - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - @java.lang.Override - public boolean hasJob() { - return job_ != null; - } - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Job getJob() { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder() { - return getJob(); - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two
-   * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two
-   * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (job_ != null) { - output.writeMessage(2, getJob()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (job_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getJob()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); - } - 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.dataproc.v1.SubmitJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.SubmitJobRequest other = - (com.google.cloud.dataproc.v1.SubmitJobRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (hasJob() != other.hasJob()) return false; - if (hasJob()) { - if (!getJob().equals(other.getJob())) return false; - } - if (!getRequestId().equals(other.getRequestId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - if (hasJob()) { - hash = (37 * hash) + JOB_FIELD_NUMBER; - hash = (53 * hash) + getJob().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest 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.dataproc.v1.SubmitJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest parseFrom( - 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.dataproc.v1.SubmitJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest 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.dataproc.v1.SubmitJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest 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.dataproc.v1.SubmitJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest 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.dataproc.v1.SubmitJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to submit a job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.SubmitJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SubmitJobRequest) - com.google.cloud.dataproc.v1.SubmitJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SubmitJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.SubmitJobRequest.class, - com.google.cloud.dataproc.v1.SubmitJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.SubmitJobRequest.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(); - projectId_ = ""; - - region_ = ""; - - if (jobBuilder_ == null) { - job_ = null; - } else { - job_ = null; - jobBuilder_ = null; - } - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_SubmitJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SubmitJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.SubmitJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SubmitJobRequest build() { - com.google.cloud.dataproc.v1.SubmitJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.SubmitJobRequest buildPartial() { - com.google.cloud.dataproc.v1.SubmitJobRequest result = - new com.google.cloud.dataproc.v1.SubmitJobRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - if (jobBuilder_ == null) { - result.job_ = job_; - } else { - result.job_ = jobBuilder_.build(); - } - result.requestId_ = requestId_; - 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.dataproc.v1.SubmitJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.SubmitJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.SubmitJobRequest other) { - if (other == com.google.cloud.dataproc.v1.SubmitJobRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (other.hasJob()) { - mergeJob(other.getJob()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.SubmitJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.SubmitJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.Job job_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - jobBuilder_; - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - public boolean hasJob() { - return jobBuilder_ != null || job_ != null; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - public com.google.cloud.dataproc.v1.Job getJob() { - if (jobBuilder_ == null) { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } else { - return jobBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJob(com.google.cloud.dataproc.v1.Job value) { - if (jobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - job_ = value; - onChanged(); - } else { - jobBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJob(com.google.cloud.dataproc.v1.Job.Builder builderForValue) { - if (jobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - jobBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeJob(com.google.cloud.dataproc.v1.Job value) { - if (jobBuilder_ == null) { - if (job_ != null) { - job_ = com.google.cloud.dataproc.v1.Job.newBuilder(job_).mergeFrom(value).buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - jobBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearJob() { - if (jobBuilder_ == null) { - job_ = null; - onChanged(); - } else { - job_ = null; - jobBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.dataproc.v1.Job.Builder getJobBuilder() { - - onChanged(); - return getJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder() { - if (jobBuilder_ != null) { - return jobBuilder_.getMessageOrBuilder(); - } else { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - getJobFieldBuilder() { - if (jobBuilder_ == null) { - jobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder>( - getJob(), getParentForChildren(), isClean()); - job_ = null; - } - return jobBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique id used to identify the request. If the server
-     * receives two
-     * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique id used to identify the request. If the server
-     * receives two
-     * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique id used to identify the request. If the server
-     * receives two
-     * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique id used to identify the request. If the server
-     * receives two
-     * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique id used to identify the request. If the server
-     * receives two
-     * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-     * is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The id must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.SubmitJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SubmitJobRequest) - private static final com.google.cloud.dataproc.v1.SubmitJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SubmitJobRequest(); - } - - public static com.google.cloud.dataproc.v1.SubmitJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubmitJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SubmitJobRequest(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.dataproc.v1.SubmitJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequestOrBuilder.java deleted file mode 100644 index cc9dcd73..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequestOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface SubmitJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SubmitJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - boolean hasJob(); - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - com.google.cloud.dataproc.v1.Job getJob(); - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder(); - - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two
-   * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two
-   * [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend
-   * is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The id must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameter.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameter.java deleted file mode 100644 index 274a900d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameter.java +++ /dev/null @@ -1,1915 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A configurable parameter that replaces one or more fields in the template.
- * Parameterizable fields:
- * - Labels
- * - File uris
- * - Job properties
- * - Job arguments
- * - Script variables
- * - Main class (in HadoopJob and SparkJob)
- * - Zone (in ClusterSelector)
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.TemplateParameter} - */ -public final class TemplateParameter extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.TemplateParameter) - TemplateParameterOrBuilder { - private static final long serialVersionUID = 0L; - // Use TemplateParameter.newBuilder() to construct. - private TemplateParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TemplateParameter() { - name_ = ""; - fields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TemplateParameter(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TemplateParameter( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: - { - com.google.cloud.dataproc.v1.ParameterValidation.Builder subBuilder = null; - if (validation_ != null) { - subBuilder = validation_.toBuilder(); - } - validation_ = - input.readMessage( - com.google.cloud.dataproc.v1.ParameterValidation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(validation_); - validation_ = 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_ & 0x00000001) != 0)) { - fields_ = fields_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_TemplateParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.TemplateParameter.class, - com.google.cloud.dataproc.v1.TemplateParameter.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Parameter name.
-   * The parameter name is used as the key, and paired with the
-   * parameter value, which are passed to the template when the template
-   * is instantiated.
-   * The name must contain only capital letters (A-Z), numbers (0-9), and
-   * underscores (_), and must not start with a number. The maximum length is
-   * 40 characters.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Parameter name.
-   * The parameter name is used as the key, and paired with the
-   * parameter value, which are passed to the template when the template
-   * is instantiated.
-   * The name must contain only capital letters (A-Z), numbers (0-9), and
-   * underscores (_), and must not start with a number. The maximum length is
-   * 40 characters.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 FIELDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList fields_; - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the fields. - */ - public com.google.protobuf.ProtocolStringList getFieldsList() { - return fields_; - } - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of fields. - */ - public int getFieldsCount() { - return fields_.size(); - } - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The fields at the given index. - */ - public java.lang.String getFields(int index) { - return fields_.get(index); - } - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the fields at the given index. - */ - public com.google.protobuf.ByteString getFieldsBytes(int index) { - return fields_.getByteString(index); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Optional. Brief description of the parameter.
-   * Must not exceed 1024 characters.
-   * 
- * - * 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. Brief description of the parameter.
-   * Must not exceed 1024 characters.
-   * 
- * - * 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 VALIDATION_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.ParameterValidation validation_; - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the validation field is set. - */ - @java.lang.Override - public boolean hasValidation() { - return validation_ != null; - } - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The validation. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ParameterValidation getValidation() { - return validation_ == null - ? com.google.cloud.dataproc.v1.ParameterValidation.getDefaultInstance() - : validation_; - } - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ParameterValidationOrBuilder getValidationOrBuilder() { - return getValidation(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < fields_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fields_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (validation_ != null) { - output.writeMessage(4, getValidation()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < fields_.size(); i++) { - dataSize += computeStringSizeNoTag(fields_.getRaw(i)); - } - size += dataSize; - size += 1 * getFieldsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (validation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getValidation()); - } - 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.dataproc.v1.TemplateParameter)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.TemplateParameter other = - (com.google.cloud.dataproc.v1.TemplateParameter) obj; - - if (!getName().equals(other.getName())) return false; - if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasValidation() != other.hasValidation()) return false; - if (hasValidation()) { - if (!getValidation().equals(other.getValidation())) 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 (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasValidation()) { - hash = (37 * hash) + VALIDATION_FIELD_NUMBER; - hash = (53 * hash) + getValidation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.TemplateParameter parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter 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.dataproc.v1.TemplateParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter parseFrom( - 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.dataproc.v1.TemplateParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter 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.dataproc.v1.TemplateParameter parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter 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.dataproc.v1.TemplateParameter parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter 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.dataproc.v1.TemplateParameter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A configurable parameter that replaces one or more fields in the template.
-   * Parameterizable fields:
-   * - Labels
-   * - File uris
-   * - Job properties
-   * - Job arguments
-   * - Script variables
-   * - Main class (in HadoopJob and SparkJob)
-   * - Zone (in ClusterSelector)
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.TemplateParameter} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.TemplateParameter) - com.google.cloud.dataproc.v1.TemplateParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_TemplateParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.TemplateParameter.class, - com.google.cloud.dataproc.v1.TemplateParameter.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.TemplateParameter.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_ = ""; - - fields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - description_ = ""; - - if (validationBuilder_ == null) { - validation_ = null; - } else { - validation_ = null; - validationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.TemplateParameter getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.TemplateParameter.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.TemplateParameter build() { - com.google.cloud.dataproc.v1.TemplateParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.TemplateParameter buildPartial() { - com.google.cloud.dataproc.v1.TemplateParameter result = - new com.google.cloud.dataproc.v1.TemplateParameter(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = fields_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - result.description_ = description_; - if (validationBuilder_ == null) { - result.validation_ = validation_; - } else { - result.validation_ = validationBuilder_.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.dataproc.v1.TemplateParameter) { - return mergeFrom((com.google.cloud.dataproc.v1.TemplateParameter) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.TemplateParameter other) { - if (other == com.google.cloud.dataproc.v1.TemplateParameter.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasValidation()) { - mergeValidation(other.getValidation()); - } - 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.dataproc.v1.TemplateParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.TemplateParameter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Parameter name.
-     * The parameter name is used as the key, and paired with the
-     * parameter value, which are passed to the template when the template
-     * is instantiated.
-     * The name must contain only capital letters (A-Z), numbers (0-9), and
-     * underscores (_), and must not start with a number. The maximum length is
-     * 40 characters.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Parameter name.
-     * The parameter name is used as the key, and paired with the
-     * parameter value, which are passed to the template when the template
-     * is instantiated.
-     * The name must contain only capital letters (A-Z), numbers (0-9), and
-     * underscores (_), and must not start with a number. The maximum length is
-     * 40 characters.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Parameter name.
-     * The parameter name is used as the key, and paired with the
-     * parameter value, which are passed to the template when the template
-     * is instantiated.
-     * The name must contain only capital letters (A-Z), numbers (0-9), and
-     * underscores (_), and must not start with a number. The maximum length is
-     * 40 characters.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - /** - * - * - *
-     * Required. Parameter name.
-     * The parameter name is used as the key, and paired with the
-     * parameter value, which are passed to the template when the template
-     * is instantiated.
-     * The name must contain only capital letters (A-Z), numbers (0-9), and
-     * underscores (_), and must not start with a number. The maximum length is
-     * 40 characters.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Parameter name.
-     * The parameter name is used as the key, and paired with the
-     * parameter value, which are passed to the template when the template
-     * is instantiated.
-     * The name must contain only capital letters (A-Z), numbers (0-9), and
-     * underscores (_), and must not start with a number. The maximum length is
-     * 40 characters.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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.protobuf.LazyStringList fields_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = new com.google.protobuf.LazyStringArrayList(fields_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the fields. - */ - public com.google.protobuf.ProtocolStringList getFieldsList() { - return fields_.getUnmodifiableView(); - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of fields. - */ - public int getFieldsCount() { - return fields_.size(); - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The fields at the given index. - */ - public java.lang.String getFields(int index) { - return fields_.get(index); - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the fields at the given index. - */ - public com.google.protobuf.ByteString getFieldsBytes(int index) { - return fields_.getByteString(index); - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The fields to set. - * @return This builder for chaining. - */ - public Builder setFields(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The fields to add. - * @return This builder for chaining. - */ - public Builder addFields(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The fields to add. - * @return This builder for chaining. - */ - public Builder addAllFields(java.lang.Iterable values) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearFields() { - fields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Paths to all fields that the parameter replaces.
-     * A field is allowed to appear in at most one parameter's list of field
-     * paths.
-     * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-     * For example, a field path that references the zone field of a workflow
-     * template's cluster selector would be specified as
-     * `placement.clusterSelector.zone`.
-     * Also, field paths can reference fields using the following syntax:
-     * * Values in maps can be referenced by key:
-     *     * labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * placement.managedCluster.labels['key']
-     *     * placement.clusterSelector.clusterLabels['key']
-     *     * jobs['step-id'].labels['key']
-     * * Jobs in the jobs list can be referenced by step-id:
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * jobs['step-id'].hiveJob.queryFileUri
-     *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-     *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-     *     * jobs['step-id'].hadoopJob.archiveUris[0]
-     *     * jobs['step-id'].hadoopJob.fileUris[0]
-     *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-     * * Items in repeated fields can be referenced by a zero-based index:
-     *     * jobs['step-id'].sparkJob.args[0]
-     * * Other examples:
-     *     * jobs['step-id'].hadoopJob.properties['key']
-     *     * jobs['step-id'].hadoopJob.args[0]
-     *     * jobs['step-id'].hiveJob.scriptVariables['key']
-     *     * jobs['step-id'].hadoopJob.mainJarFileUri
-     *     * placement.clusterSelector.zone
-     * It may not be possible to parameterize maps and repeated fields in their
-     * entirety since only individual map values and individual items in repeated
-     * fields can be referenced. For example, the following field paths are
-     * invalid:
-     * - placement.clusterSelector.clusterLabels
-     * - jobs['step-id'].sparkJob.args
-     * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes of the fields to add. - * @return This builder for chaining. - */ - public Builder addFieldsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-     * Optional. Brief description of the parameter.
-     * Must not exceed 1024 characters.
-     * 
- * - * 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. Brief description of the parameter.
-     * Must not exceed 1024 characters.
-     * 
- * - * 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. Brief description of the parameter.
-     * Must not exceed 1024 characters.
-     * 
- * - * 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. Brief description of the parameter.
-     * Must not exceed 1024 characters.
-     * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Brief description of the parameter.
-     * Must not exceed 1024 characters.
-     * 
- * - * 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 com.google.cloud.dataproc.v1.ParameterValidation validation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ParameterValidation, - com.google.cloud.dataproc.v1.ParameterValidation.Builder, - com.google.cloud.dataproc.v1.ParameterValidationOrBuilder> - validationBuilder_; - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the validation field is set. - */ - public boolean hasValidation() { - return validationBuilder_ != null || validation_ != null; - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The validation. - */ - public com.google.cloud.dataproc.v1.ParameterValidation getValidation() { - if (validationBuilder_ == null) { - return validation_ == null - ? com.google.cloud.dataproc.v1.ParameterValidation.getDefaultInstance() - : validation_; - } else { - return validationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setValidation(com.google.cloud.dataproc.v1.ParameterValidation value) { - if (validationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - validation_ = value; - onChanged(); - } else { - validationBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setValidation( - com.google.cloud.dataproc.v1.ParameterValidation.Builder builderForValue) { - if (validationBuilder_ == null) { - validation_ = builderForValue.build(); - onChanged(); - } else { - validationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeValidation(com.google.cloud.dataproc.v1.ParameterValidation value) { - if (validationBuilder_ == null) { - if (validation_ != null) { - validation_ = - com.google.cloud.dataproc.v1.ParameterValidation.newBuilder(validation_) - .mergeFrom(value) - .buildPartial(); - } else { - validation_ = value; - } - onChanged(); - } else { - validationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearValidation() { - if (validationBuilder_ == null) { - validation_ = null; - onChanged(); - } else { - validation_ = null; - validationBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ParameterValidation.Builder getValidationBuilder() { - - onChanged(); - return getValidationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.ParameterValidationOrBuilder getValidationOrBuilder() { - if (validationBuilder_ != null) { - return validationBuilder_.getMessageOrBuilder(); - } else { - return validation_ == null - ? com.google.cloud.dataproc.v1.ParameterValidation.getDefaultInstance() - : validation_; - } - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ParameterValidation, - com.google.cloud.dataproc.v1.ParameterValidation.Builder, - com.google.cloud.dataproc.v1.ParameterValidationOrBuilder> - getValidationFieldBuilder() { - if (validationBuilder_ == null) { - validationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ParameterValidation, - com.google.cloud.dataproc.v1.ParameterValidation.Builder, - com.google.cloud.dataproc.v1.ParameterValidationOrBuilder>( - getValidation(), getParentForChildren(), isClean()); - validation_ = null; - } - return validationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.TemplateParameter) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.TemplateParameter) - private static final com.google.cloud.dataproc.v1.TemplateParameter DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.TemplateParameter(); - } - - public static com.google.cloud.dataproc.v1.TemplateParameter getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TemplateParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TemplateParameter(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.dataproc.v1.TemplateParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameterOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameterOrBuilder.java deleted file mode 100644 index 5625583f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameterOrBuilder.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface TemplateParameterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.TemplateParameter) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Parameter name.
-   * The parameter name is used as the key, and paired with the
-   * parameter value, which are passed to the template when the template
-   * is instantiated.
-   * The name must contain only capital letters (A-Z), numbers (0-9), and
-   * underscores (_), and must not start with a number. The maximum length is
-   * 40 characters.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Parameter name.
-   * The parameter name is used as the key, and paired with the
-   * parameter value, which are passed to the template when the template
-   * is instantiated.
-   * The name must contain only capital letters (A-Z), numbers (0-9), and
-   * underscores (_), and must not start with a number. The maximum length is
-   * 40 characters.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the fields. - */ - java.util.List getFieldsList(); - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of fields. - */ - int getFieldsCount(); - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The fields at the given index. - */ - java.lang.String getFields(int index); - /** - * - * - *
-   * Required. Paths to all fields that the parameter replaces.
-   * A field is allowed to appear in at most one parameter's list of field
-   * paths.
-   * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
-   * For example, a field path that references the zone field of a workflow
-   * template's cluster selector would be specified as
-   * `placement.clusterSelector.zone`.
-   * Also, field paths can reference fields using the following syntax:
-   * * Values in maps can be referenced by key:
-   *     * labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * placement.managedCluster.labels['key']
-   *     * placement.clusterSelector.clusterLabels['key']
-   *     * jobs['step-id'].labels['key']
-   * * Jobs in the jobs list can be referenced by step-id:
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * jobs['step-id'].hiveJob.queryFileUri
-   *     * jobs['step-id'].pySparkJob.mainPythonFileUri
-   *     * jobs['step-id'].hadoopJob.jarFileUris[0]
-   *     * jobs['step-id'].hadoopJob.archiveUris[0]
-   *     * jobs['step-id'].hadoopJob.fileUris[0]
-   *     * jobs['step-id'].pySparkJob.pythonFileUris[0]
-   * * Items in repeated fields can be referenced by a zero-based index:
-   *     * jobs['step-id'].sparkJob.args[0]
-   * * Other examples:
-   *     * jobs['step-id'].hadoopJob.properties['key']
-   *     * jobs['step-id'].hadoopJob.args[0]
-   *     * jobs['step-id'].hiveJob.scriptVariables['key']
-   *     * jobs['step-id'].hadoopJob.mainJarFileUri
-   *     * placement.clusterSelector.zone
-   * It may not be possible to parameterize maps and repeated fields in their
-   * entirety since only individual map values and individual items in repeated
-   * fields can be referenced. For example, the following field paths are
-   * invalid:
-   * - placement.clusterSelector.clusterLabels
-   * - jobs['step-id'].sparkJob.args
-   * 
- * - * repeated string fields = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the fields at the given index. - */ - com.google.protobuf.ByteString getFieldsBytes(int index); - - /** - * - * - *
-   * Optional. Brief description of the parameter.
-   * Must not exceed 1024 characters.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. Brief description of the parameter.
-   * Must not exceed 1024 characters.
-   * 
- * - * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the validation field is set. - */ - boolean hasValidation(); - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The validation. - */ - com.google.cloud.dataproc.v1.ParameterValidation getValidation(); - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * - * .google.cloud.dataproc.v1.ParameterValidation validation = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.ParameterValidationOrBuilder getValidationOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequest.java deleted file mode 100644 index 1e68b8c1..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequest.java +++ /dev/null @@ -1,760 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to update an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest} - */ -public final class UpdateAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) - UpdateAutoscalingPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateAutoscalingPolicyRequest.newBuilder() to construct. - private UpdateAutoscalingPolicyRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateAutoscalingPolicyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAutoscalingPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateAutoscalingPolicyRequest( - 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.dataproc.v1.AutoscalingPolicy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.dataproc.v1.AutoscalingPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.AutoscalingPolicy policy_; - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy() { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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()); - } - 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()); - } - 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.dataproc.v1.UpdateAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) obj; - - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) 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(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest 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.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - 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.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest 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.dataproc.v1.UpdateAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest 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.dataproc.v1.UpdateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest 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.dataproc.v1.UpdateAutoscalingPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to update an autoscaling policy.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.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; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest(this); - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.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.dataproc.v1.UpdateAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest other) { - if (other == com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest.getDefaultInstance()) - return this; - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - 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.dataproc.v1.UpdateAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.AutoscalingPolicy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy(com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy(com.google.cloud.dataproc.v1.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.cloud.dataproc.v1.AutoscalingPolicy.newBuilder(policy_) - .mergeFrom(value) - .buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.cloud.dataproc.v1.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AutoscalingPolicy, - com.google.cloud.dataproc.v1.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.UpdateAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAutoscalingPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAutoscalingPolicyRequest(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.dataproc.v1.UpdateAutoscalingPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index 6ca8ce6d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1; - -public interface UpdateAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.cloud.dataproc.v1.AutoscalingPolicy getPolicy(); - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.AutoscalingPolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java deleted file mode 100644 index d8ab4c54..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java +++ /dev/null @@ -1,2775 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to update a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateClusterRequest} - */ -public final class UpdateClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.UpdateClusterRequest) - UpdateClusterRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateClusterRequest.newBuilder() to construct. - private UpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateClusterRequest() { - projectId_ = ""; - region_ = ""; - clusterName_ = ""; - requestId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateClusterRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateClusterRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 26: - { - com.google.cloud.dataproc.v1.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.cloud.dataproc.v1.Cluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cluster_); - cluster_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - 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; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 50: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (gracefulDecommissionTimeout_ != null) { - subBuilder = gracefulDecommissionTimeout_.toBuilder(); - } - gracefulDecommissionTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gracefulDecommissionTimeout_); - gracefulDecommissionTimeout_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateClusterRequest.class, - com.google.cloud.dataproc.v1.UpdateClusterRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 5; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.Cluster cluster_; - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - @java.lang.Override - public boolean hasCluster() { - return cluster_ != null; - } - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Cluster getCluster() { - return cluster_ == null ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() : cluster_; - } - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() { - return getCluster(); - } - - public static final int GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER = 6; - private com.google.protobuf.Duration gracefulDecommissionTimeout_; - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - @java.lang.Override - public boolean hasGracefulDecommissionTimeout() { - return gracefulDecommissionTimeout_ != null; - } - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gracefulDecommissionTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getGracefulDecommissionTimeout() { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { - return getGracefulDecommissionTimeout(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 4; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - public static final int REQUEST_ID_FIELD_NUMBER = 7; - private volatile java.lang.Object requestId_; - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - @java.lang.Override - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (cluster_ != null) { - output.writeMessage(3, getCluster()); - } - if (updateMask_ != null) { - output.writeMessage(4, getUpdateMask()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - output.writeMessage(6, getGracefulDecommissionTimeout()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, requestId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (cluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateMask()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, getGracefulDecommissionTimeout()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, requestId_); - } - 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.dataproc.v1.UpdateClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.UpdateClusterRequest other = - (com.google.cloud.dataproc.v1.UpdateClusterRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (hasCluster() != other.hasCluster()) return false; - if (hasCluster()) { - if (!getCluster().equals(other.getCluster())) return false; - } - if (hasGracefulDecommissionTimeout() != other.hasGracefulDecommissionTimeout()) return false; - if (hasGracefulDecommissionTimeout()) { - if (!getGracefulDecommissionTimeout().equals(other.getGracefulDecommissionTimeout())) - return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getRequestId().equals(other.getRequestId())) 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) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - if (hasCluster()) { - hash = (37 * hash) + CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getCluster().hashCode(); - } - if (hasGracefulDecommissionTimeout()) { - hash = (37 * hash) + GRACEFUL_DECOMMISSION_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getGracefulDecommissionTimeout().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; - hash = (53 * hash) + getRequestId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest 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.dataproc.v1.UpdateClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest parseFrom( - 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.dataproc.v1.UpdateClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest 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.dataproc.v1.UpdateClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest 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.dataproc.v1.UpdateClusterRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest 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.dataproc.v1.UpdateClusterRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to update a cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.UpdateClusterRequest) - com.google.cloud.dataproc.v1.UpdateClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateClusterRequest.class, - com.google.cloud.dataproc.v1.UpdateClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.UpdateClusterRequest.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(); - projectId_ = ""; - - region_ = ""; - - clusterName_ = ""; - - if (clusterBuilder_ == null) { - cluster_ = null; - } else { - cluster_ = null; - clusterBuilder_ = null; - } - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = null; - } else { - gracefulDecommissionTimeout_ = null; - gracefulDecommissionTimeoutBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.UpdateClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateClusterRequest build() { - com.google.cloud.dataproc.v1.UpdateClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateClusterRequest buildPartial() { - com.google.cloud.dataproc.v1.UpdateClusterRequest result = - new com.google.cloud.dataproc.v1.UpdateClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.clusterName_ = clusterName_; - if (clusterBuilder_ == null) { - result.cluster_ = cluster_; - } else { - result.cluster_ = clusterBuilder_.build(); - } - if (gracefulDecommissionTimeoutBuilder_ == null) { - result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeout_; - } else { - result.gracefulDecommissionTimeout_ = gracefulDecommissionTimeoutBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - result.requestId_ = requestId_; - 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.dataproc.v1.UpdateClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.UpdateClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.UpdateClusterRequest other) { - if (other == com.google.cloud.dataproc.v1.UpdateClusterRequest.getDefaultInstance()) - return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (other.hasCluster()) { - mergeCluster(other.getCluster()); - } - if (other.hasGracefulDecommissionTimeout()) { - mergeGracefulDecommissionTimeout(other.getGracefulDecommissionTimeout()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - 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.dataproc.v1.UpdateClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.UpdateClusterRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project the
-     * cluster belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The cluster name.
-     * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - clusterBuilder_; - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - public boolean hasCluster() { - return clusterBuilder_ != null || cluster_ != null; - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - public com.google.cloud.dataproc.v1.Cluster getCluster() { - if (clusterBuilder_ == null) { - return cluster_ == null - ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() - : cluster_; - } else { - return clusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1.Cluster value) { - if (clusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cluster_ = value; - onChanged(); - } else { - clusterBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1.Cluster.Builder builderForValue) { - if (clusterBuilder_ == null) { - cluster_ = builderForValue.build(); - onChanged(); - } else { - clusterBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeCluster(com.google.cloud.dataproc.v1.Cluster value) { - if (clusterBuilder_ == null) { - if (cluster_ != null) { - cluster_ = - com.google.cloud.dataproc.v1.Cluster.newBuilder(cluster_) - .mergeFrom(value) - .buildPartial(); - } else { - cluster_ = value; - } - onChanged(); - } else { - clusterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearCluster() { - if (clusterBuilder_ == null) { - cluster_ = null; - onChanged(); - } else { - cluster_ = null; - clusterBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.Cluster.Builder getClusterBuilder() { - - onChanged(); - return getClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder() { - if (clusterBuilder_ != null) { - return clusterBuilder_.getMessageOrBuilder(); - } else { - return cluster_ == null - ? com.google.cloud.dataproc.v1.Cluster.getDefaultInstance() - : cluster_; - } - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder> - getClusterFieldBuilder() { - if (clusterBuilder_ == null) { - clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Cluster, - com.google.cloud.dataproc.v1.Cluster.Builder, - com.google.cloud.dataproc.v1.ClusterOrBuilder>( - getCluster(), getParentForChildren(), isClean()); - cluster_ = null; - } - return clusterBuilder_; - } - - private com.google.protobuf.Duration gracefulDecommissionTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - gracefulDecommissionTimeoutBuilder_; - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - public boolean hasGracefulDecommissionTimeout() { - return gracefulDecommissionTimeoutBuilder_ != null || gracefulDecommissionTimeout_ != null; - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gracefulDecommissionTimeout. - */ - public com.google.protobuf.Duration getGracefulDecommissionTimeout() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } else { - return gracefulDecommissionTimeoutBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGracefulDecommissionTimeout(com.google.protobuf.Duration value) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gracefulDecommissionTimeout_ = value; - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGracefulDecommissionTimeout( - com.google.protobuf.Duration.Builder builderForValue) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = builderForValue.build(); - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGracefulDecommissionTimeout(com.google.protobuf.Duration value) { - if (gracefulDecommissionTimeoutBuilder_ == null) { - if (gracefulDecommissionTimeout_ != null) { - gracefulDecommissionTimeout_ = - com.google.protobuf.Duration.newBuilder(gracefulDecommissionTimeout_) - .mergeFrom(value) - .buildPartial(); - } else { - gracefulDecommissionTimeout_ = value; - } - onChanged(); - } else { - gracefulDecommissionTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGracefulDecommissionTimeout() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeout_ = null; - onChanged(); - } else { - gracefulDecommissionTimeout_ = null; - gracefulDecommissionTimeoutBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getGracefulDecommissionTimeoutBuilder() { - - onChanged(); - return getGracefulDecommissionTimeoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder() { - if (gracefulDecommissionTimeoutBuilder_ != null) { - return gracefulDecommissionTimeoutBuilder_.getMessageOrBuilder(); - } else { - return gracefulDecommissionTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : gracefulDecommissionTimeout_; - } - } - /** - * - * - *
-     * Optional. Timeout for graceful YARN decomissioning. Graceful
-     * decommissioning allows removing nodes from the cluster without
-     * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-     * in progress to finish before forcefully removing nodes (and potentially
-     * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-     * the maximum allowed timeout is 1 day. (see JSON representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * Only supported on Dataproc image versions 1.2 and higher.
-     * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getGracefulDecommissionTimeoutFieldBuilder() { - if (gracefulDecommissionTimeoutBuilder_ == null) { - gracefulDecommissionTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getGracefulDecommissionTimeout(), getParentForChildren(), isClean()); - gracefulDecommissionTimeout_ = null; - } - return gracefulDecommissionTimeoutBuilder_; - } - - 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_; - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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(); - } - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Required. Specifies the path, relative to `Cluster`, of
-     * the field to update. For example, to change the number of workers
-     * in a cluster to 5, the `update_mask` parameter would be
-     * specified as `config.worker_config.num_instances`,
-     * and the `PATCH` request body would specify the new value, as follows:
-     *     {
-     *       "config":{
-     *         "workerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * Similarly, to change the number of preemptible workers in a cluster to 5,
-     * the `update_mask` parameter would be
-     * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-     * body would be set as follows:
-     *     {
-     *       "config":{
-     *         "secondaryWorkerConfig":{
-     *           "numInstances":"5"
-     *         }
-     *       }
-     *     }
-     * <strong>Note:</strong> Currently, only the following fields can be updated:
-     *  <table>
-     *  <tbody>
-     *  <tr>
-     *  <td><strong>Mask</strong></td>
-     *  <td><strong>Purpose</strong></td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>labels</em></strong></td>
-     *  <td>Update labels</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-     *  <td>Resize primary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-     *  <td>Resize secondary worker group</td>
-     *  </tr>
-     *  <tr>
-     *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-     *  change autoscaling policies</td>
-     *  </tr>
-     *  </tbody>
-     *  </table>
-     * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - private java.lang.Object requestId_ = ""; - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - public com.google.protobuf.ByteString getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A unique ID used to identify the request. If the server
-     * receives two
-     * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-     * with the same id, then the second request will be ignored and the
-     * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-     * backend is returned.
-     * It is recommended to always set this value to a
-     * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-     * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-     * underscores (_), and hyphens (-). The maximum length is 40 characters.
-     * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for requestId to set. - * @return This builder for chaining. - */ - public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = 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.dataproc.v1.UpdateClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.UpdateClusterRequest) - private static final com.google.cloud.dataproc.v1.UpdateClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.UpdateClusterRequest(); - } - - public static com.google.cloud.dataproc.v1.UpdateClusterRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateClusterRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateClusterRequest(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.dataproc.v1.UpdateClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java deleted file mode 100644 index fb1ecbc5..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface UpdateClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.UpdateClusterRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project the
-   * cluster belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Required. The cluster name.
-   * 
- * - * string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the cluster field is set. - */ - boolean hasCluster(); - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - com.google.cloud.dataproc.v1.Cluster getCluster(); - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * .google.cloud.dataproc.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.ClusterOrBuilder getClusterOrBuilder(); - - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gracefulDecommissionTimeout field is set. - */ - boolean hasGracefulDecommissionTimeout(); - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gracefulDecommissionTimeout. - */ - com.google.protobuf.Duration getGracefulDecommissionTimeout(); - /** - * - * - *
-   * Optional. Timeout for graceful YARN decomissioning. Graceful
-   * decommissioning allows removing nodes from the cluster without
-   * interrupting jobs in progress. Timeout specifies how long to wait for jobs
-   * in progress to finish before forcefully removing nodes (and potentially
-   * interrupting jobs). Default timeout is 0 (for forceful decommission), and
-   * the maximum allowed timeout is 1 day. (see JSON representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * Only supported on Dataproc image versions 1.2 and higher.
-   * 
- * - * - * .google.protobuf.Duration graceful_decommission_timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getGracefulDecommissionTimeoutOrBuilder(); - - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required. Specifies the path, relative to `Cluster`, of
-   * the field to update. For example, to change the number of workers
-   * in a cluster to 5, the `update_mask` parameter would be
-   * specified as `config.worker_config.num_instances`,
-   * and the `PATCH` request body would specify the new value, as follows:
-   *     {
-   *       "config":{
-   *         "workerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * Similarly, to change the number of preemptible workers in a cluster to 5,
-   * the `update_mask` parameter would be
-   * `config.secondary_worker_config.num_instances`, and the `PATCH` request
-   * body would be set as follows:
-   *     {
-   *       "config":{
-   *         "secondaryWorkerConfig":{
-   *           "numInstances":"5"
-   *         }
-   *       }
-   *     }
-   * <strong>Note:</strong> Currently, only the following fields can be updated:
-   *  <table>
-   *  <tbody>
-   *  <tr>
-   *  <td><strong>Mask</strong></td>
-   *  <td><strong>Purpose</strong></td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>labels</em></strong></td>
-   *  <td>Update labels</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.worker_config.num_instances</em></strong></td>
-   *  <td>Resize primary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td><strong><em>config.secondary_worker_config.num_instances</em></strong></td>
-   *  <td>Resize secondary worker group</td>
-   *  </tr>
-   *  <tr>
-   *  <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
-   *  change autoscaling policies</td>
-   *  </tr>
-   *  </tbody>
-   *  </table>
-   * 
- * - * .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); - - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The requestId. - */ - java.lang.String getRequestId(); - /** - * - * - *
-   * Optional. A unique ID used to identify the request. If the server
-   * receives two
-   * [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s
-   * with the same id, then the second request will be ignored and the
-   * first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the
-   * backend is returned.
-   * It is recommended to always set this value to a
-   * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
-   * The ID must contain only letters (a-z, A-Z), numbers (0-9),
-   * underscores (_), and hyphens (-). The maximum length is 40 characters.
-   * 
- * - * string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequest.java deleted file mode 100644 index 44377c07..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequest.java +++ /dev/null @@ -1,1610 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to update a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateJobRequest} - */ -public final class UpdateJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.UpdateJobRequest) - UpdateJobRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateJobRequest.newBuilder() to construct. - private UpdateJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateJobRequest() { - projectId_ = ""; - region_ = ""; - jobId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateJobRequest( - 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(); - - projectId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 34: - { - com.google.cloud.dataproc.v1.Job.Builder subBuilder = null; - if (job_ != null) { - subBuilder = job_.toBuilder(); - } - job_ = - input.readMessage(com.google.cloud.dataproc.v1.Job.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(job_); - job_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_UpdateJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateJobRequest.class, - com.google.cloud.dataproc.v1.UpdateJobRequest.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGION_FIELD_NUMBER = 2; - private volatile java.lang.Object region_; - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.Job job_; - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - @java.lang.Override - public boolean hasJob() { - return job_ != null; - } - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.Job getJob() { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder() { - return getJob(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 5; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobId_); - } - if (job_ != null) { - output.writeMessage(4, getJob()); - } - if (updateMask_ != null) { - output.writeMessage(5, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobId_); - } - if (job_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getJob()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, 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.dataproc.v1.UpdateJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.UpdateJobRequest other = - (com.google.cloud.dataproc.v1.UpdateJobRequest) obj; - - if (!getProjectId().equals(other.getProjectId())) return false; - if (!getRegion().equals(other.getRegion())) return false; - if (!getJobId().equals(other.getJobId())) return false; - if (hasJob() != other.hasJob()) return false; - if (hasJob()) { - if (!getJob().equals(other.getJob())) 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(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - if (hasJob()) { - hash = (37 * hash) + JOB_FIELD_NUMBER; - hash = (53 * hash) + getJob().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.dataproc.v1.UpdateJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest 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.dataproc.v1.UpdateJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest parseFrom( - 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.dataproc.v1.UpdateJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest 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.dataproc.v1.UpdateJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest 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.dataproc.v1.UpdateJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest 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.dataproc.v1.UpdateJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to update a job.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.UpdateJobRequest) - com.google.cloud.dataproc.v1.UpdateJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_UpdateJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateJobRequest.class, - com.google.cloud.dataproc.v1.UpdateJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.UpdateJobRequest.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(); - projectId_ = ""; - - region_ = ""; - - jobId_ = ""; - - if (jobBuilder_ == null) { - job_ = null; - } else { - job_ = null; - jobBuilder_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_UpdateJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.UpdateJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateJobRequest build() { - com.google.cloud.dataproc.v1.UpdateJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateJobRequest buildPartial() { - com.google.cloud.dataproc.v1.UpdateJobRequest result = - new com.google.cloud.dataproc.v1.UpdateJobRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - result.jobId_ = jobId_; - if (jobBuilder_ == null) { - result.job_ = job_; - } else { - result.job_ = jobBuilder_.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.dataproc.v1.UpdateJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.UpdateJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.UpdateJobRequest other) { - if (other == com.google.cloud.dataproc.v1.UpdateJobRequest.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getRegion().isEmpty()) { - region_ = other.region_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - onChanged(); - } - if (other.hasJob()) { - mergeJob(other.getJob()); - } - 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.dataproc.v1.UpdateJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.UpdateJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the Google Cloud Platform project that the job
-     * belongs to.
-     * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object region_ = ""; - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = region_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - region_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - public com.google.protobuf.ByteString getRegionBytes() { - java.lang.Object ref = region_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - region_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - region_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearRegion() { - - region_ = getDefaultInstance().getRegion(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Dataproc region in which to handle the request.
-     * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - region_ = value; - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The job ID.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.Job job_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - jobBuilder_; - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - public boolean hasJob() { - return jobBuilder_ != null || job_ != null; - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - public com.google.cloud.dataproc.v1.Job getJob() { - if (jobBuilder_ == null) { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } else { - return jobBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJob(com.google.cloud.dataproc.v1.Job value) { - if (jobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - job_ = value; - onChanged(); - } else { - jobBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJob(com.google.cloud.dataproc.v1.Job.Builder builderForValue) { - if (jobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - jobBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeJob(com.google.cloud.dataproc.v1.Job value) { - if (jobBuilder_ == null) { - if (job_ != null) { - job_ = com.google.cloud.dataproc.v1.Job.newBuilder(job_).mergeFrom(value).buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - jobBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearJob() { - if (jobBuilder_ == null) { - job_ = null; - onChanged(); - } else { - job_ = null; - jobBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.dataproc.v1.Job.Builder getJobBuilder() { - - onChanged(); - return getJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder() { - if (jobBuilder_ != null) { - return jobBuilder_.getMessageOrBuilder(); - } else { - return job_ == null ? com.google.cloud.dataproc.v1.Job.getDefaultInstance() : job_; - } - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder> - getJobFieldBuilder() { - if (jobBuilder_ == null) { - jobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.Job, - com.google.cloud.dataproc.v1.Job.Builder, - com.google.cloud.dataproc.v1.JobOrBuilder>( - getJob(), getParentForChildren(), isClean()); - job_ = null; - } - return jobBuilder_; - } - - 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_; - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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(); - } - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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; - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Required. Specifies the path, relative to <code>Job</code>, of
-     * the field to update. For example, to update the labels of a Job the
-     * <code>update_mask</code> parameter would be specified as
-     * <code>labels</code>, and the `PATCH` request body would specify the new
-     * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-     * field that can be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - 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.dataproc.v1.UpdateJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.UpdateJobRequest) - private static final com.google.cloud.dataproc.v1.UpdateJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.UpdateJobRequest(); - } - - public static com.google.cloud.dataproc.v1.UpdateJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateJobRequest(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.dataproc.v1.UpdateJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequestOrBuilder.java deleted file mode 100644 index b4d66081..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequestOrBuilder.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface UpdateJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.UpdateJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - * - * - *
-   * Required. The ID of the Google Cloud Platform project that the job
-   * belongs to.
-   * 
- * - * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString getProjectIdBytes(); - - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The region. - */ - java.lang.String getRegion(); - /** - * - * - *
-   * Required. The Dataproc region in which to handle the request.
-   * 
- * - * string region = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for region. - */ - com.google.protobuf.ByteString getRegionBytes(); - - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Required. The job ID.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); - - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return Whether the job field is set. - */ - boolean hasJob(); - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The job. - */ - com.google.cloud.dataproc.v1.Job getJob(); - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.dataproc.v1.JobOrBuilder getJobOrBuilder(); - - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Required. Specifies the path, relative to <code>Job</code>, of
-   * the field to update. For example, to update the labels of a Job the
-   * <code>update_mask</code> parameter would be specified as
-   * <code>labels</code>, and the `PATCH` request body would specify the new
-   * value. <strong>Note:</strong> Currently, <code>labels</code> is the only
-   * field that can be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequest.java deleted file mode 100644 index 65daaf53..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequest.java +++ /dev/null @@ -1,771 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A request to update a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest} - */ -public final class UpdateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) - UpdateWorkflowTemplateRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateWorkflowTemplateRequest.newBuilder() to construct. - private UpdateWorkflowTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateWorkflowTemplateRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateWorkflowTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateWorkflowTemplateRequest( - 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.dataproc.v1.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(template_); - template_ = 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.Builder.class); - } - - public static final int TEMPLATE_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - @java.lang.Override - public boolean hasTemplate() { - return template_ != null; - } - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - return getTemplate(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - 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 (template_ != null) { - output.writeMessage(1, getTemplate()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (template_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTemplate()); - } - 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.dataproc.v1.UpdateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) obj; - - if (hasTemplate() != other.hasTemplate()) return false; - if (hasTemplate()) { - if (!getTemplate().equals(other.getTemplate())) 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 (hasTemplate()) { - hash = (37 * hash) + TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getTemplate().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest 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.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - 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.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest 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.dataproc.v1.UpdateWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest 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.dataproc.v1.UpdateWorkflowTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest 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.dataproc.v1.UpdateWorkflowTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A request to update a workflow template.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.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 (templateBuilder_ == null) { - template_ = null; - } else { - template_ = null; - templateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest(this); - if (templateBuilder_ == null) { - result.template_ = template_; - } else { - result.template_ = templateBuilder_.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.dataproc.v1.UpdateWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest other) { - if (other == com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest.getDefaultInstance()) - return this; - if (other.hasTemplate()) { - mergeTemplate(other.getTemplate()); - } - 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.dataproc.v1.UpdateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - public boolean hasTemplate() { - return templateBuilder_ != null || template_ != null; - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - template_ = value; - onChanged(); - } else { - templateBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder builderForValue) { - if (templateBuilder_ == null) { - template_ = builderForValue.build(); - onChanged(); - } else { - templateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1.WorkflowTemplate.newBuilder(template_) - .mergeFrom(value) - .buildPartial(); - } else { - template_ = value; - } - onChanged(); - } else { - templateBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearTemplate() { - if (templateBuilder_ == null) { - template_ = null; - onChanged(); - } else { - template_ = null; - templateBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplate, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder>( - getTemplate(), getParentForChildren(), isClean()); - template_ = null; - } - return templateBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.UpdateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateWorkflowTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateWorkflowTemplateRequest(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.dataproc.v1.UpdateWorkflowTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 0d428c4a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface UpdateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the template field is set. - */ - boolean hasTemplate(); - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder getTemplateOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidation.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidation.java deleted file mode 100644 index 18e6f135..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidation.java +++ /dev/null @@ -1,735 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Validation based on a list of allowed values.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ValueValidation} - */ -public final class ValueValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.ValueValidation) - ValueValidationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValueValidation.newBuilder() to construct. - private ValueValidation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ValueValidation() { - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValueValidation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ValueValidation( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - values_.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)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ValueValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ValueValidation.class, - com.google.cloud.dataproc.v1.ValueValidation.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList values_; - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_; - } - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.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 < values_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < values_.size(); i++) { - dataSize += computeStringSizeNoTag(values_.getRaw(i)); - } - size += dataSize; - size += 1 * getValuesList().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.dataproc.v1.ValueValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.ValueValidation other = - (com.google.cloud.dataproc.v1.ValueValidation) obj; - - if (!getValuesList().equals(other.getValuesList())) 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 (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.ValueValidation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ValueValidation 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.dataproc.v1.ValueValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ValueValidation parseFrom( - 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.dataproc.v1.ValueValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.ValueValidation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.ValueValidation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ValueValidation 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.dataproc.v1.ValueValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ValueValidation 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.dataproc.v1.ValueValidation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.ValueValidation 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.dataproc.v1.ValueValidation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.ValueValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.ValueValidation) - com.google.cloud.dataproc.v1.ValueValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ValueValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.ValueValidation.class, - com.google.cloud.dataproc.v1.ValueValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.ValueValidation.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(); - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidation build() { - com.google.cloud.dataproc.v1.ValueValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.ValueValidation buildPartial() { - com.google.cloud.dataproc.v1.ValueValidation result = - new com.google.cloud.dataproc.v1.ValueValidation(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - values_ = values_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - 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.dataproc.v1.ValueValidation) { - return mergeFrom((com.google.cloud.dataproc.v1.ValueValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.ValueValidation other) { - if (other == com.google.cloud.dataproc.v1.ValueValidation.getDefaultInstance()) return this; - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - 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.dataproc.v1.ValueValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.ValueValidation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList values_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(values_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the values. - */ - public com.google.protobuf.ProtocolStringList getValuesList() { - return values_.getUnmodifiableView(); - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - public java.lang.String getValues(int index) { - return values_.get(index); - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - public com.google.protobuf.ByteString getValuesBytes(int index) { - return values_.getByteString(index); - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index to set the value at. - * @param value The values to set. - * @return This builder for chaining. - */ - public Builder setValues(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The values to add. - * @return This builder for chaining. - */ - public Builder addValues(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param values The values to add. - * @return This builder for chaining. - */ - public Builder addAllValues(java.lang.Iterable values) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearValues() { - values_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes of the values to add. - * @return This builder for chaining. - */ - public Builder addValuesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureValuesIsMutable(); - values_.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.dataproc.v1.ValueValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.ValueValidation) - private static final com.google.cloud.dataproc.v1.ValueValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.ValueValidation(); - } - - public static com.google.cloud.dataproc.v1.ValueValidation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueValidation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ValueValidation(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.dataproc.v1.ValueValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidationOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidationOrBuilder.java deleted file mode 100644 index 21355838..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidationOrBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface ValueValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.ValueValidation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The count of values. - */ - int getValuesCount(); - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the element to return. - * @return The values at the given index. - */ - java.lang.String getValues(int index); - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param index The index of the value to return. - * @return The bytes of the values at the given index. - */ - com.google.protobuf.ByteString getValuesBytes(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java deleted file mode 100644 index 808a0cc1..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfig.java +++ /dev/null @@ -1,1698 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Dataproc cluster config for a cluster that does not directly control the
- * underlying compute resources, such as a [Dataproc-on-GKE
- * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.VirtualClusterConfig} - */ -public final class VirtualClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.VirtualClusterConfig) - VirtualClusterConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use VirtualClusterConfig.newBuilder() to construct. - private VirtualClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VirtualClusterConfig() { - stagingBucket_ = ""; - tempBucket_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VirtualClusterConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VirtualClusterConfig( - 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(); - - stagingBucket_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tempBucket_ = s; - break; - } - case 50: - { - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder subBuilder = null; - if (infrastructureConfigCase_ == 6) { - subBuilder = - ((com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_) - .toBuilder(); - } - infrastructureConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.KubernetesClusterConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_); - infrastructureConfig_ = subBuilder.buildPartial(); - } - infrastructureConfigCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder subBuilder = null; - if (auxiliaryServicesConfig_ != null) { - subBuilder = auxiliaryServicesConfig_.toBuilder(); - } - auxiliaryServicesConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(auxiliaryServicesConfig_); - auxiliaryServicesConfig_ = 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.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.VirtualClusterConfig.class, - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder.class); - } - - private int infrastructureConfigCase_ = 0; - private java.lang.Object infrastructureConfig_; - - public enum InfrastructureConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - KUBERNETES_CLUSTER_CONFIG(6), - INFRASTRUCTURECONFIG_NOT_SET(0); - private final int value; - - private InfrastructureConfigCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static InfrastructureConfigCase valueOf(int value) { - return forNumber(value); - } - - public static InfrastructureConfigCase forNumber(int value) { - switch (value) { - case 6: - return KUBERNETES_CLUSTER_CONFIG; - case 0: - return INFRASTRUCTURECONFIG_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public InfrastructureConfigCase getInfrastructureConfigCase() { - return InfrastructureConfigCase.forNumber(infrastructureConfigCase_); - } - - public static final int STAGING_BUCKET_FIELD_NUMBER = 1; - private volatile java.lang.Object stagingBucket_; - /** - * - * - *
-   * Optional. A Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stagingBucket. - */ - @java.lang.Override - public java.lang.String getStagingBucket() { - java.lang.Object ref = stagingBucket_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stagingBucket_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stagingBucket. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStagingBucketBytes() { - java.lang.Object ref = stagingBucket_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stagingBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TEMP_BUCKET_FIELD_NUMBER = 2; - private volatile java.lang.Object tempBucket_; - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - @java.lang.Override - public java.lang.String getTempBucket() { - java.lang.Object ref = tempBucket_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tempBucket_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTempBucketBytes() { - java.lang.Object ref = tempBucket_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tempBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KUBERNETES_CLUSTER_CONFIG_FIELD_NUMBER = 6; - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the kubernetesClusterConfig field is set. - */ - @java.lang.Override - public boolean hasKubernetesClusterConfig() { - return infrastructureConfigCase_ == 6; - } - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The kubernetesClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfig getKubernetesClusterConfig() { - if (infrastructureConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_; - } - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder - getKubernetesClusterConfigOrBuilder() { - if (infrastructureConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_; - } - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - - public static final int AUXILIARY_SERVICES_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliaryServicesConfig_; - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the auxiliaryServicesConfig field is set. - */ - @java.lang.Override - public boolean hasAuxiliaryServicesConfig() { - return auxiliaryServicesConfig_ != null; - } - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The auxiliaryServicesConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig getAuxiliaryServicesConfig() { - return auxiliaryServicesConfig_ == null - ? com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.getDefaultInstance() - : auxiliaryServicesConfig_; - } - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder - getAuxiliaryServicesConfigOrBuilder() { - return getAuxiliaryServicesConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stagingBucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stagingBucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempBucket_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tempBucket_); - } - if (infrastructureConfigCase_ == 6) { - output.writeMessage( - 6, (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_); - } - if (auxiliaryServicesConfig_ != null) { - output.writeMessage(7, getAuxiliaryServicesConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stagingBucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stagingBucket_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempBucket_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tempBucket_); - } - if (infrastructureConfigCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_); - } - if (auxiliaryServicesConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAuxiliaryServicesConfig()); - } - 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.dataproc.v1.VirtualClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.VirtualClusterConfig other = - (com.google.cloud.dataproc.v1.VirtualClusterConfig) obj; - - if (!getStagingBucket().equals(other.getStagingBucket())) return false; - if (!getTempBucket().equals(other.getTempBucket())) return false; - if (hasAuxiliaryServicesConfig() != other.hasAuxiliaryServicesConfig()) return false; - if (hasAuxiliaryServicesConfig()) { - if (!getAuxiliaryServicesConfig().equals(other.getAuxiliaryServicesConfig())) return false; - } - if (!getInfrastructureConfigCase().equals(other.getInfrastructureConfigCase())) return false; - switch (infrastructureConfigCase_) { - case 6: - if (!getKubernetesClusterConfig().equals(other.getKubernetesClusterConfig())) return false; - break; - case 0: - default: - } - 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) + STAGING_BUCKET_FIELD_NUMBER; - hash = (53 * hash) + getStagingBucket().hashCode(); - hash = (37 * hash) + TEMP_BUCKET_FIELD_NUMBER; - hash = (53 * hash) + getTempBucket().hashCode(); - if (hasAuxiliaryServicesConfig()) { - hash = (37 * hash) + AUXILIARY_SERVICES_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getAuxiliaryServicesConfig().hashCode(); - } - switch (infrastructureConfigCase_) { - case 6: - hash = (37 * hash) + KUBERNETES_CLUSTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKubernetesClusterConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig 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.dataproc.v1.VirtualClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig parseFrom( - 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.dataproc.v1.VirtualClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig 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.dataproc.v1.VirtualClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig 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.dataproc.v1.VirtualClusterConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig 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.dataproc.v1.VirtualClusterConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Dataproc cluster config for a cluster that does not directly control the
-   * underlying compute resources, such as a [Dataproc-on-GKE
-   * cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.VirtualClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.VirtualClusterConfig) - com.google.cloud.dataproc.v1.VirtualClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.VirtualClusterConfig.class, - com.google.cloud.dataproc.v1.VirtualClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.VirtualClusterConfig.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(); - stagingBucket_ = ""; - - tempBucket_ = ""; - - if (auxiliaryServicesConfigBuilder_ == null) { - auxiliaryServicesConfig_ = null; - } else { - auxiliaryServicesConfig_ = null; - auxiliaryServicesConfigBuilder_ = null; - } - infrastructureConfigCase_ = 0; - infrastructureConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.ClustersProto - .internal_static_google_cloud_dataproc_v1_VirtualClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.VirtualClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.VirtualClusterConfig build() { - com.google.cloud.dataproc.v1.VirtualClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.VirtualClusterConfig buildPartial() { - com.google.cloud.dataproc.v1.VirtualClusterConfig result = - new com.google.cloud.dataproc.v1.VirtualClusterConfig(this); - result.stagingBucket_ = stagingBucket_; - result.tempBucket_ = tempBucket_; - if (infrastructureConfigCase_ == 6) { - if (kubernetesClusterConfigBuilder_ == null) { - result.infrastructureConfig_ = infrastructureConfig_; - } else { - result.infrastructureConfig_ = kubernetesClusterConfigBuilder_.build(); - } - } - if (auxiliaryServicesConfigBuilder_ == null) { - result.auxiliaryServicesConfig_ = auxiliaryServicesConfig_; - } else { - result.auxiliaryServicesConfig_ = auxiliaryServicesConfigBuilder_.build(); - } - result.infrastructureConfigCase_ = infrastructureConfigCase_; - 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.dataproc.v1.VirtualClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1.VirtualClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.VirtualClusterConfig other) { - if (other == com.google.cloud.dataproc.v1.VirtualClusterConfig.getDefaultInstance()) - return this; - if (!other.getStagingBucket().isEmpty()) { - stagingBucket_ = other.stagingBucket_; - onChanged(); - } - if (!other.getTempBucket().isEmpty()) { - tempBucket_ = other.tempBucket_; - onChanged(); - } - if (other.hasAuxiliaryServicesConfig()) { - mergeAuxiliaryServicesConfig(other.getAuxiliaryServicesConfig()); - } - switch (other.getInfrastructureConfigCase()) { - case KUBERNETES_CLUSTER_CONFIG: - { - mergeKubernetesClusterConfig(other.getKubernetesClusterConfig()); - break; - } - case INFRASTRUCTURECONFIG_NOT_SET: - { - break; - } - } - 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.dataproc.v1.VirtualClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.VirtualClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int infrastructureConfigCase_ = 0; - private java.lang.Object infrastructureConfig_; - - public InfrastructureConfigCase getInfrastructureConfigCase() { - return InfrastructureConfigCase.forNumber(infrastructureConfigCase_); - } - - public Builder clearInfrastructureConfig() { - infrastructureConfigCase_ = 0; - infrastructureConfig_ = null; - onChanged(); - return this; - } - - private java.lang.Object stagingBucket_ = ""; - /** - * - * - *
-     * Optional. A Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stagingBucket. - */ - public java.lang.String getStagingBucket() { - java.lang.Object ref = stagingBucket_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stagingBucket_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stagingBucket. - */ - public com.google.protobuf.ByteString getStagingBucketBytes() { - java.lang.Object ref = stagingBucket_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stagingBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The stagingBucket to set. - * @return This builder for chaining. - */ - public Builder setStagingBucket(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stagingBucket_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearStagingBucket() { - - stagingBucket_ = getDefaultInstance().getStagingBucket(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Storage bucket used to stage job
-     * dependencies, config files, and job driver console output.
-     * If you do not specify a staging bucket, Cloud
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's staging bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for stagingBucket to set. - * @return This builder for chaining. - */ - public Builder setStagingBucketBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stagingBucket_ = value; - onChanged(); - return this; - } - - private java.lang.Object tempBucket_ = ""; - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - public java.lang.String getTempBucket() { - java.lang.Object ref = tempBucket_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tempBucket_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - public com.google.protobuf.ByteString getTempBucketBytes() { - java.lang.Object ref = tempBucket_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tempBucket_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The tempBucket to set. - * @return This builder for chaining. - */ - public Builder setTempBucket(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tempBucket_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTempBucket() { - - tempBucket_ = getDefaultInstance().getTempBucket(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-     * such as Spark and MapReduce history files.
-     * If you do not specify a temp bucket,
-     * Dataproc will determine a Cloud Storage location (US,
-     * ASIA, or EU) for your cluster's temp bucket according to the
-     * Compute Engine zone where your cluster is deployed, and then create
-     * and manage this project-level, per-location bucket. The default bucket has
-     * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-     * bucket (see
-     * [Dataproc staging and temp
-     * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-     * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-     * a Cloud Storage bucket.**
-     * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for tempBucket to set. - * @return This builder for chaining. - */ - public Builder setTempBucketBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tempBucket_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesClusterConfig, - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder> - kubernetesClusterConfigBuilder_; - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the kubernetesClusterConfig field is set. - */ - @java.lang.Override - public boolean hasKubernetesClusterConfig() { - return infrastructureConfigCase_ == 6; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The kubernetesClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfig getKubernetesClusterConfig() { - if (kubernetesClusterConfigBuilder_ == null) { - if (infrastructureConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_; - } - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } else { - if (infrastructureConfigCase_ == 6) { - return kubernetesClusterConfigBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setKubernetesClusterConfig( - com.google.cloud.dataproc.v1.KubernetesClusterConfig value) { - if (kubernetesClusterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infrastructureConfig_ = value; - onChanged(); - } else { - kubernetesClusterConfigBuilder_.setMessage(value); - } - infrastructureConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setKubernetesClusterConfig( - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder builderForValue) { - if (kubernetesClusterConfigBuilder_ == null) { - infrastructureConfig_ = builderForValue.build(); - onChanged(); - } else { - kubernetesClusterConfigBuilder_.setMessage(builderForValue.build()); - } - infrastructureConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeKubernetesClusterConfig( - com.google.cloud.dataproc.v1.KubernetesClusterConfig value) { - if (kubernetesClusterConfigBuilder_ == null) { - if (infrastructureConfigCase_ == 6 - && infrastructureConfig_ - != com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance()) { - infrastructureConfig_ = - com.google.cloud.dataproc.v1.KubernetesClusterConfig.newBuilder( - (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - infrastructureConfig_ = value; - } - onChanged(); - } else { - if (infrastructureConfigCase_ == 6) { - kubernetesClusterConfigBuilder_.mergeFrom(value); - } - kubernetesClusterConfigBuilder_.setMessage(value); - } - infrastructureConfigCase_ = 6; - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearKubernetesClusterConfig() { - if (kubernetesClusterConfigBuilder_ == null) { - if (infrastructureConfigCase_ == 6) { - infrastructureConfigCase_ = 0; - infrastructureConfig_ = null; - onChanged(); - } - } else { - if (infrastructureConfigCase_ == 6) { - infrastructureConfigCase_ = 0; - infrastructureConfig_ = null; - } - kubernetesClusterConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder - getKubernetesClusterConfigBuilder() { - return getKubernetesClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder - getKubernetesClusterConfigOrBuilder() { - if ((infrastructureConfigCase_ == 6) && (kubernetesClusterConfigBuilder_ != null)) { - return kubernetesClusterConfigBuilder_.getMessageOrBuilder(); - } else { - if (infrastructureConfigCase_ == 6) { - return (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_; - } - return com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * Required. The configuration for running the Dataproc cluster on Kubernetes.
-     * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesClusterConfig, - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder> - getKubernetesClusterConfigFieldBuilder() { - if (kubernetesClusterConfigBuilder_ == null) { - if (!(infrastructureConfigCase_ == 6)) { - infrastructureConfig_ = - com.google.cloud.dataproc.v1.KubernetesClusterConfig.getDefaultInstance(); - } - kubernetesClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.KubernetesClusterConfig, - com.google.cloud.dataproc.v1.KubernetesClusterConfig.Builder, - com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder>( - (com.google.cloud.dataproc.v1.KubernetesClusterConfig) infrastructureConfig_, - getParentForChildren(), - isClean()); - infrastructureConfig_ = null; - } - infrastructureConfigCase_ = 6; - onChanged(); - ; - return kubernetesClusterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliaryServicesConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder> - auxiliaryServicesConfigBuilder_; - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the auxiliaryServicesConfig field is set. - */ - public boolean hasAuxiliaryServicesConfig() { - return auxiliaryServicesConfigBuilder_ != null || auxiliaryServicesConfig_ != null; - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The auxiliaryServicesConfig. - */ - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig getAuxiliaryServicesConfig() { - if (auxiliaryServicesConfigBuilder_ == null) { - return auxiliaryServicesConfig_ == null - ? com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.getDefaultInstance() - : auxiliaryServicesConfig_; - } else { - return auxiliaryServicesConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAuxiliaryServicesConfig( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig value) { - if (auxiliaryServicesConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - auxiliaryServicesConfig_ = value; - onChanged(); - } else { - auxiliaryServicesConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAuxiliaryServicesConfig( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder builderForValue) { - if (auxiliaryServicesConfigBuilder_ == null) { - auxiliaryServicesConfig_ = builderForValue.build(); - onChanged(); - } else { - auxiliaryServicesConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAuxiliaryServicesConfig( - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig value) { - if (auxiliaryServicesConfigBuilder_ == null) { - if (auxiliaryServicesConfig_ != null) { - auxiliaryServicesConfig_ = - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.newBuilder( - auxiliaryServicesConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - auxiliaryServicesConfig_ = value; - } - onChanged(); - } else { - auxiliaryServicesConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAuxiliaryServicesConfig() { - if (auxiliaryServicesConfigBuilder_ == null) { - auxiliaryServicesConfig_ = null; - onChanged(); - } else { - auxiliaryServicesConfig_ = null; - auxiliaryServicesConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder - getAuxiliaryServicesConfigBuilder() { - - onChanged(); - return getAuxiliaryServicesConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder - getAuxiliaryServicesConfigOrBuilder() { - if (auxiliaryServicesConfigBuilder_ != null) { - return auxiliaryServicesConfigBuilder_.getMessageOrBuilder(); - } else { - return auxiliaryServicesConfig_ == null - ? com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.getDefaultInstance() - : auxiliaryServicesConfig_; - } - } - /** - * - * - *
-     * Optional. Configuration of auxiliary services used by this cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder> - getAuxiliaryServicesConfigFieldBuilder() { - if (auxiliaryServicesConfigBuilder_ == null) { - auxiliaryServicesConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig.Builder, - com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder>( - getAuxiliaryServicesConfig(), getParentForChildren(), isClean()); - auxiliaryServicesConfig_ = null; - } - return auxiliaryServicesConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.VirtualClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.VirtualClusterConfig) - private static final com.google.cloud.dataproc.v1.VirtualClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.VirtualClusterConfig(); - } - - public static com.google.cloud.dataproc.v1.VirtualClusterConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VirtualClusterConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VirtualClusterConfig(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.dataproc.v1.VirtualClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java deleted file mode 100644 index cd4563e8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/VirtualClusterConfigOrBuilder.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/clusters.proto - -package com.google.cloud.dataproc.v1; - -public interface VirtualClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.VirtualClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The stagingBucket. - */ - java.lang.String getStagingBucket(); - /** - * - * - *
-   * Optional. A Storage bucket used to stage job
-   * dependencies, config files, and job driver console output.
-   * If you do not specify a staging bucket, Cloud
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's staging bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string staging_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for stagingBucket. - */ - com.google.protobuf.ByteString getStagingBucketBytes(); - - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The tempBucket. - */ - java.lang.String getTempBucket(); - /** - * - * - *
-   * Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
-   * such as Spark and MapReduce history files.
-   * If you do not specify a temp bucket,
-   * Dataproc will determine a Cloud Storage location (US,
-   * ASIA, or EU) for your cluster's temp bucket according to the
-   * Compute Engine zone where your cluster is deployed, and then create
-   * and manage this project-level, per-location bucket. The default bucket has
-   * a TTL of 90 days, but you can use any TTL (or none) if you specify a
-   * bucket (see
-   * [Dataproc staging and temp
-   * buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * **This field requires a Cloud Storage bucket name, not a `gs://...` URI to
-   * a Cloud Storage bucket.**
-   * 
- * - * string temp_bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for tempBucket. - */ - com.google.protobuf.ByteString getTempBucketBytes(); - - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the kubernetesClusterConfig field is set. - */ - boolean hasKubernetesClusterConfig(); - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The kubernetesClusterConfig. - */ - com.google.cloud.dataproc.v1.KubernetesClusterConfig getKubernetesClusterConfig(); - /** - * - * - *
-   * Required. The configuration for running the Dataproc cluster on Kubernetes.
-   * 
- * - * - * .google.cloud.dataproc.v1.KubernetesClusterConfig kubernetes_cluster_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.KubernetesClusterConfigOrBuilder - getKubernetesClusterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the auxiliaryServicesConfig field is set. - */ - boolean hasAuxiliaryServicesConfig(); - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The auxiliaryServicesConfig. - */ - com.google.cloud.dataproc.v1.AuxiliaryServicesConfig getAuxiliaryServicesConfig(); - /** - * - * - *
-   * Optional. Configuration of auxiliary services used by this cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1.AuxiliaryServicesConfig auxiliary_services_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.AuxiliaryServicesConfigOrBuilder - getAuxiliaryServicesConfigOrBuilder(); - - public com.google.cloud.dataproc.v1.VirtualClusterConfig.InfrastructureConfigCase - getInfrastructureConfigCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraph.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraph.java deleted file mode 100644 index 48b82a3d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraph.java +++ /dev/null @@ -1,992 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The workflow graph.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowGraph} - */ -public final class WorkflowGraph extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.WorkflowGraph) - WorkflowGraphOrBuilder { - private static final long serialVersionUID = 0L; - // Use WorkflowGraph.newBuilder() to construct. - private WorkflowGraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private WorkflowGraph() { - nodes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new WorkflowGraph(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private WorkflowGraph( - 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)) { - nodes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodes_.add( - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowNode.parser(), extensionRegistry)); - 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)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowGraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowGraph.class, - com.google.cloud.dataproc.v1.WorkflowGraph.Builder.class); - } - - public static final int NODES_FIELD_NUMBER = 1; - private java.util.List nodes_; - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List getNodesList() { - return nodes_; - } - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.List - getNodesOrBuilderList() { - return nodes_; - } - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public int getNodesCount() { - return nodes_.size(); - } - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode getNodes(int index) { - return nodes_.get(index); - } - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder getNodesOrBuilder(int index) { - return nodes_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < nodes_.size(); i++) { - output.writeMessage(1, nodes_.get(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 < nodes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nodes_.get(i)); - } - 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.dataproc.v1.WorkflowGraph)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.WorkflowGraph other = - (com.google.cloud.dataproc.v1.WorkflowGraph) obj; - - if (!getNodesList().equals(other.getNodesList())) 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 (getNodesCount() > 0) { - hash = (37 * hash) + NODES_FIELD_NUMBER; - hash = (53 * hash) + getNodesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph 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.dataproc.v1.WorkflowGraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph parseFrom( - 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.dataproc.v1.WorkflowGraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph 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.dataproc.v1.WorkflowGraph parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph 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.dataproc.v1.WorkflowGraph parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph 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.dataproc.v1.WorkflowGraph prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 workflow graph.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowGraph} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.WorkflowGraph) - com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowGraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowGraph.class, - com.google.cloud.dataproc.v1.WorkflowGraph.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.WorkflowGraph.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getNodesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - nodesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowGraph getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.WorkflowGraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowGraph build() { - com.google.cloud.dataproc.v1.WorkflowGraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowGraph buildPartial() { - com.google.cloud.dataproc.v1.WorkflowGraph result = - new com.google.cloud.dataproc.v1.WorkflowGraph(this); - int from_bitField0_ = bitField0_; - if (nodesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - nodes_ = java.util.Collections.unmodifiableList(nodes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.nodes_ = nodes_; - } else { - result.nodes_ = nodesBuilder_.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.dataproc.v1.WorkflowGraph) { - return mergeFrom((com.google.cloud.dataproc.v1.WorkflowGraph) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.WorkflowGraph other) { - if (other == com.google.cloud.dataproc.v1.WorkflowGraph.getDefaultInstance()) return this; - if (nodesBuilder_ == null) { - if (!other.nodes_.isEmpty()) { - if (nodes_.isEmpty()) { - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNodesIsMutable(); - nodes_.addAll(other.nodes_); - } - onChanged(); - } - } else { - if (!other.nodes_.isEmpty()) { - if (nodesBuilder_.isEmpty()) { - nodesBuilder_.dispose(); - nodesBuilder_ = null; - nodes_ = other.nodes_; - bitField0_ = (bitField0_ & ~0x00000001); - nodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNodesFieldBuilder() - : null; - } else { - nodesBuilder_.addAllMessages(other.nodes_); - } - } - } - 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.dataproc.v1.WorkflowGraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.WorkflowGraph) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List nodes_ = - java.util.Collections.emptyList(); - - private void ensureNodesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - nodes_ = new java.util.ArrayList(nodes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowNode, - com.google.cloud.dataproc.v1.WorkflowNode.Builder, - com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder> - nodesBuilder_; - - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getNodesList() { - if (nodesBuilder_ == null) { - return java.util.Collections.unmodifiableList(nodes_); - } else { - return nodesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public int getNodesCount() { - if (nodesBuilder_ == null) { - return nodes_.size(); - } else { - return nodesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowNode getNodes(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNodes(int index, com.google.cloud.dataproc.v1.WorkflowNode value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.set(index, value); - onChanged(); - } else { - nodesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNodes( - int index, com.google.cloud.dataproc.v1.WorkflowNode.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.set(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes(com.google.cloud.dataproc.v1.WorkflowNode value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(value); - onChanged(); - } else { - nodesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes(int index, com.google.cloud.dataproc.v1.WorkflowNode value) { - if (nodesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNodesIsMutable(); - nodes_.add(index, value); - onChanged(); - } else { - nodesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes(com.google.cloud.dataproc.v1.WorkflowNode.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes( - int index, com.google.cloud.dataproc.v1.WorkflowNode.Builder builderForValue) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.add(index, builderForValue.build()); - onChanged(); - } else { - nodesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addAllNodes( - java.lang.Iterable values) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); - onChanged(); - } else { - nodesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearNodes() { - if (nodesBuilder_ == null) { - nodes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - nodesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder removeNodes(int index) { - if (nodesBuilder_ == null) { - ensureNodesIsMutable(); - nodes_.remove(index); - onChanged(); - } else { - nodesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowNode.Builder getNodesBuilder(int index) { - return getNodesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder getNodesOrBuilder(int index) { - if (nodesBuilder_ == null) { - return nodes_.get(index); - } else { - return nodesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List - getNodesOrBuilderList() { - if (nodesBuilder_ != null) { - return nodesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nodes_); - } - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowNode.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.WorkflowNode.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowNode.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.WorkflowNode.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public java.util.List getNodesBuilderList() { - return getNodesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowNode, - com.google.cloud.dataproc.v1.WorkflowNode.Builder, - com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowNode, - com.google.cloud.dataproc.v1.WorkflowNode.Builder, - com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder>( - nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - nodes_ = null; - } - return nodesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.WorkflowGraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.WorkflowGraph) - private static final com.google.cloud.dataproc.v1.WorkflowGraph DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.WorkflowGraph(); - } - - public static com.google.cloud.dataproc.v1.WorkflowGraph getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WorkflowGraph parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WorkflowGraph(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.dataproc.v1.WorkflowGraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraphOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraphOrBuilder.java deleted file mode 100644 index c1aefd7f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraphOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface WorkflowGraphOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.WorkflowGraph) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getNodesList(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.WorkflowNode getNodes(int index); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getNodesCount(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getNodesOrBuilderList(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder getNodesOrBuilder(int index); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadata.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadata.java deleted file mode 100644 index 81adc0ed..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadata.java +++ /dev/null @@ -1,4202 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc workflow template resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowMetadata} - */ -public final class WorkflowMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.WorkflowMetadata) - WorkflowMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use WorkflowMetadata.newBuilder() to construct. - private WorkflowMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private WorkflowMetadata() { - template_ = ""; - state_ = 0; - clusterName_ = ""; - clusterUuid_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new WorkflowMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private WorkflowMetadata( - 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(); - - template_ = s; - break; - } - case 16: - { - version_ = input.readInt32(); - break; - } - case 26: - { - com.google.cloud.dataproc.v1.ClusterOperation.Builder subBuilder = null; - if (createCluster_ != null) { - subBuilder = createCluster_.toBuilder(); - } - createCluster_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterOperation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createCluster_); - createCluster_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.dataproc.v1.WorkflowGraph.Builder subBuilder = null; - if (graph_ != null) { - subBuilder = graph_.toBuilder(); - } - graph_ = - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowGraph.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(graph_); - graph_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataproc.v1.ClusterOperation.Builder subBuilder = null; - if (deleteCluster_ != null) { - subBuilder = deleteCluster_.toBuilder(); - } - deleteCluster_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterOperation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteCluster_); - deleteCluster_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterName_ = s; - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - parameters_ = - com.google.protobuf.MapField.newMapField( - ParametersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry parameters__ = - input.readMessage( - ParametersDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - parameters_.getMutableMap().put(parameters__.getKey(), parameters__.getValue()); - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - 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 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterUuid_ = s; - break; - } - case 98: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (dagTimeout_ != null) { - subBuilder = dagTimeout_.toBuilder(); - } - dagTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dagTimeout_); - dagTimeout_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (dagStartTime_ != null) { - subBuilder = dagStartTime_.toBuilder(); - } - dagStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dagStartTime_); - dagStartTime_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (dagEndTime_ != null) { - subBuilder = dagEndTime_.toBuilder(); - } - dagEndTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dagEndTime_); - dagEndTime_ = 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowMetadata.class, - com.google.cloud.dataproc.v1.WorkflowMetadata.Builder.class); - } - - /** - * - * - *
-   * The operation state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.WorkflowMetadata.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Unused.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - * - * - *
-     * The operation has been created.
-     * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - * - * - *
-     * The operation is running.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The operation is done; either cancelled or completed.
-     * 
- * - * DONE = 3; - */ - DONE(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Unused.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - * - * - *
-     * The operation has been created.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - * - * - *
-     * The operation is running.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - * - * - *
-     * The operation is done; either cancelled or completed.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_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 UNKNOWN; - case 1: - return PENDING; - case 2: - return RUNNING; - case 3: - return DONE; - 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.dataproc.v1.WorkflowMetadata.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.WorkflowMetadata.State) - } - - public static final int TEMPLATE_FIELD_NUMBER = 1; - private volatile java.lang.Object template_; - /** - * - * - *
-   * Output only. The resource name of the workflow template as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The template. - */ - @java.lang.Override - public java.lang.String getTemplate() { - java.lang.Object ref = template_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - template_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name of the workflow template as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for template. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTemplateBytes() { - java.lang.Object ref = template_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - template_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private int version_; - /** - * - * - *
-   * Output only. The version of template at the time of
-   * workflow instantiation.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int CREATE_CLUSTER_FIELD_NUMBER = 3; - private com.google.cloud.dataproc.v1.ClusterOperation createCluster_; - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createCluster field is set. - */ - @java.lang.Override - public boolean hasCreateCluster() { - return createCluster_ != null; - } - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperation getCreateCluster() { - return createCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : createCluster_; - } - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getCreateClusterOrBuilder() { - return getCreateCluster(); - } - - public static final int GRAPH_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1.WorkflowGraph graph_; - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the graph field is set. - */ - @java.lang.Override - public boolean hasGraph() { - return graph_ != null; - } - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowGraph getGraph() { - return graph_ == null - ? com.google.cloud.dataproc.v1.WorkflowGraph.getDefaultInstance() - : graph_; - } - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder getGraphOrBuilder() { - return getGraph(); - } - - public static final int DELETE_CLUSTER_FIELD_NUMBER = 5; - private com.google.cloud.dataproc.v1.ClusterOperation deleteCluster_; - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteCluster field is set. - */ - @java.lang.Override - public boolean hasDeleteCluster() { - return deleteCluster_ != null; - } - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperation getDeleteCluster() { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getDeleteClusterOrBuilder() { - return getDeleteCluster(); - } - - public static final int STATE_FIELD_NUMBER = 6; - private int state_; - /** - * - * - *
-   * Output only. The workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.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 workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.WorkflowMetadata.State result = - com.google.cloud.dataproc.v1.WorkflowMetadata.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.WorkflowMetadata.State.UNRECOGNIZED - : result; - } - - public static final int CLUSTER_NAME_FIELD_NUMBER = 7; - private volatile java.lang.Object clusterName_; - /** - * - * - *
-   * Output only. The name of the target cluster.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - @java.lang.Override - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the target cluster.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMETERS_FIELD_NUMBER = 8; - - private static final class ParametersDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField parameters_; - - private com.google.protobuf.MapField internalGetParameters() { - if (parameters_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParametersDefaultEntryHolder.defaultEntry); - } - return parameters_; - } - - public int getParametersCount() { - return internalGetParameters().getMap().size(); - } - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public boolean containsParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParameters().getMap().containsKey(key); - } - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParameters() { - return getParametersMap(); - } - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.util.Map getParametersMap() { - return internalGetParameters().getMap(); - } - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.lang.String getParametersOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.lang.String getParametersOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int START_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 10; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int CLUSTER_UUID_FIELD_NUMBER = 11; - private volatile java.lang.Object clusterUuid_; - /** - * - * - *
-   * Output only. The UUID of target cluster.
-   * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - @java.lang.Override - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The UUID of target cluster.
-   * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DAG_TIMEOUT_FIELD_NUMBER = 12; - private com.google.protobuf.Duration dagTimeout_; - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagTimeout field is set. - */ - @java.lang.Override - public boolean hasDagTimeout() { - return dagTimeout_ != null; - } - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getDagTimeout() { - return dagTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : dagTimeout_; - } - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder() { - return getDagTimeout(); - } - - public static final int DAG_START_TIME_FIELD_NUMBER = 13; - private com.google.protobuf.Timestamp dagStartTime_; - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagStartTime field is set. - */ - @java.lang.Override - public boolean hasDagStartTime() { - return dagStartTime_ != null; - } - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagStartTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDagStartTime() { - return dagStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : dagStartTime_; - } - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDagStartTimeOrBuilder() { - return getDagStartTime(); - } - - public static final int DAG_END_TIME_FIELD_NUMBER = 14; - private com.google.protobuf.Timestamp dagEndTime_; - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagEndTime field is set. - */ - @java.lang.Override - public boolean hasDagEndTime() { - return dagEndTime_ != null; - } - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagEndTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDagEndTime() { - return dagEndTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dagEndTime_; - } - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDagEndTimeOrBuilder() { - return getDagEndTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(template_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, template_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - if (createCluster_ != null) { - output.writeMessage(3, getCreateCluster()); - } - if (graph_ != null) { - output.writeMessage(4, getGraph()); - } - if (deleteCluster_ != null) { - output.writeMessage(5, getDeleteCluster()); - } - if (state_ != com.google.cloud.dataproc.v1.WorkflowMetadata.State.UNKNOWN.getNumber()) { - output.writeEnum(6, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, clusterName_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 8); - if (startTime_ != null) { - output.writeMessage(9, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(10, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, clusterUuid_); - } - if (dagTimeout_ != null) { - output.writeMessage(12, getDagTimeout()); - } - if (dagStartTime_ != null) { - output.writeMessage(13, getDagStartTime()); - } - if (dagEndTime_ != null) { - output.writeMessage(14, getDagEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(template_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, template_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - if (createCluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateCluster()); - } - if (graph_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGraph()); - } - if (deleteCluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeleteCluster()); - } - if (state_ != com.google.cloud.dataproc.v1.WorkflowMetadata.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, clusterName_); - } - for (java.util.Map.Entry entry : - internalGetParameters().getMap().entrySet()) { - com.google.protobuf.MapEntry parameters__ = - ParametersDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, parameters__); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterUuid_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, clusterUuid_); - } - if (dagTimeout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDagTimeout()); - } - if (dagStartTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getDagStartTime()); - } - if (dagEndTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getDagEndTime()); - } - 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.dataproc.v1.WorkflowMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.WorkflowMetadata other = - (com.google.cloud.dataproc.v1.WorkflowMetadata) obj; - - if (!getTemplate().equals(other.getTemplate())) return false; - if (getVersion() != other.getVersion()) return false; - if (hasCreateCluster() != other.hasCreateCluster()) return false; - if (hasCreateCluster()) { - if (!getCreateCluster().equals(other.getCreateCluster())) return false; - } - if (hasGraph() != other.hasGraph()) return false; - if (hasGraph()) { - if (!getGraph().equals(other.getGraph())) return false; - } - if (hasDeleteCluster() != other.hasDeleteCluster()) return false; - if (hasDeleteCluster()) { - if (!getDeleteCluster().equals(other.getDeleteCluster())) return false; - } - if (state_ != other.state_) return false; - if (!getClusterName().equals(other.getClusterName())) return false; - if (!internalGetParameters().equals(other.internalGetParameters())) return false; - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime().equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getClusterUuid().equals(other.getClusterUuid())) return false; - if (hasDagTimeout() != other.hasDagTimeout()) return false; - if (hasDagTimeout()) { - if (!getDagTimeout().equals(other.getDagTimeout())) return false; - } - if (hasDagStartTime() != other.hasDagStartTime()) return false; - if (hasDagStartTime()) { - if (!getDagStartTime().equals(other.getDagStartTime())) return false; - } - if (hasDagEndTime() != other.hasDagEndTime()) return false; - if (hasDagEndTime()) { - if (!getDagEndTime().equals(other.getDagEndTime())) 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) + TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getTemplate().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - if (hasCreateCluster()) { - hash = (37 * hash) + CREATE_CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getCreateCluster().hashCode(); - } - if (hasGraph()) { - hash = (37 * hash) + GRAPH_FIELD_NUMBER; - hash = (53 * hash) + getGraph().hashCode(); - } - if (hasDeleteCluster()) { - hash = (37 * hash) + DELETE_CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getDeleteCluster().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getClusterName().hashCode(); - if (!internalGetParameters().getMap().isEmpty()) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParameters().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + CLUSTER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getClusterUuid().hashCode(); - if (hasDagTimeout()) { - hash = (37 * hash) + DAG_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getDagTimeout().hashCode(); - } - if (hasDagStartTime()) { - hash = (37 * hash) + DAG_START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDagStartTime().hashCode(); - } - if (hasDagEndTime()) { - hash = (37 * hash) + DAG_END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDagEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata 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.dataproc.v1.WorkflowMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata parseFrom( - 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.dataproc.v1.WorkflowMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata 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.dataproc.v1.WorkflowMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata 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.dataproc.v1.WorkflowMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata 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.dataproc.v1.WorkflowMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc workflow template resource.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.WorkflowMetadata) - com.google.cloud.dataproc.v1.WorkflowMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 8: - return internalGetMutableParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowMetadata.class, - com.google.cloud.dataproc.v1.WorkflowMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.WorkflowMetadata.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(); - template_ = ""; - - version_ = 0; - - if (createClusterBuilder_ == null) { - createCluster_ = null; - } else { - createCluster_ = null; - createClusterBuilder_ = null; - } - if (graphBuilder_ == null) { - graph_ = null; - } else { - graph_ = null; - graphBuilder_ = null; - } - if (deleteClusterBuilder_ == null) { - deleteCluster_ = null; - } else { - deleteCluster_ = null; - deleteClusterBuilder_ = null; - } - state_ = 0; - - clusterName_ = ""; - - internalGetMutableParameters().clear(); - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - clusterUuid_ = ""; - - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = null; - } else { - dagTimeout_ = null; - dagTimeoutBuilder_ = null; - } - if (dagStartTimeBuilder_ == null) { - dagStartTime_ = null; - } else { - dagStartTime_ = null; - dagStartTimeBuilder_ = null; - } - if (dagEndTimeBuilder_ == null) { - dagEndTime_ = null; - } else { - dagEndTime_ = null; - dagEndTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.WorkflowMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowMetadata build() { - com.google.cloud.dataproc.v1.WorkflowMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowMetadata buildPartial() { - com.google.cloud.dataproc.v1.WorkflowMetadata result = - new com.google.cloud.dataproc.v1.WorkflowMetadata(this); - int from_bitField0_ = bitField0_; - result.template_ = template_; - result.version_ = version_; - if (createClusterBuilder_ == null) { - result.createCluster_ = createCluster_; - } else { - result.createCluster_ = createClusterBuilder_.build(); - } - if (graphBuilder_ == null) { - result.graph_ = graph_; - } else { - result.graph_ = graphBuilder_.build(); - } - if (deleteClusterBuilder_ == null) { - result.deleteCluster_ = deleteCluster_; - } else { - result.deleteCluster_ = deleteClusterBuilder_.build(); - } - result.state_ = state_; - result.clusterName_ = clusterName_; - result.parameters_ = internalGetParameters(); - result.parameters_.makeImmutable(); - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.clusterUuid_ = clusterUuid_; - if (dagTimeoutBuilder_ == null) { - result.dagTimeout_ = dagTimeout_; - } else { - result.dagTimeout_ = dagTimeoutBuilder_.build(); - } - if (dagStartTimeBuilder_ == null) { - result.dagStartTime_ = dagStartTime_; - } else { - result.dagStartTime_ = dagStartTimeBuilder_.build(); - } - if (dagEndTimeBuilder_ == null) { - result.dagEndTime_ = dagEndTime_; - } else { - result.dagEndTime_ = dagEndTimeBuilder_.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.dataproc.v1.WorkflowMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1.WorkflowMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.WorkflowMetadata other) { - if (other == com.google.cloud.dataproc.v1.WorkflowMetadata.getDefaultInstance()) return this; - if (!other.getTemplate().isEmpty()) { - template_ = other.template_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (other.hasCreateCluster()) { - mergeCreateCluster(other.getCreateCluster()); - } - if (other.hasGraph()) { - mergeGraph(other.getGraph()); - } - if (other.hasDeleteCluster()) { - mergeDeleteCluster(other.getDeleteCluster()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - internalGetMutableParameters().mergeFrom(other.internalGetParameters()); - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - onChanged(); - } - if (other.hasDagTimeout()) { - mergeDagTimeout(other.getDagTimeout()); - } - if (other.hasDagStartTime()) { - mergeDagStartTime(other.getDagStartTime()); - } - if (other.hasDagEndTime()) { - mergeDagEndTime(other.getDagEndTime()); - } - 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.dataproc.v1.WorkflowMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.WorkflowMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object template_ = ""; - /** - * - * - *
-     * Output only. The resource name of the workflow template as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The template. - */ - public java.lang.String getTemplate() { - java.lang.Object ref = template_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - template_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the workflow template as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for template. - */ - public com.google.protobuf.ByteString getTemplateBytes() { - java.lang.Object ref = template_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - template_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The resource name of the workflow template as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The template to set. - * @return This builder for chaining. - */ - public Builder setTemplate(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - template_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the workflow template as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTemplate() { - - template_ = getDefaultInstance().getTemplate(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the workflow template as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for template to set. - * @return This builder for chaining. - */ - public Builder setTemplateBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - template_ = value; - onChanged(); - return this; - } - - private int version_; - /** - * - * - *
-     * Output only. The version of template at the time of
-     * workflow instantiation.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - * - * - *
-     * Output only. The version of template at the time of
-     * workflow instantiation.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The version of template at the time of
-     * workflow instantiation.
-     * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.dataproc.v1.ClusterOperation createCluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder> - createClusterBuilder_; - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createCluster field is set. - */ - public boolean hasCreateCluster() { - return createClusterBuilder_ != null || createCluster_ != null; - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - public com.google.cloud.dataproc.v1.ClusterOperation getCreateCluster() { - if (createClusterBuilder_ == null) { - return createCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : createCluster_; - } else { - return createClusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateCluster(com.google.cloud.dataproc.v1.ClusterOperation value) { - if (createClusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createCluster_ = value; - onChanged(); - } else { - createClusterBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateCluster( - com.google.cloud.dataproc.v1.ClusterOperation.Builder builderForValue) { - if (createClusterBuilder_ == null) { - createCluster_ = builderForValue.build(); - onChanged(); - } else { - createClusterBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateCluster(com.google.cloud.dataproc.v1.ClusterOperation value) { - if (createClusterBuilder_ == null) { - if (createCluster_ != null) { - createCluster_ = - com.google.cloud.dataproc.v1.ClusterOperation.newBuilder(createCluster_) - .mergeFrom(value) - .buildPartial(); - } else { - createCluster_ = value; - } - onChanged(); - } else { - createClusterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateCluster() { - if (createClusterBuilder_ == null) { - createCluster_ = null; - onChanged(); - } else { - createCluster_ = null; - createClusterBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperation.Builder getCreateClusterBuilder() { - - onChanged(); - return getCreateClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getCreateClusterOrBuilder() { - if (createClusterBuilder_ != null) { - return createClusterBuilder_.getMessageOrBuilder(); - } else { - return createCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : createCluster_; - } - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder> - getCreateClusterFieldBuilder() { - if (createClusterBuilder_ == null) { - createClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder>( - getCreateCluster(), getParentForChildren(), isClean()); - createCluster_ = null; - } - return createClusterBuilder_; - } - - private com.google.cloud.dataproc.v1.WorkflowGraph graph_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowGraph, - com.google.cloud.dataproc.v1.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder> - graphBuilder_; - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the graph field is set. - */ - public boolean hasGraph() { - return graphBuilder_ != null || graph_ != null; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - public com.google.cloud.dataproc.v1.WorkflowGraph getGraph() { - if (graphBuilder_ == null) { - return graph_ == null - ? com.google.cloud.dataproc.v1.WorkflowGraph.getDefaultInstance() - : graph_; - } else { - return graphBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGraph(com.google.cloud.dataproc.v1.WorkflowGraph value) { - if (graphBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - graph_ = value; - onChanged(); - } else { - graphBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGraph(com.google.cloud.dataproc.v1.WorkflowGraph.Builder builderForValue) { - if (graphBuilder_ == null) { - graph_ = builderForValue.build(); - onChanged(); - } else { - graphBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeGraph(com.google.cloud.dataproc.v1.WorkflowGraph value) { - if (graphBuilder_ == null) { - if (graph_ != null) { - graph_ = - com.google.cloud.dataproc.v1.WorkflowGraph.newBuilder(graph_) - .mergeFrom(value) - .buildPartial(); - } else { - graph_ = value; - } - onChanged(); - } else { - graphBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearGraph() { - if (graphBuilder_ == null) { - graph_ = null; - onChanged(); - } else { - graph_ = null; - graphBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowGraph.Builder getGraphBuilder() { - - onChanged(); - return getGraphFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder getGraphOrBuilder() { - if (graphBuilder_ != null) { - return graphBuilder_.getMessageOrBuilder(); - } else { - return graph_ == null - ? com.google.cloud.dataproc.v1.WorkflowGraph.getDefaultInstance() - : graph_; - } - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowGraph, - com.google.cloud.dataproc.v1.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder> - getGraphFieldBuilder() { - if (graphBuilder_ == null) { - graphBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowGraph, - com.google.cloud.dataproc.v1.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder>( - getGraph(), getParentForChildren(), isClean()); - graph_ = null; - } - return graphBuilder_; - } - - private com.google.cloud.dataproc.v1.ClusterOperation deleteCluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder> - deleteClusterBuilder_; - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteCluster field is set. - */ - public boolean hasDeleteCluster() { - return deleteClusterBuilder_ != null || deleteCluster_ != null; - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - public com.google.cloud.dataproc.v1.ClusterOperation getDeleteCluster() { - if (deleteClusterBuilder_ == null) { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } else { - return deleteClusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteCluster(com.google.cloud.dataproc.v1.ClusterOperation value) { - if (deleteClusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deleteCluster_ = value; - onChanged(); - } else { - deleteClusterBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteCluster( - com.google.cloud.dataproc.v1.ClusterOperation.Builder builderForValue) { - if (deleteClusterBuilder_ == null) { - deleteCluster_ = builderForValue.build(); - onChanged(); - } else { - deleteClusterBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDeleteCluster(com.google.cloud.dataproc.v1.ClusterOperation value) { - if (deleteClusterBuilder_ == null) { - if (deleteCluster_ != null) { - deleteCluster_ = - com.google.cloud.dataproc.v1.ClusterOperation.newBuilder(deleteCluster_) - .mergeFrom(value) - .buildPartial(); - } else { - deleteCluster_ = value; - } - onChanged(); - } else { - deleteClusterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDeleteCluster() { - if (deleteClusterBuilder_ == null) { - deleteCluster_ = null; - onChanged(); - } else { - deleteCluster_ = null; - deleteClusterBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperation.Builder getDeleteClusterBuilder() { - - onChanged(); - return getDeleteClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getDeleteClusterOrBuilder() { - if (deleteClusterBuilder_ != null) { - return deleteClusterBuilder_.getMessageOrBuilder(); - } else { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder> - getDeleteClusterFieldBuilder() { - if (deleteClusterBuilder_ == null) { - deleteClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterOperation, - com.google.cloud.dataproc.v1.ClusterOperation.Builder, - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder>( - getDeleteCluster(), getParentForChildren(), isClean()); - deleteCluster_ = null; - } - return deleteClusterBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.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 workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.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 workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.WorkflowMetadata.State result = - com.google.cloud.dataproc.v1.WorkflowMetadata.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.WorkflowMetadata.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.WorkflowMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object clusterName_ = ""; - /** - * - * - *
-     * Output only. The name of the target cluster.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - public java.lang.String getClusterName() { - java.lang.Object ref = clusterName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the target cluster.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - public com.google.protobuf.ByteString getClusterNameBytes() { - java.lang.Object ref = clusterName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the target cluster.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the target cluster.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterName() { - - clusterName_ = getDefaultInstance().getClusterName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the target cluster.
-     * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterName to set. - * @return This builder for chaining. - */ - public Builder setClusterNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField parameters_; - - private com.google.protobuf.MapField - internalGetParameters() { - if (parameters_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ParametersDefaultEntryHolder.defaultEntry); - } - return parameters_; - } - - private com.google.protobuf.MapField - internalGetMutableParameters() { - onChanged(); - ; - if (parameters_ == null) { - parameters_ = - com.google.protobuf.MapField.newMapField(ParametersDefaultEntryHolder.defaultEntry); - } - if (!parameters_.isMutable()) { - parameters_ = parameters_.copy(); - } - return parameters_; - } - - public int getParametersCount() { - return internalGetParameters().getMap().size(); - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public boolean containsParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParameters().getMap().containsKey(key); - } - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParameters() { - return getParametersMap(); - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.util.Map getParametersMap() { - return internalGetParameters().getMap(); - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.lang.String getParametersOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - @java.lang.Override - public java.lang.String getParametersOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParameters().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParameters() { - internalGetMutableParameters().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - public Builder removeParameters(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParameters().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParameters() { - return internalGetMutableParameters().getMutableMap(); - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - public Builder putParameters(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParameters().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Map from parameter names to values that were used for those parameters.
-     * 
- * - * map<string, string> parameters = 8; - */ - public Builder putAllParameters(java.util.Map values) { - internalGetMutableParameters().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - startTimeBuilder_; - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * Output only. Workflow start time.
-     * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStartTime(), getParentForChildren(), isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @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(); - } - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - 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; - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - 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; - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * Output only. Workflow end time.
-     * 
- * - * .google.protobuf.Timestamp end_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> - 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 clusterUuid_ = ""; - /** - * - * - *
-     * Output only. The UUID of target cluster.
-     * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - public java.lang.String getClusterUuid() { - java.lang.Object ref = clusterUuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterUuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The UUID of target cluster.
-     * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - public com.google.protobuf.ByteString getClusterUuidBytes() { - java.lang.Object ref = clusterUuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterUuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The UUID of target cluster.
-     * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuid(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterUuid_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The UUID of target cluster.
-     * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearClusterUuid() { - - clusterUuid_ = getDefaultInstance().getClusterUuid(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The UUID of target cluster.
-     * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for clusterUuid to set. - * @return This builder for chaining. - */ - public Builder setClusterUuidBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterUuid_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration dagTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - dagTimeoutBuilder_; - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagTimeout field is set. - */ - public boolean hasDagTimeout() { - return dagTimeoutBuilder_ != null || dagTimeout_ != null; - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagTimeout. - */ - public com.google.protobuf.Duration getDagTimeout() { - if (dagTimeoutBuilder_ == null) { - return dagTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : dagTimeout_; - } else { - return dagTimeoutBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagTimeout(com.google.protobuf.Duration value) { - if (dagTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dagTimeout_ = value; - onChanged(); - } else { - dagTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagTimeout(com.google.protobuf.Duration.Builder builderForValue) { - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = builderForValue.build(); - onChanged(); - } else { - dagTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDagTimeout(com.google.protobuf.Duration value) { - if (dagTimeoutBuilder_ == null) { - if (dagTimeout_ != null) { - dagTimeout_ = - com.google.protobuf.Duration.newBuilder(dagTimeout_).mergeFrom(value).buildPartial(); - } else { - dagTimeout_ = value; - } - onChanged(); - } else { - dagTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDagTimeout() { - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = null; - onChanged(); - } else { - dagTimeout_ = null; - dagTimeoutBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Duration.Builder getDagTimeoutBuilder() { - - onChanged(); - return getDagTimeoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder() { - if (dagTimeoutBuilder_ != null) { - return dagTimeoutBuilder_.getMessageOrBuilder(); - } else { - return dagTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : dagTimeout_; - } - } - /** - * - * - *
-     * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * 
- * - * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getDagTimeoutFieldBuilder() { - if (dagTimeoutBuilder_ == null) { - dagTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getDagTimeout(), getParentForChildren(), isClean()); - dagTimeout_ = null; - } - return dagTimeoutBuilder_; - } - - private com.google.protobuf.Timestamp dagStartTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - dagStartTimeBuilder_; - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagStartTime field is set. - */ - public boolean hasDagStartTime() { - return dagStartTimeBuilder_ != null || dagStartTime_ != null; - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagStartTime. - */ - public com.google.protobuf.Timestamp getDagStartTime() { - if (dagStartTimeBuilder_ == null) { - return dagStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : dagStartTime_; - } else { - return dagStartTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagStartTime(com.google.protobuf.Timestamp value) { - if (dagStartTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dagStartTime_ = value; - onChanged(); - } else { - dagStartTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (dagStartTimeBuilder_ == null) { - dagStartTime_ = builderForValue.build(); - onChanged(); - } else { - dagStartTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDagStartTime(com.google.protobuf.Timestamp value) { - if (dagStartTimeBuilder_ == null) { - if (dagStartTime_ != null) { - dagStartTime_ = - com.google.protobuf.Timestamp.newBuilder(dagStartTime_) - .mergeFrom(value) - .buildPartial(); - } else { - dagStartTime_ = value; - } - onChanged(); - } else { - dagStartTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDagStartTime() { - if (dagStartTimeBuilder_ == null) { - dagStartTime_ = null; - onChanged(); - } else { - dagStartTime_ = null; - dagStartTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getDagStartTimeBuilder() { - - onChanged(); - return getDagStartTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getDagStartTimeOrBuilder() { - if (dagStartTimeBuilder_ != null) { - return dagStartTimeBuilder_.getMessageOrBuilder(); - } else { - return dagStartTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : dagStartTime_; - } - } - /** - * - * - *
-     * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-     * begins.
-     * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDagStartTimeFieldBuilder() { - if (dagStartTimeBuilder_ == null) { - dagStartTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDagStartTime(), getParentForChildren(), isClean()); - dagStartTime_ = null; - } - return dagStartTimeBuilder_; - } - - private com.google.protobuf.Timestamp dagEndTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - dagEndTimeBuilder_; - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagEndTime field is set. - */ - public boolean hasDagEndTime() { - return dagEndTimeBuilder_ != null || dagEndTime_ != null; - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagEndTime. - */ - public com.google.protobuf.Timestamp getDagEndTime() { - if (dagEndTimeBuilder_ == null) { - return dagEndTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : dagEndTime_; - } else { - return dagEndTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagEndTime(com.google.protobuf.Timestamp value) { - if (dagEndTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dagEndTime_ = value; - onChanged(); - } else { - dagEndTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDagEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (dagEndTimeBuilder_ == null) { - dagEndTime_ = builderForValue.build(); - onChanged(); - } else { - dagEndTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDagEndTime(com.google.protobuf.Timestamp value) { - if (dagEndTimeBuilder_ == null) { - if (dagEndTime_ != null) { - dagEndTime_ = - com.google.protobuf.Timestamp.newBuilder(dagEndTime_).mergeFrom(value).buildPartial(); - } else { - dagEndTime_ = value; - } - onChanged(); - } else { - dagEndTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearDagEndTime() { - if (dagEndTimeBuilder_ == null) { - dagEndTime_ = null; - onChanged(); - } else { - dagEndTime_ = null; - dagEndTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getDagEndTimeBuilder() { - - onChanged(); - return getDagEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getDagEndTimeOrBuilder() { - if (dagEndTimeBuilder_ != null) { - return dagEndTimeBuilder_.getMessageOrBuilder(); - } else { - return dagEndTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : dagEndTime_; - } - } - /** - * - * - *
-     * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-     * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDagEndTimeFieldBuilder() { - if (dagEndTimeBuilder_ == null) { - dagEndTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDagEndTime(), getParentForChildren(), isClean()); - dagEndTime_ = null; - } - return dagEndTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.WorkflowMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.WorkflowMetadata) - private static final com.google.cloud.dataproc.v1.WorkflowMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.WorkflowMetadata(); - } - - public static com.google.cloud.dataproc.v1.WorkflowMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WorkflowMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WorkflowMetadata(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.dataproc.v1.WorkflowMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadataOrBuilder.java deleted file mode 100644 index c6c1db05..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadataOrBuilder.java +++ /dev/null @@ -1,539 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface WorkflowMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.WorkflowMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the workflow template as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The template. - */ - java.lang.String getTemplate(); - /** - * - * - *
-   * Output only. The resource name of the workflow template as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string template = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for template. - */ - com.google.protobuf.ByteString getTemplateBytes(); - - /** - * - * - *
-   * Output only. The version of template at the time of
-   * workflow instantiation.
-   * 
- * - * int32 version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The version. - */ - int getVersion(); - - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createCluster field is set. - */ - boolean hasCreateCluster(); - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - com.google.cloud.dataproc.v1.ClusterOperation getCreateCluster(); - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getCreateClusterOrBuilder(); - - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the graph field is set. - */ - boolean hasGraph(); - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - com.google.cloud.dataproc.v1.WorkflowGraph getGraph(); - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.WorkflowGraphOrBuilder getGraphOrBuilder(); - - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the deleteCluster field is set. - */ - boolean hasDeleteCluster(); - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - com.google.cloud.dataproc.v1.ClusterOperation getDeleteCluster(); - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1.ClusterOperationOrBuilder getDeleteClusterOrBuilder(); - - /** - * - * - *
-   * Output only. The workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.WorkflowMetadata.State getState(); - - /** - * - * - *
-   * Output only. The name of the target cluster.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Output only. The name of the target cluster.
-   * 
- * - * string cluster_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - int getParametersCount(); - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - boolean containsParameters(java.lang.String key); - /** Use {@link #getParametersMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParameters(); - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - java.util.Map getParametersMap(); - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - java.lang.String getParametersOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Map from parameter names to values that were used for those parameters.
-   * 
- * - * map<string, string> parameters = 8; - */ - java.lang.String getParametersOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - * - * - *
-   * Output only. Workflow start time.
-   * 
- * - * .google.protobuf.Timestamp start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * Output only. Workflow end time.
-   * 
- * - * .google.protobuf.Timestamp end_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The UUID of target cluster.
-   * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Output only. The UUID of target cluster.
-   * 
- * - * string cluster_uuid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagTimeout field is set. - */ - boolean hasDagTimeout(); - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagTimeout. - */ - com.google.protobuf.Duration getDagTimeout(); - /** - * - * - *
-   * Output only. The timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * 
- * - * .google.protobuf.Duration dag_timeout = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder(); - - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagStartTime field is set. - */ - boolean hasDagStartTime(); - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagStartTime. - */ - com.google.protobuf.Timestamp getDagStartTime(); - /** - * - * - *
-   * Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG
-   * begins.
-   * 
- * - * - * .google.protobuf.Timestamp dag_start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getDagStartTimeOrBuilder(); - - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the dagEndTime field is set. - */ - boolean hasDagEndTime(); - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The dagEndTime. - */ - com.google.protobuf.Timestamp getDagEndTime(); - /** - * - * - *
-   * Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends.
-   * 
- * - * - * .google.protobuf.Timestamp dag_end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getDagEndTimeOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNode.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNode.java deleted file mode 100644 index 445865f9..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNode.java +++ /dev/null @@ -1,1680 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * The workflow node.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowNode} - */ -public final class WorkflowNode extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.WorkflowNode) - WorkflowNodeOrBuilder { - private static final long serialVersionUID = 0L; - // Use WorkflowNode.newBuilder() to construct. - private WorkflowNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private WorkflowNode() { - stepId_ = ""; - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - jobId_ = ""; - state_ = 0; - error_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new WorkflowNode(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private WorkflowNode( - 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(); - - stepId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - prerequisiteStepIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - prerequisiteStepIds_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - error_ = 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)) { - prerequisiteStepIds_ = prerequisiteStepIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowNode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowNode.class, - com.google.cloud.dataproc.v1.WorkflowNode.Builder.class); - } - - /** - * - * - *
-   * The workflow node state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.WorkflowNode.NodeState} - */ - public enum NodeState implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * State is unspecified.
-     * 
- * - * NODE_STATE_UNSPECIFIED = 0; - */ - NODE_STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The node is awaiting prerequisite node to finish.
-     * 
- * - * BLOCKED = 1; - */ - BLOCKED(1), - /** - * - * - *
-     * The node is runnable but not running.
-     * 
- * - * RUNNABLE = 2; - */ - RUNNABLE(2), - /** - * - * - *
-     * The node is running.
-     * 
- * - * RUNNING = 3; - */ - RUNNING(3), - /** - * - * - *
-     * The node completed successfully.
-     * 
- * - * COMPLETED = 4; - */ - COMPLETED(4), - /** - * - * - *
-     * The node failed. A node can be marked FAILED because
-     * its ancestor or peer failed.
-     * 
- * - * FAILED = 5; - */ - FAILED(5), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * State is unspecified.
-     * 
- * - * NODE_STATE_UNSPECIFIED = 0; - */ - public static final int NODE_STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The node is awaiting prerequisite node to finish.
-     * 
- * - * BLOCKED = 1; - */ - public static final int BLOCKED_VALUE = 1; - /** - * - * - *
-     * The node is runnable but not running.
-     * 
- * - * RUNNABLE = 2; - */ - public static final int RUNNABLE_VALUE = 2; - /** - * - * - *
-     * The node is running.
-     * 
- * - * RUNNING = 3; - */ - public static final int RUNNING_VALUE = 3; - /** - * - * - *
-     * The node completed successfully.
-     * 
- * - * COMPLETED = 4; - */ - public static final int COMPLETED_VALUE = 4; - /** - * - * - *
-     * The node failed. A node can be marked FAILED because
-     * its ancestor or peer failed.
-     * 
- * - * FAILED = 5; - */ - public static final int FAILED_VALUE = 5; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NodeState 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 NodeState forNumber(int value) { - switch (value) { - case 0: - return NODE_STATE_UNSPECIFIED; - case 1: - return BLOCKED; - case 2: - return RUNNABLE; - case 3: - return RUNNING; - case 4: - return COMPLETED; - case 5: - return FAILED; - 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 NodeState findValueByNumber(int number) { - return NodeState.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.dataproc.v1.WorkflowNode.getDescriptor().getEnumTypes().get(0); - } - - private static final NodeState[] VALUES = values(); - - public static NodeState 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 NodeState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.WorkflowNode.NodeState) - } - - public static final int STEP_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object stepId_; - /** - * - * - *
-   * Output only. The name of the node.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stepId. - */ - @java.lang.Override - public java.lang.String getStepId() { - java.lang.Object ref = stepId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stepId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the node.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stepId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStepIdBytes() { - java.lang.Object ref = stepId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stepId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PREREQUISITE_STEP_IDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList prerequisiteStepIds_; - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - public com.google.protobuf.ProtocolStringList getPrerequisiteStepIdsList() { - return prerequisiteStepIds_; - } - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of prerequisiteStepIds. - */ - public int getPrerequisiteStepIdsCount() { - return prerequisiteStepIds_.size(); - } - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - public java.lang.String getPrerequisiteStepIds(int index) { - return prerequisiteStepIds_.get(index); - } - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - public com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index) { - return prerequisiteStepIds_.getByteString(index); - } - - public static final int JOB_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object jobId_; - /** - * - * - *
-   * Output only. The job id; populated after the node enters RUNNING state.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The job id; populated after the node enters RUNNING state.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 5; - private int state_; - /** - * - * - *
-   * Output only. The node state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.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 node state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode.NodeState getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.WorkflowNode.NodeState result = - com.google.cloud.dataproc.v1.WorkflowNode.NodeState.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.WorkflowNode.NodeState.UNRECOGNIZED - : result; - } - - public static final int ERROR_FIELD_NUMBER = 6; - private volatile java.lang.Object error_; - /** - * - * - *
-   * Output only. The error detail.
-   * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - @java.lang.Override - public java.lang.String getError() { - java.lang.Object ref = error_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - error_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The error detail.
-   * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - @java.lang.Override - public com.google.protobuf.ByteString getErrorBytes() { - java.lang.Object ref = error_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - error_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stepId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stepId_); - } - for (int i = 0; i < prerequisiteStepIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prerequisiteStepIds_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobId_); - } - if (state_ - != com.google.cloud.dataproc.v1.WorkflowNode.NodeState.NODE_STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, error_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stepId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stepId_); - } - { - int dataSize = 0; - for (int i = 0; i < prerequisiteStepIds_.size(); i++) { - dataSize += computeStringSizeNoTag(prerequisiteStepIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getPrerequisiteStepIdsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobId_); - } - if (state_ - != com.google.cloud.dataproc.v1.WorkflowNode.NodeState.NODE_STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, error_); - } - 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.dataproc.v1.WorkflowNode)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.WorkflowNode other = - (com.google.cloud.dataproc.v1.WorkflowNode) obj; - - if (!getStepId().equals(other.getStepId())) return false; - if (!getPrerequisiteStepIdsList().equals(other.getPrerequisiteStepIdsList())) return false; - if (!getJobId().equals(other.getJobId())) return false; - if (state_ != other.state_) return false; - if (!getError().equals(other.getError())) 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) + STEP_ID_FIELD_NUMBER; - hash = (53 * hash) + getStepId().hashCode(); - if (getPrerequisiteStepIdsCount() > 0) { - hash = (37 * hash) + PREREQUISITE_STEP_IDS_FIELD_NUMBER; - hash = (53 * hash) + getPrerequisiteStepIdsList().hashCode(); - } - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.WorkflowNode parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode 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.dataproc.v1.WorkflowNode parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode parseFrom( - 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.dataproc.v1.WorkflowNode parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode 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.dataproc.v1.WorkflowNode parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode 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.dataproc.v1.WorkflowNode parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode 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.dataproc.v1.WorkflowNode prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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 workflow node.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowNode} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.WorkflowNode) - com.google.cloud.dataproc.v1.WorkflowNodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowNode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowNode.class, - com.google.cloud.dataproc.v1.WorkflowNode.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.WorkflowNode.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(); - stepId_ = ""; - - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - jobId_ = ""; - - state_ = 0; - - error_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.WorkflowNode.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode build() { - com.google.cloud.dataproc.v1.WorkflowNode result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode buildPartial() { - com.google.cloud.dataproc.v1.WorkflowNode result = - new com.google.cloud.dataproc.v1.WorkflowNode(this); - int from_bitField0_ = bitField0_; - result.stepId_ = stepId_; - if (((bitField0_ & 0x00000001) != 0)) { - prerequisiteStepIds_ = prerequisiteStepIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.prerequisiteStepIds_ = prerequisiteStepIds_; - result.jobId_ = jobId_; - result.state_ = state_; - result.error_ = error_; - 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.dataproc.v1.WorkflowNode) { - return mergeFrom((com.google.cloud.dataproc.v1.WorkflowNode) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.WorkflowNode other) { - if (other == com.google.cloud.dataproc.v1.WorkflowNode.getDefaultInstance()) return this; - if (!other.getStepId().isEmpty()) { - stepId_ = other.stepId_; - onChanged(); - } - if (!other.prerequisiteStepIds_.isEmpty()) { - if (prerequisiteStepIds_.isEmpty()) { - prerequisiteStepIds_ = other.prerequisiteStepIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.addAll(other.prerequisiteStepIds_); - } - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getError().isEmpty()) { - error_ = other.error_; - 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.dataproc.v1.WorkflowNode parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.WorkflowNode) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object stepId_ = ""; - /** - * - * - *
-     * Output only. The name of the node.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stepId. - */ - public java.lang.String getStepId() { - java.lang.Object ref = stepId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stepId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the node.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stepId. - */ - public com.google.protobuf.ByteString getStepIdBytes() { - java.lang.Object ref = stepId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stepId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the node.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The stepId to set. - * @return This builder for chaining. - */ - public Builder setStepId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stepId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the node.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearStepId() { - - stepId_ = getDefaultInstance().getStepId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the node.
-     * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for stepId to set. - * @return This builder for chaining. - */ - public Builder setStepIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stepId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList prerequisiteStepIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensurePrerequisiteStepIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - prerequisiteStepIds_ = new com.google.protobuf.LazyStringArrayList(prerequisiteStepIds_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - public com.google.protobuf.ProtocolStringList getPrerequisiteStepIdsList() { - return prerequisiteStepIds_.getUnmodifiableView(); - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of prerequisiteStepIds. - */ - public int getPrerequisiteStepIdsCount() { - return prerequisiteStepIds_.size(); - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - public java.lang.String getPrerequisiteStepIds(int index) { - return prerequisiteStepIds_.get(index); - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - public com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index) { - return prerequisiteStepIds_.getByteString(index); - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index to set the value at. - * @param value The prerequisiteStepIds to set. - * @return This builder for chaining. - */ - public Builder setPrerequisiteStepIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addPrerequisiteStepIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param values The prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addAllPrerequisiteStepIds(java.lang.Iterable values) { - ensurePrerequisiteStepIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, prerequisiteStepIds_); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearPrerequisiteStepIds() { - prerequisiteStepIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Node's prerequisite nodes.
-     * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes of the prerequisiteStepIds to add. - * @return This builder for chaining. - */ - public Builder addPrerequisiteStepIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePrerequisiteStepIdsIsMutable(); - prerequisiteStepIds_.add(value); - onChanged(); - return this; - } - - private java.lang.Object jobId_ = ""; - /** - * - * - *
-     * Output only. The job id; populated after the node enters RUNNING state.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The job id; populated after the node enters RUNNING state.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The job id; populated after the node enters RUNNING state.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The job id; populated after the node enters RUNNING state.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The job id; populated after the node enters RUNNING state.
-     * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The node state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.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 node state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.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 node state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowNode.NodeState getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.WorkflowNode.NodeState result = - com.google.cloud.dataproc.v1.WorkflowNode.NodeState.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.WorkflowNode.NodeState.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The node state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.WorkflowNode.NodeState value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The node state.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object error_ = ""; - /** - * - * - *
-     * Output only. The error detail.
-     * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - public java.lang.String getError() { - java.lang.Object ref = error_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - error_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The error detail.
-     * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - public com.google.protobuf.ByteString getErrorBytes() { - java.lang.Object ref = error_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - error_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The error detail.
-     * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The error to set. - * @return This builder for chaining. - */ - public Builder setError(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - error_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The error detail.
-     * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearError() { - - error_ = getDefaultInstance().getError(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The error detail.
-     * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for error to set. - * @return This builder for chaining. - */ - public Builder setErrorBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - error_ = 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.dataproc.v1.WorkflowNode) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.WorkflowNode) - private static final com.google.cloud.dataproc.v1.WorkflowNode DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.WorkflowNode(); - } - - public static com.google.cloud.dataproc.v1.WorkflowNode getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WorkflowNode parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WorkflowNode(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.dataproc.v1.WorkflowNode getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNodeOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNodeOrBuilder.java deleted file mode 100644 index 003abfa0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNodeOrBuilder.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface WorkflowNodeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.WorkflowNode) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The name of the node.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The stepId. - */ - java.lang.String getStepId(); - /** - * - * - *
-   * Output only. The name of the node.
-   * 
- * - * string step_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for stepId. - */ - com.google.protobuf.ByteString getStepIdBytes(); - - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return A list containing the prerequisiteStepIds. - */ - java.util.List getPrerequisiteStepIdsList(); - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The count of prerequisiteStepIds. - */ - int getPrerequisiteStepIdsCount(); - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the element to return. - * @return The prerequisiteStepIds at the given index. - */ - java.lang.String getPrerequisiteStepIds(int index); - /** - * - * - *
-   * Output only. Node's prerequisite nodes.
-   * 
- * - * repeated string prerequisite_step_ids = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param index The index of the value to return. - * @return The bytes of the prerequisiteStepIds at the given index. - */ - com.google.protobuf.ByteString getPrerequisiteStepIdsBytes(int index); - - /** - * - * - *
-   * Output only. The job id; populated after the node enters RUNNING state.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The jobId. - */ - java.lang.String getJobId(); - /** - * - * - *
-   * Output only. The job id; populated after the node enters RUNNING state.
-   * 
- * - * string job_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString getJobIdBytes(); - - /** - * - * - *
-   * Output only. The node state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The node state.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.WorkflowNode.NodeState getState(); - - /** - * - * - *
-   * Output only. The error detail.
-   * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The error. - */ - java.lang.String getError(); - /** - * - * - *
-   * Output only. The error detail.
-   * 
- * - * string error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for error. - */ - com.google.protobuf.ByteString getErrorBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplate.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplate.java deleted file mode 100644 index 280f0bb4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplate.java +++ /dev/null @@ -1,3747 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * A Dataproc workflow template resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowTemplate} - */ -public final class WorkflowTemplate extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.WorkflowTemplate) - WorkflowTemplateOrBuilder { - private static final long serialVersionUID = 0L; - // Use WorkflowTemplate.newBuilder() to construct. - private WorkflowTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private WorkflowTemplate() { - id_ = ""; - name_ = ""; - jobs_ = java.util.Collections.emptyList(); - parameters_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new WorkflowTemplate(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private WorkflowTemplate( - 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(); - - id_ = s; - break; - } - case 24: - { - version_ = input.readInt32(); - break; - } - case 34: - { - 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 42: - { - 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 50: - { - 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 58: - { - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder subBuilder = null; - if (placement_ != null) { - subBuilder = placement_.toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(placement_); - placement_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - jobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - jobs_.add( - input.readMessage( - com.google.cloud.dataproc.v1.OrderedJob.parser(), extensionRegistry)); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - parameters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - parameters_.add( - input.readMessage( - com.google.cloud.dataproc.v1.TemplateParameter.parser(), extensionRegistry)); - break; - } - case 82: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (dagTimeout_ != null) { - subBuilder = dagTimeout_.toBuilder(); - } - dagTimeout_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dagTimeout_); - dagTimeout_ = 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_ & 0x00000002) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - parameters_ = java.util.Collections.unmodifiableList(parameters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowTemplate.class, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 2; - private volatile java.lang.Object id_; - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * 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 resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * 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 VERSION_FIELD_NUMBER = 3; - private int version_; - /** - * - * - *
-   * Optional. Used to perform a consistent read-modify-write.
-   * This field should be left blank for a `CreateWorkflowTemplate` request. It
-   * is required for an `UpdateWorkflowTemplate` request, and must match the
-   * current server version. A typical update template flow would fetch the
-   * current template with a `GetWorkflowTemplate` request, which will return
-   * the current template with the `version` field filled in with the
-   * current server version. The user updates other fields in the template,
-   * then returns it as part of the `UpdateWorkflowTemplate` request.
-   * 
- * - * int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The time template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.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 = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The time template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 6; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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 PLACEMENT_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1.WorkflowTemplatePlacement placement_; - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - @java.lang.Override - public boolean hasPlacement() { - return placement_ != null; - } - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement getPlacement() { - return placement_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder() { - return getPlacement(); - } - - public static final int JOBS_FIELD_NUMBER = 8; - private java.util.List jobs_; - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List getJobsList() { - return jobs_; - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public java.util.List - getJobsOrBuilderList() { - return jobs_; - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public int getJobsCount() { - return jobs_.size(); - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.OrderedJob getJobs(int index) { - return jobs_.get(index); - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.OrderedJobOrBuilder getJobsOrBuilder(int index) { - return jobs_.get(index); - } - - public static final int PARAMETERS_FIELD_NUMBER = 9; - private java.util.List parameters_; - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List getParametersList() { - return parameters_; - } - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getParametersOrBuilderList() { - return parameters_; - } - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getParametersCount() { - return parameters_.size(); - } - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.TemplateParameter getParameters(int index) { - return parameters_.get(index); - } - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.TemplateParameterOrBuilder getParametersOrBuilder(int index) { - return parameters_.get(index); - } - - public static final int DAG_TIMEOUT_FIELD_NUMBER = 10; - private com.google.protobuf.Duration dagTimeout_; - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dagTimeout field is set. - */ - @java.lang.Override - public boolean hasDagTimeout() { - return dagTimeout_ != null; - } - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dagTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getDagTimeout() { - return dagTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : dagTimeout_; - } - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder() { - return getDagTimeout(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - if (version_ != 0) { - output.writeInt32(3, version_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); - if (placement_ != null) { - output.writeMessage(7, getPlacement()); - } - for (int i = 0; i < jobs_.size(); i++) { - output.writeMessage(8, jobs_.get(i)); - } - for (int i = 0; i < parameters_.size(); i++) { - output.writeMessage(9, parameters_.get(i)); - } - if (dagTimeout_ != null) { - output.writeMessage(10, getDagTimeout()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, version_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); - } - 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(6, labels__); - } - if (placement_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPlacement()); - } - for (int i = 0; i < jobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, jobs_.get(i)); - } - for (int i = 0; i < parameters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, parameters_.get(i)); - } - if (dagTimeout_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDagTimeout()); - } - 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.dataproc.v1.WorkflowTemplate)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.WorkflowTemplate other = - (com.google.cloud.dataproc.v1.WorkflowTemplate) obj; - - if (!getId().equals(other.getId())) return false; - if (!getName().equals(other.getName())) return false; - if (getVersion() != other.getVersion()) 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 (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (hasPlacement() != other.hasPlacement()) return false; - if (hasPlacement()) { - if (!getPlacement().equals(other.getPlacement())) return false; - } - if (!getJobsList().equals(other.getJobsList())) return false; - if (!getParametersList().equals(other.getParametersList())) return false; - if (hasDagTimeout() != other.hasDagTimeout()) return false; - if (hasDagTimeout()) { - if (!getDagTimeout().equals(other.getDagTimeout())) 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) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - 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(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasPlacement()) { - hash = (37 * hash) + PLACEMENT_FIELD_NUMBER; - hash = (53 * hash) + getPlacement().hashCode(); - } - if (getJobsCount() > 0) { - hash = (37 * hash) + JOBS_FIELD_NUMBER; - hash = (53 * hash) + getJobsList().hashCode(); - } - if (getParametersCount() > 0) { - hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; - hash = (53 * hash) + getParametersList().hashCode(); - } - if (hasDagTimeout()) { - hash = (37 * hash) + DAG_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getDagTimeout().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate 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.dataproc.v1.WorkflowTemplate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate parseFrom( - 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.dataproc.v1.WorkflowTemplate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate 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.dataproc.v1.WorkflowTemplate parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate 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.dataproc.v1.WorkflowTemplate parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate 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.dataproc.v1.WorkflowTemplate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A Dataproc workflow template resource.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowTemplate} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.WorkflowTemplate) - com.google.cloud.dataproc.v1.WorkflowTemplateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 6: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowTemplate.class, - com.google.cloud.dataproc.v1.WorkflowTemplate.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.WorkflowTemplate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getJobsFieldBuilder(); - getParametersFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = ""; - - name_ = ""; - - version_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - if (placementBuilder_ == null) { - placement_ = null; - } else { - placement_ = null; - placementBuilder_ = null; - } - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - jobsBuilder_.clear(); - } - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - parametersBuilder_.clear(); - } - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = null; - } else { - dagTimeout_ = null; - dagTimeoutBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate build() { - com.google.cloud.dataproc.v1.WorkflowTemplate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplate buildPartial() { - com.google.cloud.dataproc.v1.WorkflowTemplate result = - new com.google.cloud.dataproc.v1.WorkflowTemplate(this); - int from_bitField0_ = bitField0_; - result.id_ = id_; - result.name_ = name_; - result.version_ = version_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (placementBuilder_ == null) { - result.placement_ = placement_; - } else { - result.placement_ = placementBuilder_.build(); - } - if (jobsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.jobs_ = jobs_; - } else { - result.jobs_ = jobsBuilder_.build(); - } - if (parametersBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - parameters_ = java.util.Collections.unmodifiableList(parameters_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.parameters_ = parameters_; - } else { - result.parameters_ = parametersBuilder_.build(); - } - if (dagTimeoutBuilder_ == null) { - result.dagTimeout_ = dagTimeout_; - } else { - result.dagTimeout_ = dagTimeoutBuilder_.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.dataproc.v1.WorkflowTemplate) { - return mergeFrom((com.google.cloud.dataproc.v1.WorkflowTemplate) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.WorkflowTemplate other) { - if (other == com.google.cloud.dataproc.v1.WorkflowTemplate.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (other.hasPlacement()) { - mergePlacement(other.getPlacement()); - } - if (jobsBuilder_ == null) { - if (!other.jobs_.isEmpty()) { - if (jobs_.isEmpty()) { - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureJobsIsMutable(); - jobs_.addAll(other.jobs_); - } - onChanged(); - } - } else { - if (!other.jobs_.isEmpty()) { - if (jobsBuilder_.isEmpty()) { - jobsBuilder_.dispose(); - jobsBuilder_ = null; - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000002); - jobsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getJobsFieldBuilder() - : null; - } else { - jobsBuilder_.addAllMessages(other.jobs_); - } - } - } - if (parametersBuilder_ == null) { - if (!other.parameters_.isEmpty()) { - if (parameters_.isEmpty()) { - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureParametersIsMutable(); - parameters_.addAll(other.parameters_); - } - onChanged(); - } - } else { - if (!other.parameters_.isEmpty()) { - if (parametersBuilder_.isEmpty()) { - parametersBuilder_.dispose(); - parametersBuilder_ = null; - parameters_ = other.parameters_; - bitField0_ = (bitField0_ & ~0x00000004); - parametersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParametersFieldBuilder() - : null; - } else { - parametersBuilder_.addAllMessages(other.parameters_); - } - } - } - if (other.hasDagTimeout()) { - mergeDagTimeout(other.getDagTimeout()); - } - 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.dataproc.v1.WorkflowTemplate parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.WorkflowTemplate) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * 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 resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * 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 resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * 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 resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * 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 resource name of the workflow template, as described
-     * in https://cloud.google.com/apis/design/resource_names.
-     * * For `projects.regions.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-     * * For `projects.locations.workflowTemplates`, the resource name of the
-     *   template has the following format:
-     *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-     * 
- * - * 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 int version_; - /** - * - * - *
-     * Optional. Used to perform a consistent read-modify-write.
-     * This field should be left blank for a `CreateWorkflowTemplate` request. It
-     * is required for an `UpdateWorkflowTemplate` request, and must match the
-     * current server version. A typical update template flow would fetch the
-     * current template with a `GetWorkflowTemplate` request, which will return
-     * the current template with the `version` field filled in with the
-     * current server version. The user updates other fields in the template,
-     * then returns it as part of the `UpdateWorkflowTemplate` request.
-     * 
- * - * int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - * - * - *
-     * Optional. Used to perform a consistent read-modify-write.
-     * This field should be left blank for a `CreateWorkflowTemplate` request. It
-     * is required for an `UpdateWorkflowTemplate` request, and must match the
-     * current server version. A typical update template flow would fetch the
-     * current template with a `GetWorkflowTemplate` request, which will return
-     * the current template with the `version` field filled in with the
-     * current server version. The user updates other fields in the template,
-     * then returns it as part of the `UpdateWorkflowTemplate` request.
-     * 
- * - * int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Used to perform a consistent read-modify-write.
-     * This field should be left blank for a `CreateWorkflowTemplate` request. It
-     * is required for an `UpdateWorkflowTemplate` request, and must match the
-     * current server version. A typical update template flow would fetch the
-     * current template with a `GetWorkflowTemplate` request, which will return
-     * the current template with the `version` field filled in with the
-     * current server version. The user updates other fields in the template,
-     * then returns it as part of the `UpdateWorkflowTemplate` request.
-     * 
- * - * int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - 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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was created.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 4 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The time template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 template was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @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; - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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(); - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - } - /** - * - * - *
-     * Optional. The labels to associate with this template. These labels
-     * will be propagated to all jobs and clusters created by the workflow
-     * instance.
-     * Label **keys** must contain 1 to 63 characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * Label **values** may be empty, but, if present, must contain 1 to 63
-     * characters, and must conform to
-     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-     * No more than 32 labels can be associated with a template.
-     * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.dataproc.v1.WorkflowTemplatePlacement placement_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder> - placementBuilder_; - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - public boolean hasPlacement() { - return placementBuilder_ != null || placement_ != null; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement getPlacement() { - if (placementBuilder_ == null) { - return placement_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } else { - return placementBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement(com.google.cloud.dataproc.v1.WorkflowTemplatePlacement value) { - if (placementBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placement_ = value; - onChanged(); - } else { - placementBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement( - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder builderForValue) { - if (placementBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - placementBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePlacement(com.google.cloud.dataproc.v1.WorkflowTemplatePlacement value) { - if (placementBuilder_ == null) { - if (placement_ != null) { - placement_ = - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.newBuilder(placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - placementBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPlacement() { - if (placementBuilder_ == null) { - placement_ = null; - onChanged(); - } else { - placement_ = null; - placementBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder getPlacementBuilder() { - - onChanged(); - return getPlacementFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder() { - if (placementBuilder_ != null) { - return placementBuilder_.getMessageOrBuilder(); - } else { - return placement_ == null - ? com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder> - getPlacementFieldBuilder() { - if (placementBuilder_ == null) { - placementBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder>( - getPlacement(), getParentForChildren(), isClean()); - placement_ = null; - } - return placementBuilder_; - } - - private java.util.List jobs_ = - java.util.Collections.emptyList(); - - private void ensureJobsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - jobs_ = new java.util.ArrayList(jobs_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.OrderedJob, - com.google.cloud.dataproc.v1.OrderedJob.Builder, - com.google.cloud.dataproc.v1.OrderedJobOrBuilder> - jobsBuilder_; - - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getJobsList() { - if (jobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(jobs_); - } else { - return jobsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public int getJobsCount() { - if (jobsBuilder_ == null) { - return jobs_.size(); - } else { - return jobsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.OrderedJob getJobs(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJobs(int index, com.google.cloud.dataproc.v1.OrderedJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.set(index, value); - onChanged(); - } else { - jobsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJobs( - int index, com.google.cloud.dataproc.v1.OrderedJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.set(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1.OrderedJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(value); - onChanged(); - } else { - jobsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJobs(int index, com.google.cloud.dataproc.v1.OrderedJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(index, value); - onChanged(); - } else { - jobsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1.OrderedJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addJobs( - int index, com.google.cloud.dataproc.v1.OrderedJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder addAllJobs( - java.lang.Iterable values) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); - onChanged(); - } else { - jobsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearJobs() { - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - jobsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder removeJobs(int index) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.remove(index); - onChanged(); - } else { - jobsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.OrderedJob.Builder getJobsBuilder(int index) { - return getJobsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.OrderedJobOrBuilder getJobsOrBuilder(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List - getJobsOrBuilderList() { - if (jobsBuilder_ != null) { - return jobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jobs_); - } - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.OrderedJob.Builder addJobsBuilder() { - return getJobsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.OrderedJob.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.OrderedJob.Builder addJobsBuilder(int index) { - return getJobsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.OrderedJob.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public java.util.List getJobsBuilderList() { - return getJobsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.OrderedJob, - com.google.cloud.dataproc.v1.OrderedJob.Builder, - com.google.cloud.dataproc.v1.OrderedJobOrBuilder> - getJobsFieldBuilder() { - if (jobsBuilder_ == null) { - jobsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.OrderedJob, - com.google.cloud.dataproc.v1.OrderedJob.Builder, - com.google.cloud.dataproc.v1.OrderedJobOrBuilder>( - jobs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - jobs_ = null; - } - return jobsBuilder_; - } - - private java.util.List parameters_ = - java.util.Collections.emptyList(); - - private void ensureParametersIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - parameters_ = - new java.util.ArrayList(parameters_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.TemplateParameter, - com.google.cloud.dataproc.v1.TemplateParameter.Builder, - com.google.cloud.dataproc.v1.TemplateParameterOrBuilder> - parametersBuilder_; - - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List getParametersList() { - if (parametersBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameters_); - } else { - return parametersBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getParametersCount() { - if (parametersBuilder_ == null) { - return parameters_.size(); - } else { - return parametersBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.TemplateParameter getParameters(int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters(int index, com.google.cloud.dataproc.v1.TemplateParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.set(index, value); - onChanged(); - } else { - parametersBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters( - int index, com.google.cloud.dataproc.v1.TemplateParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.set(index, builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters(com.google.cloud.dataproc.v1.TemplateParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(value); - onChanged(); - } else { - parametersBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters(int index, com.google.cloud.dataproc.v1.TemplateParameter value) { - if (parametersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParametersIsMutable(); - parameters_.add(index, value); - onChanged(); - } else { - parametersBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - com.google.cloud.dataproc.v1.TemplateParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - int index, com.google.cloud.dataproc.v1.TemplateParameter.Builder builderForValue) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.add(index, builderForValue.build()); - onChanged(); - } else { - parametersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllParameters( - java.lang.Iterable values) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); - onChanged(); - } else { - parametersBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearParameters() { - if (parametersBuilder_ == null) { - parameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - parametersBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeParameters(int index) { - if (parametersBuilder_ == null) { - ensureParametersIsMutable(); - parameters_.remove(index); - onChanged(); - } else { - parametersBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.TemplateParameter.Builder getParametersBuilder(int index) { - return getParametersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.TemplateParameterOrBuilder getParametersOrBuilder( - int index) { - if (parametersBuilder_ == null) { - return parameters_.get(index); - } else { - return parametersBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getParametersOrBuilderList() { - if (parametersBuilder_ != null) { - return parametersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parameters_); - } - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.TemplateParameter.Builder addParametersBuilder() { - return getParametersFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1.TemplateParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1.TemplateParameter.Builder addParametersBuilder(int index) { - return getParametersFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1.TemplateParameter.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Template parameters whose values are substituted into the
-     * template. Values for parameters must be provided when the template is
-     * instantiated.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getParametersBuilderList() { - return getParametersFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.TemplateParameter, - com.google.cloud.dataproc.v1.TemplateParameter.Builder, - com.google.cloud.dataproc.v1.TemplateParameterOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1.TemplateParameter, - com.google.cloud.dataproc.v1.TemplateParameter.Builder, - com.google.cloud.dataproc.v1.TemplateParameterOrBuilder>( - parameters_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - private com.google.protobuf.Duration dagTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - dagTimeoutBuilder_; - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dagTimeout field is set. - */ - public boolean hasDagTimeout() { - return dagTimeoutBuilder_ != null || dagTimeout_ != null; - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dagTimeout. - */ - public com.google.protobuf.Duration getDagTimeout() { - if (dagTimeoutBuilder_ == null) { - return dagTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : dagTimeout_; - } else { - return dagTimeoutBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDagTimeout(com.google.protobuf.Duration value) { - if (dagTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dagTimeout_ = value; - onChanged(); - } else { - dagTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDagTimeout(com.google.protobuf.Duration.Builder builderForValue) { - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = builderForValue.build(); - onChanged(); - } else { - dagTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeDagTimeout(com.google.protobuf.Duration value) { - if (dagTimeoutBuilder_ == null) { - if (dagTimeout_ != null) { - dagTimeout_ = - com.google.protobuf.Duration.newBuilder(dagTimeout_).mergeFrom(value).buildPartial(); - } else { - dagTimeout_ = value; - } - onChanged(); - } else { - dagTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearDagTimeout() { - if (dagTimeoutBuilder_ == null) { - dagTimeout_ = null; - onChanged(); - } else { - dagTimeout_ = null; - dagTimeoutBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.Duration.Builder getDagTimeoutBuilder() { - - onChanged(); - return getDagTimeoutFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder() { - if (dagTimeoutBuilder_ != null) { - return dagTimeoutBuilder_.getMessageOrBuilder(); - } else { - return dagTimeout_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : dagTimeout_; - } - } - /** - * - * - *
-     * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-     * [JSON representation of
-     * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-     * The timeout duration must be from 10 minutes ("600s") to 24 hours
-     * ("86400s"). The timer begins when the first job is submitted. If the
-     * workflow is running at the end of the timeout period, any remaining jobs
-     * are cancelled, the workflow is ended, and if the workflow was running on a
-     * [managed
-     * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-     * the cluster is deleted.
-     * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getDagTimeoutFieldBuilder() { - if (dagTimeoutBuilder_ == null) { - dagTimeoutBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getDagTimeout(), getParentForChildren(), isClean()); - dagTimeout_ = null; - } - return dagTimeoutBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.WorkflowTemplate) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.WorkflowTemplate) - private static final com.google.cloud.dataproc.v1.WorkflowTemplate DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.WorkflowTemplate(); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WorkflowTemplate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WorkflowTemplate(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.dataproc.v1.WorkflowTemplate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java deleted file mode 100644 index 6bbd109d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * 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.dataproc.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -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 WorkflowTemplateName implements ResourceName { - private static final PathTemplate PROJECT_REGION_WORKFLOW_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}"); - private static final PathTemplate PROJECT_LOCATION_WORKFLOW_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String region; - private final String workflowTemplate; - private final String location; - - @Deprecated - protected WorkflowTemplateName() { - project = null; - region = null; - workflowTemplate = null; - location = null; - } - - private WorkflowTemplateName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - location = null; - pathTemplate = PROJECT_REGION_WORKFLOW_TEMPLATE; - } - - private WorkflowTemplateName(ProjectLocationWorkflowTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - region = null; - pathTemplate = PROJECT_LOCATION_WORKFLOW_TEMPLATE; - } - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public String getWorkflowTemplate() { - return workflowTemplate; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectRegionWorkflowTemplateBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationWorkflowTemplateBuilder newProjectLocationWorkflowTemplateBuilder() { - return new ProjectLocationWorkflowTemplateBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static WorkflowTemplateName of(String project, String region, String workflowTemplate) { - return newBuilder() - .setProject(project) - .setRegion(region) - .setWorkflowTemplate(workflowTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static WorkflowTemplateName ofProjectRegionWorkflowTemplateName( - String project, String region, String workflowTemplate) { - return newBuilder() - .setProject(project) - .setRegion(region) - .setWorkflowTemplate(workflowTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static WorkflowTemplateName ofProjectLocationWorkflowTemplateName( - String project, String location, String workflowTemplate) { - return newProjectLocationWorkflowTemplateBuilder() - .setProject(project) - .setLocation(location) - .setWorkflowTemplate(workflowTemplate) - .build(); - } - - public static String format(String project, String region, String workflowTemplate) { - return newBuilder() - .setProject(project) - .setRegion(region) - .setWorkflowTemplate(workflowTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectRegionWorkflowTemplateName( - String project, String region, String workflowTemplate) { - return newBuilder() - .setProject(project) - .setRegion(region) - .setWorkflowTemplate(workflowTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationWorkflowTemplateName( - String project, String location, String workflowTemplate) { - return newProjectLocationWorkflowTemplateBuilder() - .setProject(project) - .setLocation(location) - .setWorkflowTemplate(workflowTemplate) - .build() - .toString(); - } - - public static WorkflowTemplateName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_REGION_WORKFLOW_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_REGION_WORKFLOW_TEMPLATE.match(formattedString); - return ofProjectRegionWorkflowTemplateName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template")); - } else if (PROJECT_LOCATION_WORKFLOW_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_WORKFLOW_TEMPLATE.match(formattedString); - return ofProjectLocationWorkflowTemplateName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow_template")); - } - throw new ValidationException( - "WorkflowTemplateName.parse: formattedString not in valid format"); - } - - 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 (WorkflowTemplateName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_REGION_WORKFLOW_TEMPLATE.matches(formattedString) - || PROJECT_LOCATION_WORKFLOW_TEMPLATE.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 (region != null) { - fieldMapBuilder.put("region", region); - } - if (workflowTemplate != null) { - fieldMapBuilder.put("workflow_template", workflowTemplate); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - WorkflowTemplateName that = ((WorkflowTemplateName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.region, that.region) - && Objects.equals(this.workflowTemplate, that.workflowTemplate) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(region); - h *= 1000003; - h ^= Objects.hashCode(workflowTemplate); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/regions/{region}/workflowTemplates/{workflow_template}. */ - public static class Builder { - private String project; - private String region; - private String workflowTemplate; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public String getWorkflowTemplate() { - return workflowTemplate; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setRegion(String region) { - this.region = region; - return this; - } - - public Builder setWorkflowTemplate(String workflowTemplate) { - this.workflowTemplate = workflowTemplate; - return this; - } - - private Builder(WorkflowTemplateName workflowTemplateName) { - Preconditions.checkArgument( - Objects.equals(workflowTemplateName.pathTemplate, PROJECT_REGION_WORKFLOW_TEMPLATE), - "toBuilder is only supported when WorkflowTemplateName has the pattern of projects/{project}/regions/{region}/workflowTemplates/{workflow_template}"); - this.project = workflowTemplateName.project; - this.region = workflowTemplateName.region; - this.workflowTemplate = workflowTemplateName.workflowTemplate; - } - - public WorkflowTemplateName build() { - return new WorkflowTemplateName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/workflowTemplates/{workflow_template}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationWorkflowTemplateBuilder { - private String project; - private String location; - private String workflowTemplate; - - protected ProjectLocationWorkflowTemplateBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getWorkflowTemplate() { - return workflowTemplate; - } - - public ProjectLocationWorkflowTemplateBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationWorkflowTemplateBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationWorkflowTemplateBuilder setWorkflowTemplate(String workflowTemplate) { - this.workflowTemplate = workflowTemplate; - return this; - } - - public WorkflowTemplateName build() { - return new WorkflowTemplateName(this); - } - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateOrBuilder.java deleted file mode 100644 index 5ad42f18..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateOrBuilder.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface WorkflowTemplateOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.WorkflowTemplate) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * Output only. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the workflow template, as described
-   * in https://cloud.google.com/apis/design/resource_names.
-   * * For `projects.regions.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}`
-   * * For `projects.locations.workflowTemplates`, the resource name of the
-   *   template has the following format:
-   *   `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. Used to perform a consistent read-modify-write.
-   * This field should be left blank for a `CreateWorkflowTemplate` request. It
-   * is required for an `UpdateWorkflowTemplate` request, and must match the
-   * current server version. A typical update template flow would fetch the
-   * current template with a `GetWorkflowTemplate` request, which will return
-   * the current template with the `version` field filled in with the
-   * current server version. The user updates other fields in the template,
-   * then returns it as part of the `UpdateWorkflowTemplate` request.
-   * 
- * - * int32 version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The version. - */ - int getVersion(); - - /** - * - * - *
-   * Output only. The time template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The time template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The time template was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The time template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The time template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The time template was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - int getLabelsCount(); - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Optional. The labels to associate with this template. These labels
-   * will be propagated to all jobs and clusters created by the workflow
-   * instance.
-   * Label **keys** must contain 1 to 63 characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * Label **values** may be empty, but, if present, must contain 1 to 63
-   * characters, and must conform to
-   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
-   * No more than 32 labels can be associated with a template.
-   * 
- * - * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the placement field is set. - */ - boolean hasPlacement(); - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement getPlacement(); - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * - * .google.cloud.dataproc.v1.WorkflowTemplatePlacement placement = 7 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder(); - - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getJobsList(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.OrderedJob getJobs(int index); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - int getJobsCount(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - java.util.List getJobsOrBuilderList(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.OrderedJob jobs = 8 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.OrderedJobOrBuilder getJobsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List getParametersList(); - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.TemplateParameter getParameters(int index); - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getParametersCount(); - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getParametersOrBuilderList(); - /** - * - * - *
-   * Optional. Template parameters whose values are substituted into the
-   * template. Values for parameters must be provided when the template is
-   * instantiated.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1.TemplateParameterOrBuilder getParametersOrBuilder(int index); - - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the dagTimeout field is set. - */ - boolean hasDagTimeout(); - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The dagTimeout. - */ - com.google.protobuf.Duration getDagTimeout(); - /** - * - * - *
-   * Optional. Timeout duration for the DAG of jobs, expressed in seconds (see
-   * [JSON representation of
-   * duration](https://developers.google.com/protocol-buffers/docs/proto3#json)).
-   * The timeout duration must be from 10 minutes ("600s") to 24 hours
-   * ("86400s"). The timer begins when the first job is submitted. If the
-   * workflow is running at the end of the timeout period, any remaining jobs
-   * are cancelled, the workflow is ended, and if the workflow was running on a
-   * [managed
-   * cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
-   * the cluster is deleted.
-   * 
- * - * .google.protobuf.Duration dag_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protobuf.DurationOrBuilder getDagTimeoutOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacement.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacement.java deleted file mode 100644 index 849040ec..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacement.java +++ /dev/null @@ -1,1169 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -/** - * - * - *
- * Specifies workflow execution target.
- * Either `managed_cluster` or `cluster_selector` is required.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowTemplatePlacement} - */ -public final class WorkflowTemplatePlacement extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.WorkflowTemplatePlacement) - WorkflowTemplatePlacementOrBuilder { - private static final long serialVersionUID = 0L; - // Use WorkflowTemplatePlacement.newBuilder() to construct. - private WorkflowTemplatePlacement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private WorkflowTemplatePlacement() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new WorkflowTemplatePlacement(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private WorkflowTemplatePlacement( - 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.dataproc.v1.ManagedCluster.Builder subBuilder = null; - if (placementCase_ == 1) { - subBuilder = ((com.google.cloud.dataproc.v1.ManagedCluster) placement_).toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1.ManagedCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.ManagedCluster) placement_); - placement_ = subBuilder.buildPartial(); - } - placementCase_ = 1; - break; - } - case 18: - { - com.google.cloud.dataproc.v1.ClusterSelector.Builder subBuilder = null; - if (placementCase_ == 2) { - subBuilder = - ((com.google.cloud.dataproc.v1.ClusterSelector) placement_).toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1.ClusterSelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1.ClusterSelector) placement_); - placement_ = subBuilder.buildPartial(); - } - placementCase_ = 2; - 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.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.class, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder.class); - } - - private int placementCase_ = 0; - private java.lang.Object placement_; - - public enum PlacementCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MANAGED_CLUSTER(1), - CLUSTER_SELECTOR(2), - PLACEMENT_NOT_SET(0); - private final int value; - - private PlacementCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PlacementCase valueOf(int value) { - return forNumber(value); - } - - public static PlacementCase forNumber(int value) { - switch (value) { - case 1: - return MANAGED_CLUSTER; - case 2: - return CLUSTER_SELECTOR; - case 0: - return PLACEMENT_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PlacementCase getPlacementCase() { - return PlacementCase.forNumber(placementCase_); - } - - public static final int MANAGED_CLUSTER_FIELD_NUMBER = 1; - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - @java.lang.Override - public boolean hasManagedCluster() { - return placementCase_ == 1; - } - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedCluster getManagedCluster() { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedClusterOrBuilder getManagedClusterOrBuilder() { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - - public static final int CLUSTER_SELECTOR_FIELD_NUMBER = 2; - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return Whether the clusterSelector field is set. - */ - @java.lang.Override - public boolean hasClusterSelector() { - return placementCase_ == 2; - } - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelector getClusterSelector() { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder getClusterSelectorOrBuilder() { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (placementCase_ == 1) { - output.writeMessage(1, (com.google.cloud.dataproc.v1.ManagedCluster) placement_); - } - if (placementCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1.ClusterSelector) placement_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (placementCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.dataproc.v1.ManagedCluster) placement_); - } - if (placementCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1.ClusterSelector) placement_); - } - 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.dataproc.v1.WorkflowTemplatePlacement)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement other = - (com.google.cloud.dataproc.v1.WorkflowTemplatePlacement) obj; - - if (!getPlacementCase().equals(other.getPlacementCase())) return false; - switch (placementCase_) { - case 1: - if (!getManagedCluster().equals(other.getManagedCluster())) return false; - break; - case 2: - if (!getClusterSelector().equals(other.getClusterSelector())) return false; - break; - case 0: - default: - } - 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(); - switch (placementCase_) { - case 1: - hash = (37 * hash) + MANAGED_CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getManagedCluster().hashCode(); - break; - case 2: - hash = (37 * hash) + CLUSTER_SELECTOR_FIELD_NUMBER; - hash = (53 * hash) + getClusterSelector().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement 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.dataproc.v1.WorkflowTemplatePlacement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement parseFrom( - 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.dataproc.v1.WorkflowTemplatePlacement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement 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.dataproc.v1.WorkflowTemplatePlacement parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement 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.dataproc.v1.WorkflowTemplatePlacement parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement 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.dataproc.v1.WorkflowTemplatePlacement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * Specifies workflow execution target.
-   * Either `managed_cluster` or `cluster_selector` is required.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.WorkflowTemplatePlacement} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.WorkflowTemplatePlacement) - com.google.cloud.dataproc.v1.WorkflowTemplatePlacementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.class, - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.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(); - placementCase_ = 0; - placement_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement build() { - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement buildPartial() { - com.google.cloud.dataproc.v1.WorkflowTemplatePlacement result = - new com.google.cloud.dataproc.v1.WorkflowTemplatePlacement(this); - if (placementCase_ == 1) { - if (managedClusterBuilder_ == null) { - result.placement_ = placement_; - } else { - result.placement_ = managedClusterBuilder_.build(); - } - } - if (placementCase_ == 2) { - if (clusterSelectorBuilder_ == null) { - result.placement_ = placement_; - } else { - result.placement_ = clusterSelectorBuilder_.build(); - } - } - result.placementCase_ = placementCase_; - 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.dataproc.v1.WorkflowTemplatePlacement) { - return mergeFrom((com.google.cloud.dataproc.v1.WorkflowTemplatePlacement) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.WorkflowTemplatePlacement other) { - if (other == com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.getDefaultInstance()) - return this; - switch (other.getPlacementCase()) { - case MANAGED_CLUSTER: - { - mergeManagedCluster(other.getManagedCluster()); - break; - } - case CLUSTER_SELECTOR: - { - mergeClusterSelector(other.getClusterSelector()); - break; - } - case PLACEMENT_NOT_SET: - { - break; - } - } - 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.dataproc.v1.WorkflowTemplatePlacement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1.WorkflowTemplatePlacement) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int placementCase_ = 0; - private java.lang.Object placement_; - - public PlacementCase getPlacementCase() { - return PlacementCase.forNumber(placementCase_); - } - - public Builder clearPlacement() { - placementCase_ = 0; - placement_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedCluster, - com.google.cloud.dataproc.v1.ManagedCluster.Builder, - com.google.cloud.dataproc.v1.ManagedClusterOrBuilder> - managedClusterBuilder_; - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - @java.lang.Override - public boolean hasManagedCluster() { - return placementCase_ == 1; - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedCluster getManagedCluster() { - if (managedClusterBuilder_ == null) { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } else { - if (placementCase_ == 1) { - return managedClusterBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - public Builder setManagedCluster(com.google.cloud.dataproc.v1.ManagedCluster value) { - if (managedClusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placement_ = value; - onChanged(); - } else { - managedClusterBuilder_.setMessage(value); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - public Builder setManagedCluster( - com.google.cloud.dataproc.v1.ManagedCluster.Builder builderForValue) { - if (managedClusterBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - managedClusterBuilder_.setMessage(builderForValue.build()); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - public Builder mergeManagedCluster(com.google.cloud.dataproc.v1.ManagedCluster value) { - if (managedClusterBuilder_ == null) { - if (placementCase_ == 1 - && placement_ != com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance()) { - placement_ = - com.google.cloud.dataproc.v1.ManagedCluster.newBuilder( - (com.google.cloud.dataproc.v1.ManagedCluster) placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - if (placementCase_ == 1) { - managedClusterBuilder_.mergeFrom(value); - } - managedClusterBuilder_.setMessage(value); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - public Builder clearManagedCluster() { - if (managedClusterBuilder_ == null) { - if (placementCase_ == 1) { - placementCase_ = 0; - placement_ = null; - onChanged(); - } - } else { - if (placementCase_ == 1) { - placementCase_ = 0; - placement_ = null; - } - managedClusterBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - public com.google.cloud.dataproc.v1.ManagedCluster.Builder getManagedClusterBuilder() { - return getManagedClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ManagedClusterOrBuilder getManagedClusterOrBuilder() { - if ((placementCase_ == 1) && (managedClusterBuilder_ != null)) { - return managedClusterBuilder_.getMessageOrBuilder(); - } else { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - } - /** - * - * - *
-     * A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedCluster, - com.google.cloud.dataproc.v1.ManagedCluster.Builder, - com.google.cloud.dataproc.v1.ManagedClusterOrBuilder> - getManagedClusterFieldBuilder() { - if (managedClusterBuilder_ == null) { - if (!(placementCase_ == 1)) { - placement_ = com.google.cloud.dataproc.v1.ManagedCluster.getDefaultInstance(); - } - managedClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ManagedCluster, - com.google.cloud.dataproc.v1.ManagedCluster.Builder, - com.google.cloud.dataproc.v1.ManagedClusterOrBuilder>( - (com.google.cloud.dataproc.v1.ManagedCluster) placement_, - getParentForChildren(), - isClean()); - placement_ = null; - } - placementCase_ = 1; - onChanged(); - ; - return managedClusterBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterSelector, - com.google.cloud.dataproc.v1.ClusterSelector.Builder, - com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder> - clusterSelectorBuilder_; - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return Whether the clusterSelector field is set. - */ - @java.lang.Override - public boolean hasClusterSelector() { - return placementCase_ == 2; - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelector getClusterSelector() { - if (clusterSelectorBuilder_ == null) { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } else { - if (placementCase_ == 2) { - return clusterSelectorBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - public Builder setClusterSelector(com.google.cloud.dataproc.v1.ClusterSelector value) { - if (clusterSelectorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placement_ = value; - onChanged(); - } else { - clusterSelectorBuilder_.setMessage(value); - } - placementCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - public Builder setClusterSelector( - com.google.cloud.dataproc.v1.ClusterSelector.Builder builderForValue) { - if (clusterSelectorBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - clusterSelectorBuilder_.setMessage(builderForValue.build()); - } - placementCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - public Builder mergeClusterSelector(com.google.cloud.dataproc.v1.ClusterSelector value) { - if (clusterSelectorBuilder_ == null) { - if (placementCase_ == 2 - && placement_ != com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance()) { - placement_ = - com.google.cloud.dataproc.v1.ClusterSelector.newBuilder( - (com.google.cloud.dataproc.v1.ClusterSelector) placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - if (placementCase_ == 2) { - clusterSelectorBuilder_.mergeFrom(value); - } - clusterSelectorBuilder_.setMessage(value); - } - placementCase_ = 2; - return this; - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - public Builder clearClusterSelector() { - if (clusterSelectorBuilder_ == null) { - if (placementCase_ == 2) { - placementCase_ = 0; - placement_ = null; - onChanged(); - } - } else { - if (placementCase_ == 2) { - placementCase_ = 0; - placement_ = null; - } - clusterSelectorBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - public com.google.cloud.dataproc.v1.ClusterSelector.Builder getClusterSelectorBuilder() { - return getClusterSelectorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder getClusterSelectorOrBuilder() { - if ((placementCase_ == 2) && (clusterSelectorBuilder_ != null)) { - return clusterSelectorBuilder_.getMessageOrBuilder(); - } else { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. A selector that chooses target cluster for jobs based
-     * on metadata.
-     * The selector is evaluated at the time each job is submitted.
-     * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterSelector, - com.google.cloud.dataproc.v1.ClusterSelector.Builder, - com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder> - getClusterSelectorFieldBuilder() { - if (clusterSelectorBuilder_ == null) { - if (!(placementCase_ == 2)) { - placement_ = com.google.cloud.dataproc.v1.ClusterSelector.getDefaultInstance(); - } - clusterSelectorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1.ClusterSelector, - com.google.cloud.dataproc.v1.ClusterSelector.Builder, - com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder>( - (com.google.cloud.dataproc.v1.ClusterSelector) placement_, - getParentForChildren(), - isClean()); - placement_ = null; - } - placementCase_ = 2; - onChanged(); - ; - return clusterSelectorBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.dataproc.v1.WorkflowTemplatePlacement) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.WorkflowTemplatePlacement) - private static final com.google.cloud.dataproc.v1.WorkflowTemplatePlacement DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.WorkflowTemplatePlacement(); - } - - public static com.google.cloud.dataproc.v1.WorkflowTemplatePlacement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WorkflowTemplatePlacement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WorkflowTemplatePlacement(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.dataproc.v1.WorkflowTemplatePlacement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacementOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacementOrBuilder.java deleted file mode 100644 index 5f6a313a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacementOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public interface WorkflowTemplatePlacementOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.WorkflowTemplatePlacement) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - boolean hasManagedCluster(); - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - com.google.cloud.dataproc.v1.ManagedCluster getManagedCluster(); - /** - * - * - *
-   * A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1.ManagedCluster managed_cluster = 1; - */ - com.google.cloud.dataproc.v1.ManagedClusterOrBuilder getManagedClusterOrBuilder(); - - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return Whether the clusterSelector field is set. - */ - boolean hasClusterSelector(); - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - com.google.cloud.dataproc.v1.ClusterSelector getClusterSelector(); - /** - * - * - *
-   * Optional. A selector that chooses target cluster for jobs based
-   * on metadata.
-   * The selector is evaluated at the time each job is submitted.
-   * 
- * - * .google.cloud.dataproc.v1.ClusterSelector cluster_selector = 2; - */ - com.google.cloud.dataproc.v1.ClusterSelectorOrBuilder getClusterSelectorOrBuilder(); - - public com.google.cloud.dataproc.v1.WorkflowTemplatePlacement.PlacementCase getPlacementCase(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatesProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatesProto.java deleted file mode 100644 index b5036aaf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatesProto.java +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/workflow_templates.proto - -package com.google.cloud.dataproc.v1; - -public final class WorkflowTemplatesProto { - private WorkflowTemplatesProto() {} - - 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_dataproc_v1_WorkflowTemplate_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ManagedCluster_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ManagedCluster_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ManagedCluster_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_OrderedJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_OrderedJob_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_OrderedJob_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_TemplateParameter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ParameterValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_RegexValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ValueValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ClusterOperation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowGraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_WorkflowNode_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n1google/cloud/dataproc/v1/workflow_temp" - + "lates.proto\022\030google.cloud.dataproc.v1\032\034g" - + "oogle/api/annotations.proto\032\027google/api/" - + "client.proto\032\037google/api/field_behavior." - + "proto\032\031google/api/resource.proto\032\'google" - + "/cloud/dataproc/v1/clusters.proto\032#googl" - + "e/cloud/dataproc/v1/jobs.proto\032#google/l" - + "ongrunning/operations.proto\032\036google/prot" - + "obuf/duration.proto\032\033google/protobuf/emp" - + "ty.proto\032\037google/protobuf/timestamp.prot" - + "o\"\202\006\n\020WorkflowTemplate\022\017\n\002id\030\002 \001(\tB\003\340A\002\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\007version\030\003 \001(\005B\003\340A\001" - + "\0224\n\013create_time\030\004 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\003\022K\n\006labels\030\006" - + " \003(\01326.google.cloud.dataproc.v1.Workflow" - + "Template.LabelsEntryB\003\340A\001\022K\n\tplacement\030\007" - + " \001(\01323.google.cloud.dataproc.v1.Workflow" - + "TemplatePlacementB\003\340A\002\0227\n\004jobs\030\010 \003(\0132$.g" - + "oogle.cloud.dataproc.v1.OrderedJobB\003\340A\002\022" - + "D\n\nparameters\030\t \003(\0132+.google.cloud.datap" - + "roc.v1.TemplateParameterB\003\340A\001\0223\n\013dag_tim" - + "eout\030\n \001(\0132\031.google.protobuf.DurationB\003\340" - + "A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001:\312\001\352A\306\001\n(dataproc.googleapis.co" - + "m/WorkflowTemplate\022Iprojects/{project}/r" - + "egions/{region}/workflowTemplates/{workf" - + "low_template}\022Mprojects/{project}/locati" - + "ons/{location}/workflowTemplates/{workfl" - + "ow_template} \001\"\264\001\n\031WorkflowTemplatePlace" - + "ment\022C\n\017managed_cluster\030\001 \001(\0132(.google.c" - + "loud.dataproc.v1.ManagedClusterH\000\022E\n\020clu" - + "ster_selector\030\002 \001(\0132).google.cloud.datap" - + "roc.v1.ClusterSelectorH\000B\013\n\tplacement\"\343\001" - + "\n\016ManagedCluster\022\031\n\014cluster_name\030\002 \001(\tB\003" - + "\340A\002\022<\n\006config\030\003 \001(\0132\'.google.cloud.datap" - + "roc.v1.ClusterConfigB\003\340A\002\022I\n\006labels\030\004 \003(" - + "\01324.google.cloud.dataproc.v1.ManagedClus" - + "ter.LabelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\265\001\n\017ClusterS" - + "elector\022\021\n\004zone\030\001 \001(\tB\003\340A\001\022Y\n\016cluster_la" - + "bels\030\002 \003(\0132<.google.cloud.dataproc.v1.Cl" - + "usterSelector.ClusterLabelsEntryB\003\340A\002\0324\n" - + "\022ClusterLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\206\006\n\nOrderedJob\022\024\n\007step_id\030\001 " - + "\001(\tB\003\340A\002\022>\n\nhadoop_job\030\002 \001(\0132#.google.cl" - + "oud.dataproc.v1.HadoopJobB\003\340A\001H\000\022<\n\tspar" - + "k_job\030\003 \001(\0132\".google.cloud.dataproc.v1.S" - + "parkJobB\003\340A\001H\000\022@\n\013pyspark_job\030\004 \001(\0132$.go" - + "ogle.cloud.dataproc.v1.PySparkJobB\003\340A\001H\000" - + "\022:\n\010hive_job\030\005 \001(\0132!.google.cloud.datapr" - + "oc.v1.HiveJobB\003\340A\001H\000\0228\n\007pig_job\030\006 \001(\0132 ." - + "google.cloud.dataproc.v1.PigJobB\003\340A\001H\000\022?" - + "\n\013spark_r_job\030\013 \001(\0132#.google.cloud.datap" - + "roc.v1.SparkRJobB\003\340A\001H\000\022C\n\rspark_sql_job" - + "\030\007 \001(\0132%.google.cloud.dataproc.v1.SparkS" - + "qlJobB\003\340A\001H\000\022>\n\npresto_job\030\014 \001(\0132#.googl" - + "e.cloud.dataproc.v1.PrestoJobB\003\340A\001H\000\022E\n\006" - + "labels\030\010 \003(\01320.google.cloud.dataproc.v1." - + "OrderedJob.LabelsEntryB\003\340A\001\022@\n\nschedulin" - + "g\030\t \001(\0132\'.google.cloud.dataproc.v1.JobSc" - + "hedulingB\003\340A\001\022\"\n\025prerequisite_step_ids\030\n" - + " \003(\tB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001B\n\n\010job_type\"\235\001\n\021Templat" - + "eParameter\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\006fields\030" - + "\002 \003(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022F\n\n" - + "validation\030\004 \001(\0132-.google.cloud.dataproc" - + ".v1.ParameterValidationB\003\340A\001\"\241\001\n\023Paramet" - + "erValidation\022:\n\005regex\030\001 \001(\0132).google.clo" - + "ud.dataproc.v1.RegexValidationH\000\022;\n\006valu" - + "es\030\002 \001(\0132).google.cloud.dataproc.v1.Valu" - + "eValidationH\000B\021\n\017validation_type\"\'\n\017Rege" - + "xValidation\022\024\n\007regexes\030\001 \003(\tB\003\340A\002\"&\n\017Val" - + "ueValidation\022\023\n\006values\030\001 \003(\tB\003\340A\002\"\324\006\n\020Wo" - + "rkflowMetadata\022\025\n\010template\030\001 \001(\tB\003\340A\003\022\024\n" - + "\007version\030\002 \001(\005B\003\340A\003\022G\n\016create_cluster\030\003 " - + "\001(\0132*.google.cloud.dataproc.v1.ClusterOp" - + "erationB\003\340A\003\022;\n\005graph\030\004 \001(\0132\'.google.clo" - + "ud.dataproc.v1.WorkflowGraphB\003\340A\003\022G\n\016del" - + "ete_cluster\030\005 \001(\0132*.google.cloud.datapro" - + "c.v1.ClusterOperationB\003\340A\003\022D\n\005state\030\006 \001(" - + "\01620.google.cloud.dataproc.v1.WorkflowMet" - + "adata.StateB\003\340A\003\022\031\n\014cluster_name\030\007 \001(\tB\003" - + "\340A\003\022N\n\nparameters\030\010 \003(\0132:.google.cloud.d" - + "ataproc.v1.WorkflowMetadata.ParametersEn" - + "try\0223\n\nstart_time\030\t \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\0221\n\010end_time\030\n \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\022\031\n\014cluster_u" - + "uid\030\013 \001(\tB\003\340A\003\0223\n\013dag_timeout\030\014 \001(\0132\031.go" - + "ogle.protobuf.DurationB\003\340A\003\0227\n\016dag_start" - + "_time\030\r \001(\0132\032.google.protobuf.TimestampB" - + "\003\340A\003\0225\n\014dag_end_time\030\016 \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\0321\n\017ParametersEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"8\n\005State\022" - + "\013\n\007UNKNOWN\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\010" - + "\n\004DONE\020\003\"T\n\020ClusterOperation\022\031\n\014operatio" - + "n_id\030\001 \001(\tB\003\340A\003\022\022\n\005error\030\002 \001(\tB\003\340A\003\022\021\n\004d" - + "one\030\003 \001(\010B\003\340A\003\"K\n\rWorkflowGraph\022:\n\005nodes" - + "\030\001 \003(\0132&.google.cloud.dataproc.v1.Workfl" - + "owNodeB\003\340A\003\"\243\002\n\014WorkflowNode\022\024\n\007step_id\030" - + "\001 \001(\tB\003\340A\003\022\"\n\025prerequisite_step_ids\030\002 \003(" - + "\tB\003\340A\003\022\023\n\006job_id\030\003 \001(\tB\003\340A\003\022D\n\005state\030\005 \001" - + "(\01620.google.cloud.dataproc.v1.WorkflowNo" - + "de.NodeStateB\003\340A\003\022\022\n\005error\030\006 \001(\tB\003\340A\003\"j\n" - + "\tNodeState\022\032\n\026NODE_STATE_UNSPECIFIED\020\000\022\013" - + "\n\007BLOCKED\020\001\022\014\n\010RUNNABLE\020\002\022\013\n\007RUNNING\020\003\022\r" - + "\n\tCOMPLETED\020\004\022\n\n\006FAILED\020\005\"\244\001\n\035CreateWork" - + "flowTemplateRequest\022@\n\006parent\030\001 \001(\tB0\340A\002" - + "\372A*\022(dataproc.googleapis.com/WorkflowTem" - + "plate\022A\n\010template\030\002 \001(\0132*.google.cloud.d" - + "ataproc.v1.WorkflowTemplateB\003\340A\002\"r\n\032GetW" - + "orkflowTemplateRequest\022>\n\004name\030\001 \001(\tB0\340A" - + "\002\372A*\n(dataproc.googleapis.com/WorkflowTe" - + "mplate\022\024\n\007version\030\002 \001(\005B\003\340A\001\"\255\002\n\"Instant" - + "iateWorkflowTemplateRequest\022>\n\004name\030\001 \001(" - + "\tB0\340A\002\372A*\n(dataproc.googleapis.com/Workf" - + "lowTemplate\022\024\n\007version\030\002 \001(\005B\003\340A\001\022\027\n\nreq" - + "uest_id\030\005 \001(\tB\003\340A\001\022e\n\nparameters\030\006 \003(\0132L" - + ".google.cloud.dataproc.v1.InstantiateWor" - + "kflowTemplateRequest.ParametersEntryB\003\340A" - + "\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001\"\310\001\n(InstantiateInlineWorkfl" - + "owTemplateRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A" - + "*\022(dataproc.googleapis.com/WorkflowTempl" - + "ate\022A\n\010template\030\002 \001(\0132*.google.cloud.dat" - + "aproc.v1.WorkflowTemplateB\003\340A\002\022\027\n\nreques" - + "t_id\030\003 \001(\tB\003\340A\001\"b\n\035UpdateWorkflowTemplat" - + "eRequest\022A\n\010template\030\001 \001(\0132*.google.clou" - + "d.dataproc.v1.WorkflowTemplateB\003\340A\002\"\221\001\n\034" - + "ListWorkflowTemplatesRequest\022@\n\006parent\030\001" - + " \001(\tB0\340A\002\372A*\022(dataproc.googleapis.com/Wo" - + "rkflowTemplate\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027" - + "\n\npage_token\030\003 \001(\tB\003\340A\001\"\201\001\n\035ListWorkflow" - + "TemplatesResponse\022B\n\ttemplates\030\001 \003(\0132*.g" - + "oogle.cloud.dataproc.v1.WorkflowTemplate" - + "B\003\340A\003\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\003\"u\n\035D" - + "eleteWorkflowTemplateRequest\022>\n\004name\030\001 \001" - + "(\tB0\340A\002\372A*\n(dataproc.googleapis.com/Work" - + "flowTemplate\022\024\n\007version\030\002 \001(\005B\003\340A\0012\346\020\n\027W" - + "orkflowTemplateService\022\233\002\n\026CreateWorkflo" - + "wTemplate\0227.google.cloud.dataproc.v1.Cre" - + "ateWorkflowTemplateRequest\032*.google.clou" - + "d.dataproc.v1.WorkflowTemplate\"\233\001\202\323\344\223\002\202\001" - + "\"5/v1/{parent=projects/*/locations/*}/wo" - + "rkflowTemplates:\010templateZ?\"3/v1/{parent" - + "=projects/*/regions/*}/workflowTemplates" - + ":\010template\332A\017parent,template\022\364\001\n\023GetWork" - + "flowTemplate\0224.google.cloud.dataproc.v1." - + "GetWorkflowTemplateRequest\032*.google.clou" - + "d.dataproc.v1.WorkflowTemplate\"{\202\323\344\223\002n\0225" - + "/v1/{name=projects/*/locations/*/workflo" - + "wTemplates/*}Z5\0223/v1/{name=projects/*/re" - + "gions/*/workflowTemplates/*}\332A\004name\022\325\002\n\033" - + "InstantiateWorkflowTemplate\022<.google.clo" - + "ud.dataproc.v1.InstantiateWorkflowTempla" - + "teRequest\032\035.google.longrunning.Operation" - + "\"\330\001\202\323\344\223\002\214\001\"A/v1/{name=projects/*/locatio" - + "ns/*/workflowTemplates/*}:instantiate:\001*" - + "ZD\"?/v1/{name=projects/*/regions/*/workf" - + "lowTemplates/*}:instantiate:\001*\332A\004name\332A\017" - + "name,parameters\312A)\n\025google.protobuf.Empt" - + "y\022\020WorkflowMetadata\022\364\002\n!InstantiateInlin" - + "eWorkflowTemplate\022B.google.cloud.datapro" - + "c.v1.InstantiateInlineWorkflowTemplateRe" - + "quest\032\035.google.longrunning.Operation\"\353\001\202" - + "\323\344\223\002\246\001\"G/v1/{parent=projects/*/locations" - + "/*}/workflowTemplates:instantiateInline:" - + "\010templateZQ\"E/v1/{parent=projects/*/regi" - + "ons/*}/workflowTemplates:instantiateInli" - + "ne:\010template\332A\017parent,template\312A)\n\025googl" - + "e.protobuf.Empty\022\020WorkflowMetadata\022\246\002\n\026U" - + "pdateWorkflowTemplate\0227.google.cloud.dat" - + "aproc.v1.UpdateWorkflowTemplateRequest\032*" - + ".google.cloud.dataproc.v1.WorkflowTempla" - + "te\"\246\001\202\323\344\223\002\224\001\032>/v1/{template.name=project" - + "s/*/locations/*/workflowTemplates/*}:\010te" - + "mplateZH\032 - * A YARN application created by a job. Application information is a subset of - * <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>. - * **Beta Feature**: This report is available for testing purposes only. It may - * be changed before final release. - * - * - * Protobuf type {@code google.cloud.dataproc.v1.YarnApplication} - */ -public final class YarnApplication extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.YarnApplication) - YarnApplicationOrBuilder { - private static final long serialVersionUID = 0L; - // Use YarnApplication.newBuilder() to construct. - private YarnApplication(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private YarnApplication() { - name_ = ""; - state_ = 0; - trackingUrl_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new YarnApplication(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private YarnApplication( - 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 16: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 29: - { - progress_ = input.readFloat(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - trackingUrl_ = 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.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_YarnApplication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.YarnApplication.class, - com.google.cloud.dataproc.v1.YarnApplication.Builder.class); - } - - /** - * - * - *
-   * The application state, corresponding to
-   * <code>YarnProtos.YarnApplicationStateProto</code>.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1.YarnApplication.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Status is unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * Status is NEW.
-     * 
- * - * NEW = 1; - */ - NEW(1), - /** - * - * - *
-     * Status is NEW_SAVING.
-     * 
- * - * NEW_SAVING = 2; - */ - NEW_SAVING(2), - /** - * - * - *
-     * Status is SUBMITTED.
-     * 
- * - * SUBMITTED = 3; - */ - SUBMITTED(3), - /** - * - * - *
-     * Status is ACCEPTED.
-     * 
- * - * ACCEPTED = 4; - */ - ACCEPTED(4), - /** - * - * - *
-     * Status is RUNNING.
-     * 
- * - * RUNNING = 5; - */ - RUNNING(5), - /** - * - * - *
-     * Status is FINISHED.
-     * 
- * - * FINISHED = 6; - */ - FINISHED(6), - /** - * - * - *
-     * Status is FAILED.
-     * 
- * - * FAILED = 7; - */ - FAILED(7), - /** - * - * - *
-     * Status is KILLED.
-     * 
- * - * KILLED = 8; - */ - KILLED(8), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Status is unspecified.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Status is NEW.
-     * 
- * - * NEW = 1; - */ - public static final int NEW_VALUE = 1; - /** - * - * - *
-     * Status is NEW_SAVING.
-     * 
- * - * NEW_SAVING = 2; - */ - public static final int NEW_SAVING_VALUE = 2; - /** - * - * - *
-     * Status is SUBMITTED.
-     * 
- * - * SUBMITTED = 3; - */ - public static final int SUBMITTED_VALUE = 3; - /** - * - * - *
-     * Status is ACCEPTED.
-     * 
- * - * ACCEPTED = 4; - */ - public static final int ACCEPTED_VALUE = 4; - /** - * - * - *
-     * Status is RUNNING.
-     * 
- * - * RUNNING = 5; - */ - public static final int RUNNING_VALUE = 5; - /** - * - * - *
-     * Status is FINISHED.
-     * 
- * - * FINISHED = 6; - */ - public static final int FINISHED_VALUE = 6; - /** - * - * - *
-     * Status is FAILED.
-     * 
- * - * FAILED = 7; - */ - public static final int FAILED_VALUE = 7; - /** - * - * - *
-     * Status is KILLED.
-     * 
- * - * KILLED = 8; - */ - public static final int KILLED_VALUE = 8; - - 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 NEW; - case 2: - return NEW_SAVING; - case 3: - return SUBMITTED; - case 4: - return ACCEPTED; - case 5: - return RUNNING; - case 6: - return FINISHED; - case 7: - return FAILED; - case 8: - return KILLED; - 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.dataproc.v1.YarnApplication.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.YarnApplication.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 STATE_FIELD_NUMBER = 2; - private int state_; - /** - * - * - *
-   * Required. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Required. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.YarnApplication.State result = - com.google.cloud.dataproc.v1.YarnApplication.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.YarnApplication.State.UNRECOGNIZED - : result; - } - - public static final int PROGRESS_FIELD_NUMBER = 3; - private float progress_; - /** - * - * - *
-   * Required. The numerical progress of the application, from 1 to 100.
-   * 
- * - * float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The progress. - */ - @java.lang.Override - public float getProgress() { - return progress_; - } - - public static final int TRACKING_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object trackingUrl_; - /** - * - * - *
-   * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-   * TimelineServer that provides application-specific information. The URL uses
-   * the internal hostname, and requires a proxy server for resolution and,
-   * possibly, access.
-   * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The trackingUrl. - */ - @java.lang.Override - public java.lang.String getTrackingUrl() { - java.lang.Object ref = trackingUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - trackingUrl_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-   * TimelineServer that provides application-specific information. The URL uses
-   * the internal hostname, and requires a proxy server for resolution and,
-   * possibly, access.
-   * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for trackingUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTrackingUrlBytes() { - java.lang.Object ref = trackingUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - trackingUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (state_ - != com.google.cloud.dataproc.v1.YarnApplication.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, state_); - } - if (progress_ != 0F) { - output.writeFloat(3, progress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackingUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, trackingUrl_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (state_ - != com.google.cloud.dataproc.v1.YarnApplication.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); - } - if (progress_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, progress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackingUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, trackingUrl_); - } - 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.dataproc.v1.YarnApplication)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1.YarnApplication other = - (com.google.cloud.dataproc.v1.YarnApplication) obj; - - if (!getName().equals(other.getName())) return false; - if (state_ != other.state_) return false; - if (java.lang.Float.floatToIntBits(getProgress()) - != java.lang.Float.floatToIntBits(other.getProgress())) return false; - if (!getTrackingUrl().equals(other.getTrackingUrl())) 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) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + PROGRESS_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getProgress()); - hash = (37 * hash) + TRACKING_URL_FIELD_NUMBER; - hash = (53 * hash) + getTrackingUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1.YarnApplication parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.YarnApplication 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.dataproc.v1.YarnApplication parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.YarnApplication parseFrom( - 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.dataproc.v1.YarnApplication parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1.YarnApplication parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1.YarnApplication parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.YarnApplication 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.dataproc.v1.YarnApplication parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.YarnApplication 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.dataproc.v1.YarnApplication parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1.YarnApplication 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.dataproc.v1.YarnApplication prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A YARN application created by a job. Application information is a subset of
-   * <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</code>.
-   * **Beta Feature**: This report is available for testing purposes only. It may
-   * be changed before final release.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1.YarnApplication} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.YarnApplication) - com.google.cloud.dataproc.v1.YarnApplicationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_YarnApplication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1.YarnApplication.class, - com.google.cloud.dataproc.v1.YarnApplication.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1.YarnApplication.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_ = ""; - - state_ = 0; - - progress_ = 0F; - - trackingUrl_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1.JobsProto - .internal_static_google_cloud_dataproc_v1_YarnApplication_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication build() { - com.google.cloud.dataproc.v1.YarnApplication result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication buildPartial() { - com.google.cloud.dataproc.v1.YarnApplication result = - new com.google.cloud.dataproc.v1.YarnApplication(this); - result.name_ = name_; - result.state_ = state_; - result.progress_ = progress_; - result.trackingUrl_ = trackingUrl_; - 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.dataproc.v1.YarnApplication) { - return mergeFrom((com.google.cloud.dataproc.v1.YarnApplication) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1.YarnApplication other) { - if (other == com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.getProgress() != 0F) { - setProgress(other.getProgress()); - } - if (!other.getTrackingUrl().isEmpty()) { - trackingUrl_ = other.trackingUrl_; - 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.dataproc.v1.YarnApplication parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1.YarnApplication) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The application name.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The application name.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The application name.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - /** - * - * - *
-     * Required. The application name.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The application name.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 int state_ = 0; - /** - * - * - *
-     * Required. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Required. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - /** - * - * - *
-     * Required. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.YarnApplication.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1.YarnApplication.State result = - com.google.cloud.dataproc.v1.YarnApplication.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1.YarnApplication.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Required. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1.YarnApplication.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private float progress_; - /** - * - * - *
-     * Required. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The progress. - */ - @java.lang.Override - public float getProgress() { - return progress_; - } - /** - * - * - *
-     * Required. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The progress to set. - * @return This builder for chaining. - */ - public Builder setProgress(float value) { - - progress_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearProgress() { - - progress_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object trackingUrl_ = ""; - /** - * - * - *
-     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-     * TimelineServer that provides application-specific information. The URL uses
-     * the internal hostname, and requires a proxy server for resolution and,
-     * possibly, access.
-     * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The trackingUrl. - */ - public java.lang.String getTrackingUrl() { - java.lang.Object ref = trackingUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - trackingUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-     * TimelineServer that provides application-specific information. The URL uses
-     * the internal hostname, and requires a proxy server for resolution and,
-     * possibly, access.
-     * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for trackingUrl. - */ - public com.google.protobuf.ByteString getTrackingUrlBytes() { - java.lang.Object ref = trackingUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - trackingUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-     * TimelineServer that provides application-specific information. The URL uses
-     * the internal hostname, and requires a proxy server for resolution and,
-     * possibly, access.
-     * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The trackingUrl to set. - * @return This builder for chaining. - */ - public Builder setTrackingUrl(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - trackingUrl_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-     * TimelineServer that provides application-specific information. The URL uses
-     * the internal hostname, and requires a proxy server for resolution and,
-     * possibly, access.
-     * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearTrackingUrl() { - - trackingUrl_ = getDefaultInstance().getTrackingUrl(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-     * TimelineServer that provides application-specific information. The URL uses
-     * the internal hostname, and requires a proxy server for resolution and,
-     * possibly, access.
-     * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for trackingUrl to set. - * @return This builder for chaining. - */ - public Builder setTrackingUrlBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - trackingUrl_ = 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.dataproc.v1.YarnApplication) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.YarnApplication) - private static final com.google.cloud.dataproc.v1.YarnApplication DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.YarnApplication(); - } - - public static com.google.cloud.dataproc.v1.YarnApplication getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public YarnApplication parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new YarnApplication(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.dataproc.v1.YarnApplication getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplicationOrBuilder.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplicationOrBuilder.java deleted file mode 100644 index f748c330..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplicationOrBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/dataproc/v1/jobs.proto - -package com.google.cloud.dataproc.v1; - -public interface YarnApplicationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.YarnApplication) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Required. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1.YarnApplication.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1.YarnApplication.State getState(); - - /** - * - * - *
-   * Required. The numerical progress of the application, from 1 to 100.
-   * 
- * - * float progress = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The progress. - */ - float getProgress(); - - /** - * - * - *
-   * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-   * TimelineServer that provides application-specific information. The URL uses
-   * the internal hostname, and requires a proxy server for resolution and,
-   * possibly, access.
-   * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The trackingUrl. - */ - java.lang.String getTrackingUrl(); - /** - * - * - *
-   * Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or
-   * TimelineServer that provides application-specific information. The URL uses
-   * the internal hostname, and requires a proxy server for resolution and,
-   * possibly, access.
-   * 
- * - * string tracking_url = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for trackingUrl. - */ - com.google.protobuf.ByteString getTrackingUrlBytes(); -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto deleted file mode 100644 index 94b225a4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto +++ /dev/null @@ -1,364 +0,0 @@ -// 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.dataproc.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "AutoscalingPoliciesProto"; -option java_package = "com.google.cloud.dataproc.v1"; -option (google.api.resource_definition) = { - type: "dataproc.googleapis.com/Region" - pattern: "projects/{project}/regions/{region}" -}; - -// The API interface for managing autoscaling policies in the -// Dataproc API. -service AutoscalingPolicyService { - option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates new autoscaling policy. - rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" - body: "policy" - additional_bindings { - post: "/v1/{parent=projects/*/regions/*}/autoscalingPolicies" - body: "policy" - } - }; - option (google.api.method_signature) = "parent,policy"; - } - - // Updates (replaces) autoscaling policy. - // - // Disabled check for update_mask, because all updates will be full - // replacements. - rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { - option (google.api.http) = { - put: "/v1/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" - body: "policy" - additional_bindings { - put: "/v1/{policy.name=projects/*/regions/*/autoscalingPolicies/*}" - body: "policy" - } - }; - option (google.api.method_signature) = "policy"; - } - - // Retrieves autoscaling policy. - rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" - additional_bindings { - get: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists autoscaling policies in the project. - rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies" - additional_bindings { - get: "/v1/{parent=projects/*/regions/*}/autoscalingPolicies" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes an autoscaling policy. It is an error to delete an autoscaling - // policy that is in use by one or more clusters. - rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}" - additional_bindings { - delete: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// Describes an autoscaling policy for Dataproc cluster autoscaler. -message AutoscalingPolicy { - option (google.api.resource) = { - type: "dataproc.googleapis.com/AutoscalingPolicy" - pattern: "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}" - pattern: "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}" - }; - - // Required. The policy id. - // - // The id must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). Cannot begin or end with underscore - // or hyphen. Must consist of between 3 and 50 characters. - // - string id = 1; - - // Output only. The "resource name" of the autoscaling policy, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.autoscalingPolicies`, the resource name of the - // policy has the following format: - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - // - // * For `projects.locations.autoscalingPolicies`, the resource name of the - // policy has the following format: - // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Autoscaling algorithm for policy. - oneof algorithm { - BasicAutoscalingAlgorithm basic_algorithm = 3 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Describes how the autoscaler will operate for primary workers. - InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Describes how the autoscaler will operate for secondary workers. - InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The labels to associate with this autoscaling policy. - // Label **keys** must contain 1 to 63 characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // Label **values** may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to [RFC - // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - // associated with an autoscaling policy. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Basic algorithm for autoscaling. -message BasicAutoscalingAlgorithm { - // Required. YARN autoscaling configuration. - BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Duration between scaling events. A scaling period starts after - // the update operation from the previous event has completed. - // - // Bounds: [2m, 1d]. Default: 2m. - google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Basic autoscaling configurations for YARN. -message BasicYarnAutoscalingConfig { - // Required. Timeout for YARN graceful decommissioning of Node Managers. - // Specifies the duration to wait for jobs to complete before forcefully - // removing workers (and potentially interrupting jobs). Only applicable to - // downscaling operations. - // - // Bounds: [0s, 1d]. - google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. Fraction of average YARN pending memory in the last cooldown period - // for which to add workers. A scale-up factor of 1.0 will result in scaling - // up so that there is no pending memory remaining after the update (more - // aggressive scaling). A scale-up factor closer to 0 will result in a smaller - // magnitude of scaling up (less aggressive scaling). - // See [How autoscaling - // works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - // for more information. - // - // Bounds: [0.0, 1.0]. - double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Fraction of average YARN pending memory in the last cooldown period - // for which to remove workers. A scale-down factor of 1 will result in - // scaling down so that there is no available memory remaining after the - // update (more aggressive scaling). A scale-down factor of 0 disables - // removing workers, which can be beneficial for autoscaling a single job. - // See [How autoscaling - // works](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/autoscaling#how_autoscaling_works) - // for more information. - // - // Bounds: [0.0, 1.0]. - double scale_down_factor = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Minimum scale-up threshold as a fraction of total cluster size - // before scaling occurs. For example, in a 20-worker cluster, a threshold of - // 0.1 means the autoscaler must recommend at least a 2-worker scale-up for - // the cluster to scale. A threshold of 0 means the autoscaler will scale up - // on any recommended change. - // - // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum scale-down threshold as a fraction of total cluster size - // before scaling occurs. For example, in a 20-worker cluster, a threshold of - // 0.1 means the autoscaler must recommend at least a 2 worker scale-down for - // the cluster to scale. A threshold of 0 means the autoscaler will scale down - // on any recommended change. - // - // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for the size bounds of an instance group, including its -// proportional size to other groups. -message InstanceGroupAutoscalingPolicyConfig { - // Optional. Minimum number of instances for this group. - // - // Primary workers - Bounds: [2, max_instances]. Default: 2. - // Secondary workers - Bounds: [0, max_instances]. Default: 0. - int32 min_instances = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Maximum number of instances for this group. Required for primary - // workers. Note that by default, clusters will not use secondary workers. - // Required for secondary workers if the minimum secondary instances is set. - // - // Primary workers - Bounds: [min_instances, ). - // Secondary workers - Bounds: [min_instances, ). Default: 0. - int32 max_instances = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Weight for the instance group, which is used to determine the - // fraction of total workers in the cluster from this instance group. - // For example, if primary workers have weight 2, and secondary workers have - // weight 1, the cluster will have approximately 2 primary workers for each - // secondary worker. - // - // The cluster may not reach the specified balance if constrained - // by min/max bounds or other autoscaling settings. For example, if - // `max_instances` for secondary workers is 0, then only primary workers will - // be added. The cluster can also be out of balance when created. - // - // If weight is not set on any instance group, the cluster will default to - // equal weight for all groups: the cluster will attempt to maintain an equal - // number of workers in each group within the configured size bounds for each - // group. If weight is set for one group only, the cluster will default to - // zero weight on the unset group. For example if weight is set only on - // primary workers, the cluster will use primary workers only and no - // secondary workers. - int32 weight = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to create an autoscaling policy. -message CreateAutoscalingPolicyRequest { - // Required. The "resource name" of the region or location, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.autoscalingPolicies.create`, the resource name - // of the region has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.autoscalingPolicies.create`, the resource name - // of the location has the following format: - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/AutoscalingPolicy" - } - ]; - - // Required. The autoscaling policy to create. - AutoscalingPolicy policy = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to fetch an autoscaling policy. -message GetAutoscalingPolicyRequest { - // Required. The "resource name" of the autoscaling policy, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.autoscalingPolicies.get`, the resource name - // of the policy has the following format: - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - // - // * For `projects.locations.autoscalingPolicies.get`, the resource name - // of the policy has the following format: - // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/AutoscalingPolicy" - } - ]; -} - -// A request to update an autoscaling policy. -message UpdateAutoscalingPolicyRequest { - // Required. The updated autoscaling policy. - AutoscalingPolicy policy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to delete an autoscaling policy. -// -// Autoscaling policies in use by one or more clusters will not be deleted. -message DeleteAutoscalingPolicyRequest { - // Required. The "resource name" of the autoscaling policy, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.autoscalingPolicies.delete`, the resource name - // of the policy has the following format: - // `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` - // - // * For `projects.locations.autoscalingPolicies.delete`, the resource name - // of the policy has the following format: - // `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/AutoscalingPolicy" - } - ]; -} - -// A request to list autoscaling policies in a project. -message ListAutoscalingPoliciesRequest { - // Required. The "resource name" of the region or location, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.autoscalingPolicies.list`, the resource name - // of the region has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.autoscalingPolicies.list`, the resource name - // of the location has the following format: - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/AutoscalingPolicy" - } - ]; - - // Optional. The maximum number of results to return in each response. - // Must be less than or equal to 1000. Defaults to 100. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page token, returned by a previous call, to request the - // next page of results. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A response to a request to list autoscaling policies in a project. -message ListAutoscalingPoliciesResponse { - // Output only. Autoscaling policies list. - repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. This token is included in the response if there are more - // results to fetch. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/batches.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/batches.proto deleted file mode 100644 index eafb4e35..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/batches.proto +++ /dev/null @@ -1,372 +0,0 @@ -// 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.dataproc.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataproc/v1/shared.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "BatchesProto"; -option java_package = "com.google.cloud.dataproc.v1"; - -// The BatchController provides methods to manage batch workloads. -service BatchController { - option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a batch workload that executes asynchronously. - rpc CreateBatch(CreateBatchRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/batches" - body: "batch" - }; - option (google.api.method_signature) = "parent,batch,batch_id"; - option (google.longrunning.operation_info) = { - response_type: "Batch" - metadata_type: "google.cloud.dataproc.v1.BatchOperationMetadata" - }; - } - - // Gets the batch workload resource representation. - rpc GetBatch(GetBatchRequest) returns (Batch) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/batches/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists batch workloads. - rpc ListBatches(ListBatchesRequest) returns (ListBatchesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/batches" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes the batch workload resource. If the batch is not in terminal state, - // the delete fails and the response returns `FAILED_PRECONDITION`. - rpc DeleteBatch(DeleteBatchRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/batches/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// A request to create a batch workload. -message CreateBatchRequest { - // Required. The parent resource where this batch will be created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/Batch" - } - ]; - - // Required. The batch to create. - Batch batch = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The ID to use for the batch, which will become the final component of - // the batch's resource name. - // - // This value must be 4-63 characters. Valid characters are `/[a-z][0-9]-/`. - string batch_id = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique ID used to identify the request. If the service - // receives two - // [CreateBatchRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateBatchRequest)s - // with the same request_id, the second request is ignored and the - // Operation that corresponds to the first Batch created and stored - // in the backend is returned. - // - // Recommendation: Set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The value must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to get the resource representation for a batch workload. -message GetBatchRequest { - // Required. The name of the batch to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/Batch" - } - ]; -} - -// A request to list batch workloads in a project. -message ListBatchesRequest { - // Required. The parent, which owns this collection of batches. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/Batch" - } - ]; - - // Optional. The maximum number of batches to return in each response. - // The service may return fewer than this value. - // The default page size is 20; the maximum page size is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token received from a previous `ListBatches` call. - // Provide this token to retrieve the subsequent page. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of batch workloads. -message ListBatchesResponse { - // The batches from the specified collection. - repeated Batch batches = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// A request to delete a batch workload. -message DeleteBatchRequest { - // Required. The name of the batch resource to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/Batch" - } - ]; -} - -// A representation of a batch workload in the service. -message Batch { - option (google.api.resource) = { - type: "dataproc.googleapis.com/Batch" - pattern: "projects/{project}/locations/{location}/batches/{batch}" - }; - - // Historical state information. - message StateHistory { - // Output only. The state of the batch at this point in history. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Details about the state at this point in history. - string state_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the batch entered the historical state. - google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // The batch state. - enum State { - // The batch state is unknown. - STATE_UNSPECIFIED = 0; - - // The batch is created before running. - PENDING = 1; - - // The batch is running. - RUNNING = 2; - - // The batch is cancelling. - CANCELLING = 3; - - // The batch cancellation was successful. - CANCELLED = 4; - - // The batch completed successfully. - SUCCEEDED = 5; - - // The batch is no longer running due to an error. - FAILED = 6; - } - - // Output only. The resource name of the batch. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A batch UUID (Unique Universal Identifier). The service - // generates this value when it creates the batch. - string uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the batch was created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The application/framework-specific portion of the batch configuration. - oneof batch_config { - // Optional. PySpark batch config. - PySparkBatch pyspark_batch = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Spark batch config. - SparkBatch spark_batch = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SparkR batch config. - SparkRBatch spark_r_batch = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. SparkSql batch config. - SparkSqlBatch spark_sql_batch = 7 [(google.api.field_behavior) = OPTIONAL]; - } - - // Output only. Runtime information about batch execution. - RuntimeInfo runtime_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The state of the batch. - State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Batch state details, such as a failure - // description if the state is `FAILED`. - string state_message = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the batch entered a current state. - google.protobuf.Timestamp state_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The email address of the user who created the batch. - string creator = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The labels to associate with this batch. - // Label **keys** must contain 1 to 63 characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // Label **values** may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to [RFC - // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - // associated with a batch. - map labels = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Runtime configuration for the batch execution. - RuntimeConfig runtime_config = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Environment configuration for the batch execution. - EnvironmentConfig environment_config = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The resource name of the operation associated with this batch. - string operation = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Historical state information for the batch. - repeated StateHistory state_history = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A configuration for running an -// [Apache -// PySpark](https://spark.apache.org/docs/latest/api/python/getting_started/quickstart.html) -// batch workload. -message PySparkBatch { - // Required. The HCFS URI of the main Python file to use as the Spark driver. Must - // be a .py file. - string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The arguments to pass to the driver. Do not include arguments - // that can be set as batch properties, such as `--conf`, since a collision - // can occur that causes an incorrect batch submission. - repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS file URIs of Python files to pass to the PySpark - // framework. Supported file types: `.py`, `.egg`, and `.zip`. - repeated string python_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the classpath of the - // Spark driver and tasks. - repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A configuration for running an [Apache Spark](http://spark.apache.org/) -// batch workload. -message SparkBatch { - // The specification of the main method to call to drive the Spark - // workload. Specify either the jar file that contains the main class or the - // main class name. To pass both a main jar and a main class in that jar, add - // the jar to `jar_file_uris`, and then specify the main class - // name in `main_class`. - oneof driver { - // Optional. The HCFS URI of the jar file that contains the main class. - string main_jar_file_uri = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the driver main class. The jar file that contains the class - // must be in the classpath or specified in `jar_file_uris`. - string main_class = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The arguments to pass to the driver. Do not include arguments - // that can be set as batch properties, such as `--conf`, since a collision - // can occur that causes an incorrect batch submission. - repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the classpath of the - // Spark driver and tasks. - repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A configuration for running an -// [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) -// batch workload. -message SparkRBatch { - // Required. The HCFS URI of the main R file to use as the driver. - // Must be a `.R` or `.r` file. - string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The arguments to pass to the Spark driver. Do not include arguments - // that can be set as batch properties, such as `--conf`, since a collision - // can occur that causes an incorrect batch submission. - repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. - repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // `.jar`, `.tar`, `.tar.gz`, `.tgz`, and `.zip`. - repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// A configuration for running -// [Apache Spark SQL](http://spark.apache.org/sql/) queries as a batch workload. -message SparkSqlBatch { - // Required. The HCFS URI of the script that contains Spark SQL queries to execute. - string query_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Mapping of query variable names to values (equivalent to the - // Spark SQL command: `SET name="value";`). - map query_variables = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - repeated string jar_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto deleted file mode 100644 index 0b9f0a02..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto +++ /dev/null @@ -1,1295 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.dataproc.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataproc/v1/shared.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "ClustersProto"; -option java_package = "com.google.cloud.dataproc.v1"; -option (google.api.resource_definition) = { - type: "container.googleapis.com/Cluster" - pattern: "projects/{project}/locations/{location}/clusters/{cluster}" -}; -option (google.api.resource_definition) = { - type: "metastore.googleapis.com/Service" - pattern: "projects/{project}/locations/{location}/services/{service}" -}; - -// The ClusterControllerService provides methods to manage clusters -// of Compute Engine instances. -service ClusterController { - option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a cluster in a project. The returned - // [Operation.metadata][google.longrunning.Operation.metadata] will be - // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/clusters" - body: "cluster" - }; - option (google.api.method_signature) = "project_id,region,cluster"; - option (google.longrunning.operation_info) = { - response_type: "Cluster" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } - - // Updates a cluster in a project. The returned - // [Operation.metadata][google.longrunning.Operation.metadata] will be - // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - // The cluster must be in a [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error - // is returned. - rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" - body: "cluster" - }; - option (google.api.method_signature) = "project_id,region,cluster_name,cluster,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Cluster" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } - - // Stops a cluster in a project. - rpc StopCluster(StopClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:stop" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Cluster" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } - - // Starts a cluster in a project. - rpc StartCluster(StartClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:start" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Cluster" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } - - // Deletes a cluster in a project. The returned - // [Operation.metadata][google.longrunning.Operation.metadata] will be - // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" - }; - option (google.api.method_signature) = "project_id,region,cluster_name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } - - // Gets the resource representation for a cluster in a project. - rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { - get: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}" - }; - option (google.api.method_signature) = "project_id,region,cluster_name"; - } - - // Lists all regions/{region}/clusters in a project alphabetically. - rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) { - option (google.api.http) = { - get: "/v1/projects/{project_id}/regions/{region}/clusters" - }; - option (google.api.method_signature) = "project_id,region"; - option (google.api.method_signature) = "project_id,region,filter"; - } - - // Gets cluster diagnostic information. The returned - // [Operation.metadata][google.longrunning.Operation.metadata] will be - // [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). - // After the operation completes, - // [Operation.response][google.longrunning.Operation.response] - // contains - // [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). - rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/clusters/{cluster_name}:diagnose" - body: "*" - }; - option (google.api.method_signature) = "project_id,region,cluster_name"; - option (google.longrunning.operation_info) = { - response_type: "DiagnoseClusterResults" - metadata_type: "google.cloud.dataproc.v1.ClusterOperationMetadata" - }; - } -} - -// Describes the identifying information, config, and status of -// a Dataproc cluster -message Cluster { - // Required. The Google Cloud Platform project ID that the cluster belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. Cluster names within a project must be - // unique. Names of deleted clusters can be reused. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The cluster config for a cluster of Compute Engine Instances. - // Note that Dataproc may set default values, and values may change - // when clusters are updated. - ClusterConfig config = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The virtual cluster config, used when creating a Dataproc cluster that - // does not directly control the underlying compute resources, for example, - // when creating a [Dataproc-on-GKE - // cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). - // Note that Dataproc may set default values, and values may change when - // clusters are updated. Exactly one of config or virtualClusterConfig must be - // specified. - VirtualClusterConfig virtual_cluster_config = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The labels to associate with this cluster. - // Label **keys** must contain 1 to 63 characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // Label **values** may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to [RFC - // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - // associated with a cluster. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Cluster status. - ClusterStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The previous cluster status. - repeated ClusterStatus status_history = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A cluster UUID (Unique Universal Identifier). Dataproc - // generates this value when it creates the cluster. - string cluster_uuid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Contains cluster daemon metrics such as HDFS and YARN stats. - // - // **Beta Feature**: This report is available for testing purposes only. It - // may be changed before final release. - ClusterMetrics metrics = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The cluster config. -message ClusterConfig { - // Optional. A Cloud Storage bucket used to stage job - // dependencies, config files, and job driver console output. - // If you do not specify a staging bucket, Cloud - // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's staging bucket according to the - // Compute Engine zone where your cluster is deployed, and then create - // and manage this project-level, per-location bucket (see - // [Dataproc staging and temp - // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - // a Cloud Storage bucket.** - string config_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, - // such as Spark and MapReduce history files. - // If you do not specify a temp bucket, - // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's temp bucket according to the - // Compute Engine zone where your cluster is deployed, and then create - // and manage this project-level, per-location bucket. The default bucket has - // a TTL of 90 days, but you can use any TTL (or none) if you specify a - // bucket (see - // [Dataproc staging and temp - // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - // a Cloud Storage bucket.** - string temp_bucket = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The shared Compute Engine config settings for - // all instances in a cluster. - GceClusterConfig gce_cluster_config = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // the cluster's master instance. - InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // the cluster's worker instances. - InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // a cluster's secondary worker instances - InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The config settings for cluster software. - SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Commands to execute on each node after config is - // completed. By default, executables are run on master and all worker nodes. - // You can test a node's `role` metadata to run an executable on - // a master or worker node, as shown below using `curl` (you can also use - // `wget`): - // - // ROLE=$(curl -H Metadata-Flavor:Google - // http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) - // if [[ "${ROLE}" == 'Master' ]]; then - // ... master specific actions ... - // else - // ... worker specific actions ... - // fi - repeated NodeInitializationAction initialization_actions = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Encryption settings for the cluster. - EncryptionConfig encryption_config = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Autoscaling config for the policy associated with the cluster. - // Cluster does not autoscale if this field is unset. - AutoscalingConfig autoscaling_config = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Security settings for the cluster. - SecurityConfig security_config = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lifecycle setting for the cluster. - LifecycleConfig lifecycle_config = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Port/endpoint configuration for this cluster - EndpointConfig endpoint_config = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Metastore configuration. - MetastoreConfig metastore_config = 20 [(google.api.field_behavior) = OPTIONAL]; -} - -// Dataproc cluster config for a cluster that does not directly control the -// underlying compute resources, such as a [Dataproc-on-GKE -// cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). -message VirtualClusterConfig { - // Optional. A Storage bucket used to stage job - // dependencies, config files, and job driver console output. - // If you do not specify a staging bucket, Cloud - // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's staging bucket according to the - // Compute Engine zone where your cluster is deployed, and then create - // and manage this project-level, per-location bucket (see - // [Dataproc staging and temp - // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - // a Cloud Storage bucket.** - string staging_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data, - // such as Spark and MapReduce history files. - // If you do not specify a temp bucket, - // Dataproc will determine a Cloud Storage location (US, - // ASIA, or EU) for your cluster's temp bucket according to the - // Compute Engine zone where your cluster is deployed, and then create - // and manage this project-level, per-location bucket. The default bucket has - // a TTL of 90 days, but you can use any TTL (or none) if you specify a - // bucket (see - // [Dataproc staging and temp - // buckets](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - // **This field requires a Cloud Storage bucket name, not a `gs://...` URI to - // a Cloud Storage bucket.** - string temp_bucket = 2 [(google.api.field_behavior) = OPTIONAL]; - - oneof infrastructure_config { - // Required. The configuration for running the Dataproc cluster on Kubernetes. - KubernetesClusterConfig kubernetes_cluster_config = 6 [(google.api.field_behavior) = REQUIRED]; - } - - // Optional. Configuration of auxiliary services used by this cluster. - AuxiliaryServicesConfig auxiliary_services_config = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Auxiliary services configuration for a Cluster. -message AuxiliaryServicesConfig { - // Optional. The Hive Metastore configuration for this workload. - MetastoreConfig metastore_config = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Spark History Server configuration for the workload. - SparkHistoryServerConfig spark_history_server_config = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Endpoint config for this cluster -message EndpointConfig { - // Output only. The map of port descriptions to URLs. Will only be populated - // if enable_http_port_access is true. - map http_ports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. If true, enable http access to specific ports on the cluster - // from external sources. Defaults to false. - bool enable_http_port_access = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Autoscaling Policy config associated with the cluster. -message AutoscalingConfig { - // Optional. The autoscaling policy used by the cluster. - // - // Only resource names including projectid and location (region) are valid. - // Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - // * `projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]` - // - // Note that the policy must be in the same project and Dataproc region. - string policy_uri = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Encryption settings for the cluster. -message EncryptionConfig { - // Optional. The Cloud KMS key name to use for PD disk encryption for all - // instances in the cluster. - string gce_pd_kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Common config settings for resources of Compute Engine cluster -// instances, applicable to all instances in the cluster. -message GceClusterConfig { - // `PrivateIpv6GoogleAccess` controls whether and how Dataproc cluster nodes - // can communicate with Google Services through gRPC over IPv6. - // These values are directly mapped to corresponding values in the - // [Compute Engine Instance - // fields](https://cloud.google.com/compute/docs/reference/rest/v1/instances). - enum PrivateIpv6GoogleAccess { - // If unspecified, Compute Engine default behavior will apply, which - // is the same as [INHERIT_FROM_SUBNETWORK][google.cloud.dataproc.v1.GceClusterConfig.PrivateIpv6GoogleAccess.INHERIT_FROM_SUBNETWORK]. - PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - - // Private access to and from Google Services configuration - // inherited from the subnetwork configuration. This is the - // default Compute Engine behavior. - INHERIT_FROM_SUBNETWORK = 1; - - // Enables outbound private IPv6 access to Google Services from the Dataproc - // cluster. - OUTBOUND = 2; - - // Enables bidirectional private IPv6 access between Google Services and the - // Dataproc cluster. - BIDIRECTIONAL = 3; - } - - // Optional. The zone where the Compute Engine cluster will be located. - // On a create request, it is required in the "global" region. If omitted - // in a non-global Dataproc region, the service will pick a zone in the - // corresponding Compute Engine region. On a get request, zone will - // always be present. - // - // A full URL, partial URI, or short name are valid. Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]` - // * `projects/[project_id]/zones/[zone]` - // * `us-central1-f` - string zone_uri = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine network to be used for machine - // communications. Cannot be specified with subnetwork_uri. If neither - // `network_uri` nor `subnetwork_uri` is specified, the "default" network of - // the project is used, if it exists. Cannot be a "Custom Subnet Network" (see - // [Using Subnetworks](https://cloud.google.com/compute/docs/subnetworks) for - // more information). - // - // A full URL, partial URI, or short name are valid. Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` - // * `projects/[project_id]/regions/global/default` - // * `default` - string network_uri = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine subnetwork to be used for machine - // communications. Cannot be specified with network_uri. - // - // A full URL, partial URI, or short name are valid. Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - // * `projects/[project_id]/regions/us-east1/subnetworks/sub0` - // * `sub0` - string subnetwork_uri = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, all instances in the cluster will only have internal IP - // addresses. By default, clusters are not restricted to internal IP - // addresses, and will have ephemeral external IP addresses assigned to each - // instance. This `internal_ip_only` restriction can only be enabled for - // subnetwork enabled networks, and all off-cluster dependencies must be - // configured to be accessible without external IP addresses. - bool internal_ip_only = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of IPv6 access for a cluster. - PrivateIpv6GoogleAccess private_ipv6_google_access = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The [Dataproc service - // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) - // (also see [VM Data Plane - // identity](https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) - // used by Dataproc cluster VM instances to access Google Cloud Platform - // services. - // - // If not specified, the - // [Compute Engine default service - // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - // is used. - string service_account = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The URIs of service account scopes to be included in - // Compute Engine instances. The following base set of scopes is always - // included: - // - // * https://www.googleapis.com/auth/cloud.useraccounts.readonly - // * https://www.googleapis.com/auth/devstorage.read_write - // * https://www.googleapis.com/auth/logging.write - // - // If no scopes are specified, the following defaults are also provided: - // - // * https://www.googleapis.com/auth/bigquery - // * https://www.googleapis.com/auth/bigtable.admin.table - // * https://www.googleapis.com/auth/bigtable.data - // * https://www.googleapis.com/auth/devstorage.full_control - repeated string service_account_scopes = 3 [(google.api.field_behavior) = OPTIONAL]; - - // The Compute Engine tags to add to all instances (see [Tagging - // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - repeated string tags = 4; - - // The Compute Engine metadata entries to add to all instances (see - // [Project and instance - // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - map metadata = 5; - - // Optional. Reservation Affinity for consuming Zonal reservation. - ReservationAffinity reservation_affinity = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Node Group Affinity for sole-tenant clusters. - NodeGroupAffinity node_group_affinity = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Shielded Instance Config for clusters using [Compute Engine Shielded - // VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). - ShieldedInstanceConfig shielded_instance_config = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Confidential Instance Config for clusters using [Confidential - // VMs](https://cloud.google.com/compute/confidential-vm/docs). - ConfidentialInstanceConfig confidential_instance_config = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// Node Group Affinity for clusters using sole-tenant node groups. -message NodeGroupAffinity { - // Required. The URI of a - // sole-tenant [node group - // resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups) - // that the cluster will be created on. - // - // A full URL, partial URI, or node group name are valid. Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1` - // * `projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1` - // * `node-group-1` - string node_group_uri = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Shielded Instance Config for clusters using [Compute Engine Shielded -// VMs](https://cloud.google.com/security/shielded-cloud/shielded-vm). -message ShieldedInstanceConfig { - // Optional. Defines whether instances have Secure Boot enabled. - bool enable_secure_boot = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Defines whether instances have the vTPM enabled. - bool enable_vtpm = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Defines whether instances have integrity monitoring enabled. - bool enable_integrity_monitoring = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Confidential Instance Config for clusters using [Confidential -// VMs](https://cloud.google.com/compute/confidential-vm/docs) -message ConfidentialInstanceConfig { - // Optional. Defines whether the instance should have confidential compute enabled. - bool enable_confidential_compute = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The config settings for Compute Engine resources in -// an instance group, such as a master or worker group. -message InstanceGroupConfig { - // Controls the use of - // [preemptible instances] - // (https://cloud.google.com/compute/docs/instances/preemptible) - // within the group. - enum Preemptibility { - // Preemptibility is unspecified, the system will choose the - // appropriate setting for each instance group. - PREEMPTIBILITY_UNSPECIFIED = 0; - - // Instances are non-preemptible. - // - // This option is allowed for all instance groups and is the only valid - // value for Master and Worker instance groups. - NON_PREEMPTIBLE = 1; - - // Instances are preemptible. - // - // This option is allowed only for secondary worker groups. - PREEMPTIBLE = 2; - } - - // Optional. The number of VM instances in the instance group. - // For [HA - // cluster](/dataproc/docs/concepts/configuring-clusters/high-availability) - // [master_config](#FIELDS.master_config) groups, **must be set to 3**. - // For standard cluster [master_config](#FIELDS.master_config) groups, - // **must be set to 1**. - int32 num_instances = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The list of instance names. Dataproc derives the names - // from `cluster_name`, `num_instances`, and the instance group. - repeated string instance_names = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The Compute Engine image resource used for cluster instances. - // - // The URI can represent an image or image family. - // - // Image examples: - // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]` - // * `projects/[project_id]/global/images/[image-id]` - // * `image-id` - // - // Image family examples. Dataproc will use the most recent - // image from the family: - // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]` - // * `projects/[project_id]/global/images/family/[custom-image-family-name]` - // - // If the URI is unspecified, it will be inferred from - // `SoftwareConfig.image_version` or the system default. - string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine machine type used for cluster instances. - // - // A full URL, partial URI, or short name are valid. Examples: - // - // * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` - // * `projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2` - // * `n1-standard-2` - // - // **Auto Zone Exception**: If you are using the Dataproc - // [Auto Zone - // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - // feature, you must use the short name of the machine type - // resource, for example, `n1-standard-2`. - string machine_type_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Disk option config settings. - DiskConfig disk_config = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Specifies that this instance group contains preemptible - // instances. - bool is_preemptible = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Specifies the preemptibility of the instance group. - // - // The default value for master and worker groups is - // `NON_PREEMPTIBLE`. This default cannot be changed. - // - // The default value for secondary instances is - // `PREEMPTIBLE`. - Preemptibility preemptibility = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The config for Compute Engine Instance Group - // Manager that manages this group. - // This is only used for preemptible instance groups. - ManagedGroupConfig managed_group_config = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The Compute Engine accelerator configuration for these - // instances. - repeated AcceleratorConfig accelerators = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the minimum cpu platform for the Instance Group. - // See [Dataproc -> Minimum CPU - // Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu). - string min_cpu_platform = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies the resources used to actively manage an instance group. -message ManagedGroupConfig { - // Output only. The name of the Instance Template used for the Managed - // Instance Group. - string instance_template_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the Instance Group Manager for this group. - string instance_group_manager_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifies the type and number of accelerator cards attached to the instances -// of an instance. See [GPUs on Compute -// Engine](https://cloud.google.com/compute/docs/gpus/). -message AcceleratorConfig { - // Full URL, partial URI, or short name of the accelerator type resource to - // expose to this instance. See - // [Compute Engine - // AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes). - // - // Examples: - // - // * `https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` - // * `projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80` - // * `nvidia-tesla-k80` - // - // **Auto Zone Exception**: If you are using the Dataproc - // [Auto Zone - // Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) - // feature, you must use the short name of the accelerator type - // resource, for example, `nvidia-tesla-k80`. - string accelerator_type_uri = 1; - - // The number of the accelerator cards of this type exposed to this instance. - int32 accelerator_count = 2; -} - -// Specifies the config of disk options for a group of VM instances. -message DiskConfig { - // Optional. Type of the boot disk (default is "pd-standard"). - // Valid values: "pd-balanced" (Persistent Disk Balanced Solid State Drive), - // "pd-ssd" (Persistent Disk Solid State Drive), - // or "pd-standard" (Persistent Disk Hard Disk Drive). - // See [Disk types](https://cloud.google.com/compute/docs/disks#disk-types). - string boot_disk_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Size in GB of the boot disk (default is 500GB). - int32 boot_disk_size_gb = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Number of attached SSDs, from 0 to 4 (default is 0). - // If SSDs are not attached, the boot disk is used to store runtime logs and - // [HDFS](https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. - // If one or more SSDs are attached, this runtime bulk - // data is spread across them, and the boot disk contains only basic - // config and installed binaries. - int32 num_local_ssds = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Interface type of local SSDs (default is "scsi"). - // Valid values: "scsi" (Small Computer System Interface), - // "nvme" (Non-Volatile Memory Express). - // See [local SSD - // performance](https://cloud.google.com/compute/docs/disks/local-ssd#performance). - string local_ssd_interface = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies an executable to run on a fully configured node and a -// timeout period for executable completion. -message NodeInitializationAction { - // Required. Cloud Storage URI of executable file. - string executable_file = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Amount of time executable has to complete. Default is - // 10 minutes (see JSON representation of - // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - // - // Cluster creation fails with an explanatory error message (the - // name of the executable that caused the error and the exceeded timeout - // period) if the executable is not completed at end of the timeout period. - google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The status of a cluster and its instances. -message ClusterStatus { - // The cluster state. - enum State { - // The cluster state is unknown. - UNKNOWN = 0; - - // The cluster is being created and set up. It is not ready for use. - CREATING = 1; - - // The cluster is currently running and healthy. It is ready for use. - // - // **Note:** The cluster state changes from "creating" to "running" status - // after the master node(s), first two primary worker nodes (and the last - // primary worker node if primary workers > 2) are running. - RUNNING = 2; - - // The cluster encountered an error. It is not ready for use. - ERROR = 3; - - // The cluster has encountered an error while being updated. Jobs can - // be submitted to the cluster, but the cluster cannot be updated. - ERROR_DUE_TO_UPDATE = 9; - - // The cluster is being deleted. It cannot be used. - DELETING = 4; - - // The cluster is being updated. It continues to accept and process jobs. - UPDATING = 5; - - // The cluster is being stopped. It cannot be used. - STOPPING = 6; - - // The cluster is currently stopped. It is not ready for use. - STOPPED = 7; - - // The cluster is being started. It is not ready for use. - STARTING = 8; - } - - // The cluster substate. - enum Substate { - // The cluster substate is unknown. - UNSPECIFIED = 0; - - // The cluster is known to be in an unhealthy state - // (for example, critical daemons are not running or HDFS capacity is - // exhausted). - // - // Applies to RUNNING state. - UNHEALTHY = 1; - - // The agent-reported status is out of date (may occur if - // Dataproc loses communication with Agent). - // - // Applies to RUNNING state. - STALE_STATUS = 2; - } - - // Output only. The cluster's state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Output only. Details of cluster's state. - string detail = 2 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = OPTIONAL - ]; - - // Output only. Time when this state was entered (see JSON representation of - // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp state_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional state information that includes - // status reported by the agent. - Substate substate = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Security related configuration, including encryption, Kerberos, etc. -message SecurityConfig { - // Optional. Kerberos related configuration. - KerberosConfig kerberos_config = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Identity related configuration, including service account based - // secure multi-tenancy user mappings. - IdentityConfig identity_config = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies Kerberos related configuration. -message KerberosConfig { - // Optional. Flag to indicate whether to Kerberize the cluster (default: false). Set - // this field to true to enable Kerberos on a cluster. - bool enable_kerberos = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the root - // principal password. - string root_principal_password_uri = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The uri of the KMS key used to encrypt various sensitive - // files. - string kms_key_uri = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of the keystore file used for SSL - // encryption. If not provided, Dataproc will provide a self-signed - // certificate. - string keystore_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of the truststore file used for SSL - // encryption. If not provided, Dataproc will provide a self-signed - // certificate. - string truststore_uri = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the - // password to the user provided keystore. For the self-signed certificate, - // this password is generated by Dataproc. - string keystore_password_uri = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the - // password to the user provided key. For the self-signed certificate, this - // password is generated by Dataproc. - string key_password_uri = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the - // password to the user provided truststore. For the self-signed certificate, - // this password is generated by Dataproc. - string truststore_password_uri = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The remote realm the Dataproc on-cluster KDC will trust, should - // the user enable cross realm trust. - string cross_realm_trust_realm = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The KDC (IP or hostname) for the remote trusted realm in a cross - // realm trust relationship. - string cross_realm_trust_kdc = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The admin server (IP or hostname) for the remote trusted realm in - // a cross realm trust relationship. - string cross_realm_trust_admin_server = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the - // shared password between the on-cluster Kerberos realm and the remote - // trusted realm, in a cross realm trust relationship. - string cross_realm_trust_shared_password_uri = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage URI of a KMS encrypted file containing the - // master key of the KDC database. - string kdc_db_key_uri = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The lifetime of the ticket granting ticket, in hours. - // If not specified, or user specifies 0, then default value 10 - // will be used. - int32 tgt_lifetime_hours = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the on-cluster Kerberos realm. - // If not specified, the uppercased domain of hostnames will be the realm. - string realm = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// Identity related configuration, including service account based -// secure multi-tenancy user mappings. -message IdentityConfig { - // Required. Map of user to service account. - map user_service_account_mapping = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Specifies the selection and config of software inside the cluster. -message SoftwareConfig { - // Optional. The version of software inside the cluster. It must be one of the - // supported [Dataproc - // Versions](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions), - // such as "1.2" (including a subminor version, such as "1.2.29"), or the - // ["preview" - // version](https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions). - // If unspecified, it defaults to the latest Debian version. - string image_version = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The properties to set on daemon config files. - // - // Property keys are specified in `prefix:property` format, for example - // `core:hadoop.tmp.dir`. The following are supported prefixes - // and their mappings: - // - // * capacity-scheduler: `capacity-scheduler.xml` - // * core: `core-site.xml` - // * distcp: `distcp-default.xml` - // * hdfs: `hdfs-site.xml` - // * hive: `hive-site.xml` - // * mapred: `mapred-site.xml` - // * pig: `pig.properties` - // * spark: `spark-defaults.conf` - // * yarn: `yarn-site.xml` - // - // For more information, see [Cluster - // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - map properties = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The set of components to activate on the cluster. - repeated Component optional_components = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies the cluster auto-delete schedule configuration. -message LifecycleConfig { - // Optional. The duration to keep the cluster alive while idling (when no jobs - // are running). Passing this threshold will cause the cluster to be - // deleted. Minimum value is 5 minutes; maximum value is 14 days (see JSON - // representation of - // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration idle_delete_ttl = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Either the exact time the cluster should be deleted at or - // the cluster maximum age. - oneof ttl { - // Optional. The time when cluster will be auto-deleted (see JSON representation of - // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp auto_delete_time = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The lifetime duration of cluster. The cluster will be - // auto-deleted at the end of this period. Minimum value is 10 minutes; - // maximum value is 14 days (see JSON representation of - // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration auto_delete_ttl = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Output only. The time when cluster became idle (most recent job finished) - // and became eligible for deletion due to idleness (see JSON representation - // of - // [Timestamp](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Timestamp idle_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifies a Metastore configuration. -message MetastoreConfig { - // Required. Resource name of an existing Dataproc Metastore service. - // - // Example: - // - // * `projects/[project_id]/locations/[dataproc_region]/services/[service-name]` - string dataproc_metastore_service = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "metastore.googleapis.com/Service" - } - ]; -} - -// Contains cluster daemon metrics, such as HDFS and YARN stats. -// -// **Beta Feature**: This report is available for testing purposes only. It may -// be changed before final release. -message ClusterMetrics { - // The HDFS metrics. - map hdfs_metrics = 1; - - // The YARN metrics. - map yarn_metrics = 2; -} - -// A request to create a cluster. -message CreateClusterRequest { - // Required. The ID of the Google Cloud Platform project that the cluster - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster to create. - Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A unique ID used to identify the request. If the server receives two - // [CreateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.CreateClusterRequest)s - // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the backend - // is returned. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Failure action when primary worker creation fails. - FailureAction action_on_failed_primary_workers = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to update a cluster. -message UpdateClusterRequest { - // Required. The ID of the Google Cloud Platform project the - // cluster belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 5 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The changes to the cluster. - Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Timeout for graceful YARN decomissioning. Graceful - // decommissioning allows removing nodes from the cluster without - // interrupting jobs in progress. Timeout specifies how long to wait for jobs - // in progress to finish before forcefully removing nodes (and potentially - // interrupting jobs). Default timeout is 0 (for forceful decommission), and - // the maximum allowed timeout is 1 day. (see JSON representation of - // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - // - // Only supported on Dataproc image versions 1.2 and higher. - google.protobuf.Duration graceful_decommission_timeout = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Specifies the path, relative to `Cluster`, of - // the field to update. For example, to change the number of workers - // in a cluster to 5, the `update_mask` parameter would be - // specified as `config.worker_config.num_instances`, - // and the `PATCH` request body would specify the new value, as follows: - // - // { - // "config":{ - // "workerConfig":{ - // "numInstances":"5" - // } - // } - // } - // Similarly, to change the number of preemptible workers in a cluster to 5, - // the `update_mask` parameter would be - // `config.secondary_worker_config.num_instances`, and the `PATCH` request - // body would be set as follows: - // - // { - // "config":{ - // "secondaryWorkerConfig":{ - // "numInstances":"5" - // } - // } - // } - // Note: Currently, only the following fields can be updated: - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - //
MaskPurpose
labelsUpdate labels
config.worker_config.num_instancesResize primary worker group
config.secondary_worker_config.num_instancesResize secondary worker group
config.autoscaling_config.policy_uriUse, stop using, or - // change autoscaling policies
- google.protobuf.FieldMask update_mask = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A unique ID used to identify the request. If the server - // receives two - // [UpdateClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.UpdateClusterRequest)s - // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to stop a cluster. -message StopClusterRequest { - // Required. The ID of the Google Cloud Platform project the - // cluster belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specifying the `cluster_uuid` means the RPC will fail - // (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique ID used to identify the request. If the server - // receives two - // [StopClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StopClusterRequest)s - // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. - // - // Recommendation: Set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to start a cluster. -message StartClusterRequest { - // Required. The ID of the Google Cloud Platform project the - // cluster belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specifying the `cluster_uuid` means the RPC will fail - // (with error NOT_FOUND) if a cluster with the specified UUID does not exist. - string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique ID used to identify the request. If the server - // receives two - // [StartClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.StartClusterRequest)s - // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. - // - // Recommendation: Set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to delete a cluster. -message DeleteClusterRequest { - // Required. The ID of the Google Cloud Platform project that the cluster - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specifying the `cluster_uuid` means the RPC should fail - // (with error NOT_FOUND) if cluster with specified UUID does not exist. - string cluster_uuid = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A unique ID used to identify the request. If the server - // receives two - // [DeleteClusterRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.DeleteClusterRequest)s - // with the same id, then the second request will be ignored and the - // first [google.longrunning.Operation][google.longrunning.Operation] created and stored in the - // backend is returned. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request to get the resource representation for a cluster in a project. -message GetClusterRequest { - // Required. The ID of the Google Cloud Platform project that the cluster - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to list the clusters in a project. -message ListClustersRequest { - // Required. The ID of the Google Cloud Platform project that the cluster - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 4 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A filter constraining the clusters to list. Filters are - // case-sensitive and have the following syntax: - // - // field = value [AND [field = value]] ... - // - // where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, - // and `[KEY]` is a label key. **value** can be `*` to match all values. - // `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, - // `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`. `ACTIVE` - // contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` - // contains the `DELETING` and `ERROR` states. - // `clusterName` is the name of the cluster provided at creation time. - // Only the logical `AND` operator is supported; space-separated items are - // treated as having an implicit `AND` operator. - // - // Example filter: - // - // status.state = ACTIVE AND clusterName = mycluster - // AND labels.env = staging AND labels.starred = * - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The standard List page size. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The standard List page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The list of all clusters in a project. -message ListClustersResponse { - // Output only. The clusters in the project. - repeated Cluster clusters = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. This token is included in the response if there are more - // results to fetch. To fetch additional results, provide this value as the - // `page_token` in a subsequent `ListClustersRequest`. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to collect cluster diagnostic information. -message DiagnoseClusterRequest { - // Required. The ID of the Google Cloud Platform project that the cluster - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster name. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The location of diagnostic output. -message DiagnoseClusterResults { - // Output only. The Cloud Storage URI of the diagnostic output. - // The output report is a plain text file with a summary of collected - // diagnostics. - string output_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Reservation Affinity for consuming Zonal reservation. -message ReservationAffinity { - // Indicates whether to consume capacity from an reservation or not. - enum Type { - TYPE_UNSPECIFIED = 0; - - // Do not consume from any allocated capacity. - NO_RESERVATION = 1; - - // Consume any reservation available. - ANY_RESERVATION = 2; - - // Must consume from a specific reservation. Must specify key value fields - // for specifying the reservations. - SPECIFIC_RESERVATION = 3; - } - - // Optional. Type of reservation to consume - Type consume_reservation_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label key of reservation resource. - string key = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label values of reservation resource. - repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto deleted file mode 100644 index 823a12cf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto +++ /dev/null @@ -1,924 +0,0 @@ -// 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.dataproc.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "JobsProto"; -option java_package = "com.google.cloud.dataproc.v1"; - -// The JobController provides methods to manage jobs. -service JobController { - option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Submits a job to a cluster. - rpc SubmitJob(SubmitJobRequest) returns (Job) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/jobs:submit" - body: "*" - }; - option (google.api.method_signature) = "project_id,region,job"; - } - - // Submits job to a cluster. - rpc SubmitJobAsOperation(SubmitJobRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/jobs:submitAsOperation" - body: "*" - }; - option (google.api.method_signature) = "project_id, region, job"; - option (google.longrunning.operation_info) = { - response_type: "Job" - metadata_type: "JobMetadata" - }; - } - - // Gets the resource representation for a job in a project. - rpc GetJob(GetJobRequest) returns (Job) { - option (google.api.http) = { - get: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" - }; - option (google.api.method_signature) = "project_id,region,job_id"; - } - - // Lists regions/{region}/jobs in a project. - rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) { - option (google.api.http) = { - get: "/v1/projects/{project_id}/regions/{region}/jobs" - }; - option (google.api.method_signature) = "project_id,region"; - option (google.api.method_signature) = "project_id,region,filter"; - } - - // Updates a job in a project. - rpc UpdateJob(UpdateJobRequest) returns (Job) { - option (google.api.http) = { - patch: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" - body: "job" - }; - } - - // Starts a job cancellation request. To access the job resource - // after cancellation, call - // [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) - // or - // [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get). - rpc CancelJob(CancelJobRequest) returns (Job) { - option (google.api.http) = { - post: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}:cancel" - body: "*" - }; - option (google.api.method_signature) = "project_id,region,job_id"; - } - - // Deletes the job from the project. If the job is active, the delete fails, - // and the response returns `FAILED_PRECONDITION`. - rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/projects/{project_id}/regions/{region}/jobs/{job_id}" - }; - option (google.api.method_signature) = "project_id,region,job_id"; - } -} - -// The runtime logging config of the job. -message LoggingConfig { - // The Log4j level for job execution. When running an - // [Apache Hive](https://hive.apache.org/) job, Cloud - // Dataproc configures the Hive client to an equivalent verbosity level. - enum Level { - // Level is unspecified. Use default level for log4j. - LEVEL_UNSPECIFIED = 0; - - // Use ALL level for log4j. - ALL = 1; - - // Use TRACE level for log4j. - TRACE = 2; - - // Use DEBUG level for log4j. - DEBUG = 3; - - // Use INFO level for log4j. - INFO = 4; - - // Use WARN level for log4j. - WARN = 5; - - // Use ERROR level for log4j. - ERROR = 6; - - // Use FATAL level for log4j. - FATAL = 7; - - // Turn off log4j. - OFF = 8; - } - - // The per-package log levels for the driver. This may include - // "root" package name to configure rootLogger. - // Examples: - // 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG' - map driver_log_levels = 2; -} - -// A Dataproc job for running -// [Apache Hadoop -// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) -// jobs on [Apache Hadoop -// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). -message HadoopJob { - // Required. Indicates the location of the driver's main class. Specify - // either the jar file that contains the main class or the main class name. - // To specify both, add the jar file to `jar_file_uris`, and then specify - // the main class name in this property. - oneof driver { - // The HCFS URI of the jar file containing the main class. - // Examples: - // 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' - // 'hdfs:/tmp/test-samples/custom-wordcount.jar' - // 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' - string main_jar_file_uri = 1; - - // The name of the driver's main class. The jar file containing the class - // must be in the default CLASSPATH or specified in `jar_file_uris`. - string main_class = 2; - } - - // Optional. The arguments to pass to the driver. Do not - // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as - // job properties, since a collision may occur that causes an incorrect job - // submission. - repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Jar file URIs to add to the CLASSPATHs of the - // Hadoop driver and tasks. - repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied - // to the working directory of Hadoop drivers and distributed tasks. Useful - // for naively parallel tasks. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted in the working directory of - // Hadoop drivers and tasks. Supported file types: - // .jar, .tar, .tar.gz, .tgz, or .zip. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure Hadoop. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in /etc/hadoop/conf/*-site and - // classes in user code. - map properties = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running [Apache Spark](http://spark.apache.org/) -// applications on YARN. -message SparkJob { - // Required. The specification of the main method to call to drive the job. - // Specify either the jar file that contains the main class or the main class - // name. To pass both a main jar and a main class in that jar, add the jar to - // `CommonJob.jar_file_uris`, and then specify the main class name in - // `main_class`. - oneof driver { - // The HCFS URI of the jar file that contains the main class. - string main_jar_file_uri = 1; - - // The name of the driver's main class. The jar file that contains the class - // must be in the default CLASSPATH or specified in `jar_file_uris`. - string main_class = 2; - } - - // Optional. The arguments to pass to the driver. Do not include arguments, - // such as `--conf`, that can be set as job properties, since a collision may - // occur that causes an incorrect job submission. - repeated string args = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - // Spark driver and tasks. - repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. Useful for naively parallel tasks. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure Spark. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running -// [Apache -// PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html) -// applications on YARN. -message PySparkJob { - // Required. The HCFS URI of the main Python file to use as the driver. Must - // be a .py file. - string main_python_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The arguments to pass to the driver. Do not include arguments, - // such as `--conf`, that can be set as job properties, since a collision may - // occur that causes an incorrect job submission. - repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS file URIs of Python files to pass to the PySpark - // framework. Supported file types: .py, .egg, and .zip. - repeated string python_file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the CLASSPATHs of the - // Python driver and tasks. - repeated string jar_file_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. Useful for naively parallel tasks. - repeated string file_uris = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure PySpark. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 8 [(google.api.field_behavior) = OPTIONAL]; -} - -// A list of queries to run on a cluster. -message QueryList { - // Required. The queries to execute. You do not need to end a query expression - // with a semicolon. Multiple queries can be specified in one - // string by separating each with a semicolon. Here is an example of a - // Dataproc API snippet that uses a QueryList to specify a HiveJob: - // - // "hiveJob": { - // "queryList": { - // "queries": [ - // "query1", - // "query2", - // "query3;query4", - // ] - // } - // } - repeated string queries = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// A Dataproc job for running [Apache Hive](https://hive.apache.org/) -// queries on YARN. -message HiveJob { - // Required. The sequence of Hive queries to execute, specified as either - // an HCFS file URI or a list of queries. - oneof queries { - // The HCFS URI of the script that contains Hive queries. - string query_file_uri = 1; - - // A list of queries. - QueryList query_list = 2; - } - - // Optional. Whether to continue executing queries if a query fails. - // The default value is `false`. Setting to `true` can be useful when - // executing independent parallel queries. - bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Mapping of query variable names to values (equivalent to the - // Hive command: `SET name="value";`). - map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names and values, used to configure Hive. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, - // /etc/hive/conf/hive-site.xml, and classes in user code. - map properties = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the CLASSPATH of the - // Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes - // and UDFs. - repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running [Apache Spark -// SQL](http://spark.apache.org/sql/) queries. -message SparkSqlJob { - // Required. The sequence of Spark SQL queries to execute, specified as - // either an HCFS file URI or as a list of queries. - oneof queries { - // The HCFS URI of the script that contains SQL queries. - string query_file_uri = 1; - - // A list of queries. - QueryList query_list = 2; - } - - // Optional. Mapping of query variable names to values (equivalent to the - // Spark SQL command: SET `name="value";`). - map script_variables = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure - // Spark SQL's SparkConf. Properties that conflict with values set by the - // Dataproc API may be overwritten. - map properties = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH. - repeated string jar_file_uris = 56 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running [Apache Pig](https://pig.apache.org/) -// queries on YARN. -message PigJob { - // Required. The sequence of Pig queries to execute, specified as an HCFS - // file URI or a list of queries. - oneof queries { - // The HCFS URI of the script that contains the Pig queries. - string query_file_uri = 1; - - // A list of queries. - QueryList query_list = 2; - } - - // Optional. Whether to continue executing queries if a query fails. - // The default value is `false`. Setting to `true` can be useful when - // executing independent parallel queries. - bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Mapping of query variable names to values (equivalent to the Pig - // command: `name=[value]`). - map script_variables = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure Pig. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, - // /etc/pig/conf/pig.properties, and classes in user code. - map properties = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of jar files to add to the CLASSPATH of - // the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - repeated string jar_file_uris = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running -// [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) -// applications on YARN. -message SparkRJob { - // Required. The HCFS URI of the main R file to use as the driver. - // Must be a .R file. - string main_r_file_uri = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The arguments to pass to the driver. Do not include arguments, - // such as `--conf`, that can be set as job properties, since a collision may - // occur that causes an incorrect job submission. - repeated string args = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of files to be placed in the working directory of - // each executor. Useful for naively parallel tasks. - repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted into the working directory - // of each executor. Supported file types: - // .jar, .tar, .tar.gz, .tgz, and .zip. - repeated string archive_uris = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, used to configure SparkR. - // Properties that conflict with values set by the Dataproc API may be - // overwritten. Can include properties set in - // /etc/spark/conf/spark-defaults.conf and classes in user code. - map properties = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job for running [Presto](https://prestosql.io/) queries. -// **IMPORTANT**: The [Dataproc Presto Optional -// Component](https://cloud.google.com/dataproc/docs/concepts/components/presto) -// must be enabled when the cluster is created to submit a Presto job to the -// cluster. -message PrestoJob { - // Required. The sequence of Presto queries to execute, specified as - // either an HCFS file URI or as a list of queries. - oneof queries { - // The HCFS URI of the script that contains SQL queries. - string query_file_uri = 1; - - // A list of queries. - QueryList query_list = 2; - } - - // Optional. Whether to continue executing queries if a query fails. - // The default value is `false`. Setting to `true` can be useful when - // executing independent parallel queries. - bool continue_on_failure = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The format in which query output will be displayed. See the - // Presto documentation for supported output formats - string output_format = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Presto client tags to attach to this query - repeated string client_tags = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values. Used to set Presto - // [session properties](https://prestodb.io/docs/current/sql/set-session.html) - // Equivalent to using the --session flag in the Presto CLI - map properties = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The runtime log config for job execution. - LoggingConfig logging_config = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Dataproc job config. -message JobPlacement { - // Required. The name of the cluster where the job will be submitted. - string cluster_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. A cluster UUID generated by the Dataproc service when - // the job is submitted. - string cluster_uuid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Cluster labels to identify a cluster where the job will be submitted. - map cluster_labels = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Dataproc job status. -message JobStatus { - // The job state. - enum State { - // The job state is unknown. - STATE_UNSPECIFIED = 0; - - // The job is pending; it has been submitted, but is not yet running. - PENDING = 1; - - // Job has been received by the service and completed initial setup; - // it will soon be submitted to the cluster. - SETUP_DONE = 8; - - // The job is running on the cluster. - RUNNING = 2; - - // A CancelJob request has been received, but is pending. - CANCEL_PENDING = 3; - - // Transient in-flight resources have been canceled, and the request to - // cancel the running job has been issued to the cluster. - CANCEL_STARTED = 7; - - // The job cancellation was successful. - CANCELLED = 4; - - // The job has completed successfully. - DONE = 5; - - // The job has completed, but encountered an error. - ERROR = 6; - - // Job attempt has failed. The detail field contains failure details for - // this attempt. - // - // Applies to restartable jobs only. - ATTEMPT_FAILURE = 9; - } - - // The job substate. - enum Substate { - // The job substate is unknown. - UNSPECIFIED = 0; - - // The Job is submitted to the agent. - // - // Applies to RUNNING state. - SUBMITTED = 1; - - // The Job has been received and is awaiting execution (it may be waiting - // for a condition to be met). See the "details" field for the reason for - // the delay. - // - // Applies to RUNNING state. - QUEUED = 2; - - // The agent-reported status is out of date, which may be caused by a - // loss of communication between the agent and Dataproc. If the - // agent does not send a timely update, the job will fail. - // - // Applies to RUNNING state. - STALE_STATUS = 3; - } - - // Output only. A state message specifying the overall job state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Output only. Job state details, such as an error - // description if the state is ERROR. - string details = 2 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = OPTIONAL - ]; - - // Output only. The time when this state was entered. - google.protobuf.Timestamp state_start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Additional state information, which includes - // status reported by the agent. - Substate substate = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Encapsulates the full scoping used to reference a job. -message JobReference { - // Optional. The ID of the Google Cloud Platform project that the job belongs to. If - // specified, must match the request project ID. - string project_id = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The job ID, which must be unique within the project. - // - // The ID must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), or hyphens (-). The maximum length is 100 characters. - // - // If not specified by the caller, the job ID will be provided by the server. - string job_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A YARN application created by a job. Application information is a subset of -// org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. -// -// **Beta Feature**: This report is available for testing purposes only. It may -// be changed before final release. -message YarnApplication { - // The application state, corresponding to - // YarnProtos.YarnApplicationStateProto. - enum State { - // Status is unspecified. - STATE_UNSPECIFIED = 0; - - // Status is NEW. - NEW = 1; - - // Status is NEW_SAVING. - NEW_SAVING = 2; - - // Status is SUBMITTED. - SUBMITTED = 3; - - // Status is ACCEPTED. - ACCEPTED = 4; - - // Status is RUNNING. - RUNNING = 5; - - // Status is FINISHED. - FINISHED = 6; - - // Status is FAILED. - FAILED = 7; - - // Status is KILLED. - KILLED = 8; - } - - // Required. The application name. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The application state. - State state = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The numerical progress of the application, from 1 to 100. - float progress = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or - // TimelineServer that provides application-specific information. The URL uses - // the internal hostname, and requires a proxy server for resolution and, - // possibly, access. - string tracking_url = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// A Dataproc job resource. -message Job { - // Optional. The fully qualified reference to the job, which can be used to - // obtain the equivalent REST path of the job resource. If this property - // is not specified when a job is created, the server generates a - // job_id. - JobReference reference = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Job information, including how, when, and where to - // run the job. - JobPlacement placement = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The application/framework-specific portion of the job. - oneof type_job { - // Optional. Job is a Hadoop job. - HadoopJob hadoop_job = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Spark job. - SparkJob spark_job = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a PySpark job. - PySparkJob pyspark_job = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Hive job. - HiveJob hive_job = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Pig job. - PigJob pig_job = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a SparkR job. - SparkRJob spark_r_job = 21 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a SparkSql job. - SparkSqlJob spark_sql_job = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Presto job. - PrestoJob presto_job = 23 [(google.api.field_behavior) = OPTIONAL]; - } - - // Output only. The job status. Additional application-specific - // status information may be contained in the type_job - // and yarn_applications fields. - JobStatus status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The previous job status. - repeated JobStatus status_history = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The collection of YARN applications spun up by this job. - // - // **Beta** Feature: This report is available for testing purposes only. It - // may be changed before final release. - repeated YarnApplication yarn_applications = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A URI pointing to the location of the stdout of the job's - // driver program. - string driver_output_resource_uri = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If present, the location of miscellaneous control files - // which may be used as part of job setup and handling. If not present, - // control files may be placed in the same location as `driver_output_uri`. - string driver_control_files_uri = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The labels to associate with this job. - // Label **keys** must contain 1 to 63 characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // Label **values** may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to [RFC - // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - // associated with a job. - map labels = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job scheduling configuration. - JobScheduling scheduling = 20 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. A UUID that uniquely identifies a job within the project - // over time. This is in contrast to a user-settable reference.job_id that - // may be reused over time. - string job_uuid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates whether the job is completed. If the value is `false`, - // the job is still in progress. If `true`, the job is completed, and - // `status.state` field will indicate if it was successful, failed, - // or cancelled. - bool done = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Job scheduling options. -message JobScheduling { - // Optional. Maximum number of times per hour a driver may be restarted as - // a result of driver exiting with non-zero code before job is - // reported failed. - // - // A job may be reported as thrashing if driver exits with non-zero code - // 4 times within 10 minute window. - // - // Maximum value is 10. - // - // **Note:** Currently, this restartable job option is - // not supported in Dataproc - // [workflow - // template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. - int32 max_failures_per_hour = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum number of times in total a driver may be restarted as a result of - // driver exiting with non-zero code before job is reported failed. - // Maximum value is 240. - // - // **Note:** Currently, this restartable job option is - // not supported in Dataproc - // [workflow - // template](https://cloud.google.com/dataproc/docs/concepts/workflows/using-workflows#adding_jobs_to_a_template) - // jobs. - int32 max_failures_total = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to submit a job. -message SubmitJobRequest { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job resource. - Job job = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A unique id used to identify the request. If the server - // receives two - // [SubmitJobRequest](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.SubmitJobRequest)s - // with the same id, then the second request will be ignored and the - // first [Job][google.cloud.dataproc.v1.Job] created and stored in the backend - // is returned. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The id must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Job Operation metadata. -message JobMetadata { - // Output only. The job id. - string job_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Most recent job status. - JobStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Operation type. - string operation_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Job submission time. - google.protobuf.Timestamp start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to get the resource representation for a job in a project. -message GetJobRequest { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID. - string job_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to list jobs in a project. -message ListJobsRequest { - // A matcher that specifies categories of job states. - enum JobStateMatcher { - // Match all jobs, regardless of state. - ALL = 0; - - // Only match jobs in non-terminal states: PENDING, RUNNING, or - // CANCEL_PENDING. - ACTIVE = 1; - - // Only match jobs in terminal states: CANCELLED, DONE, or ERROR. - NON_ACTIVE = 2; - } - - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 6 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The number of results to return in each response. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page token, returned by a previous call, to request the - // next page of results. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, the returned jobs list includes only jobs that were - // submitted to the named cluster. - string cluster_name = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies enumerated categories of jobs to list. - // (default = match ALL jobs). - // - // If `filter` is provided, `jobStateMatcher` will be ignored. - JobStateMatcher job_state_matcher = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A filter constraining the jobs to list. Filters are - // case-sensitive and have the following syntax: - // - // [field = value] AND [field [= value]] ... - // - // where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label - // key. **value** can be `*` to match all values. - // `status.state` can be either `ACTIVE` or `NON_ACTIVE`. - // Only the logical `AND` operator is supported; space-separated items are - // treated as having an implicit `AND` operator. - // - // Example filter: - // - // status.state = ACTIVE AND labels.env = staging AND labels.starred = * - string filter = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to update a job. -message UpdateJobRequest { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID. - string job_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The changes to the job. - Job job = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. Specifies the path, relative to Job, of - // the field to update. For example, to update the labels of a Job the - // update_mask parameter would be specified as - // labels, and the `PATCH` request body would specify the new - // value. Note: Currently, labels is the only - // field that can be updated. - google.protobuf.FieldMask update_mask = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// A list of jobs in a project. -message ListJobsResponse { - // Output only. Jobs list. - repeated Job jobs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. This token is included in the response if there are more results - // to fetch. To fetch additional results, provide this value as the - // `page_token` in a subsequent ListJobsRequest. - string next_page_token = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to cancel a job. -message CancelJobRequest { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID. - string job_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to delete a job. -message DeleteJobRequest { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Dataproc region in which to handle the request. - string region = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job ID. - string job_id = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto deleted file mode 100644 index e12bd299..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto +++ /dev/null @@ -1,118 +0,0 @@ -// 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.dataproc.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.cloud.dataproc.v1"; - -// Metadata describing the Batch operation. -message BatchOperationMetadata { - // Operation type for Batch resources - enum BatchOperationType { - // Batch operation type is unknown. - BATCH_OPERATION_TYPE_UNSPECIFIED = 0; - - // Batch operation type. - BATCH = 1; - } - - // Name of the batch for the operation. - string batch = 1; - - // Batch UUID for the operation. - string batch_uuid = 2; - - // The time when the operation was created. - google.protobuf.Timestamp create_time = 3; - - // The time when the operation finished. - google.protobuf.Timestamp done_time = 4; - - // The operation type. - BatchOperationType operation_type = 6; - - // Short description of the operation. - string description = 7; - - // Labels associated with the operation. - map labels = 8; - - // Warnings encountered during operation execution. - repeated string warnings = 9; -} - -// The status of the operation. -message ClusterOperationStatus { - // The operation state. - enum State { - // Unused. - UNKNOWN = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is running. - RUNNING = 2; - - // The operation is done; either cancelled or completed. - DONE = 3; - } - - // Output only. A message containing the operation state. - State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A message containing the detailed operation state. - string inner_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A message containing any operation metadata details. - string details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time this state was entered. - google.protobuf.Timestamp state_start_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Metadata describing the operation. -message ClusterOperationMetadata { - // Output only. Name of the cluster for the operation. - string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Cluster UUID for the operation. - string cluster_uuid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Current operation status. - ClusterOperationStatus status = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The previous operation status. - repeated ClusterOperationStatus status_history = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The operation type. - string operation_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Short description of operation. - string description = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Labels associated with the operation - map labels = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Errors encountered during operation execution. - repeated string warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/shared.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/shared.proto deleted file mode 100644 index 18796915..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/shared.proto +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.dataproc.v1; - -import "google/api/field_behavior.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "SharedProto"; -option java_package = "com.google.cloud.dataproc.v1"; - -// Runtime configuration for a workload. -message RuntimeConfig { - // Optional. Version of the batch runtime. - string version = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Optional custom container image for the job runtime environment. If - // not specified, a default container image will be used. - string container_image = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A mapping of property names to values, which are used to configure workload - // execution. - map properties = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Environment configuration for a workload. -message EnvironmentConfig { - // Optional. Execution configuration for a workload. - ExecutionConfig execution_config = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Peripherals configuration that workload has access to. - PeripheralsConfig peripherals_config = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Execution configuration for a workload. -message ExecutionConfig { - // Optional. Service account that used to execute workload. - string service_account = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Network configuration for workload execution. - oneof network { - // Optional. Network URI to connect workload to. - string network_uri = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Subnetwork URI to connect workload to. - string subnetwork_uri = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Tags used for network traffic control. - repeated string network_tags = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud KMS key to use for encryption. - string kms_key = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Spark History Server configuration for the workload. -message SparkHistoryServerConfig { - // Optional. Resource name of an existing Dataproc Cluster to act as a Spark History - // Server for the workload. - // - // Example: - // - // * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` - string dataproc_cluster = 1 [ - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Auxiliary services configuration for a workload. -message PeripheralsConfig { - // Optional. Resource name of an existing Dataproc Metastore service. - // - // Example: - // - // * `projects/[project_id]/locations/[region]/services/[service_id]` - string metastore_service = 1 [ - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. The Spark History Server configuration for the workload. - SparkHistoryServerConfig spark_history_server_config = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Runtime information about workload execution. -message RuntimeInfo { - // Output only. Map of remote access endpoints (such as web interfaces and APIs) to their - // URIs. - map endpoints = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A URI pointing to the location of the stdout and stderr of the workload. - string output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A URI pointing to the location of the diagnostics tarball. - string diagnostic_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The cluster's GKE config. -message GkeClusterConfig { - // Optional. A target GKE cluster to deploy to. It must be in the same project and - // region as the Dataproc cluster (the GKE cluster can be zonal or regional). - // Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' - string gke_cluster_target = 2 [ - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. GKE NodePools where workloads will be scheduled. At least one node pool - // must be assigned the 'default' role. Each role can be given to only a - // single NodePoolTarget. All NodePools must have the same location settings. - // If a nodePoolTarget is not specified, Dataproc constructs a default - // nodePoolTarget. - repeated GkeNodePoolTarget node_pool_target = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration for running the Dataproc cluster on Kubernetes. -message KubernetesClusterConfig { - // Optional. A namespace within the Kubernetes cluster to deploy into. If this namespace - // does not exist, it is created. If it exists, Dataproc - // verifies that another Dataproc VirtualCluster is not installed - // into it. If not specified, the name of the Dataproc Cluster is used. - string kubernetes_namespace = 1 [(google.api.field_behavior) = OPTIONAL]; - - oneof config { - // Required. The configuration for running the Dataproc cluster on GKE. - GkeClusterConfig gke_cluster_config = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Optional. The software configuration for this Dataproc cluster running on Kubernetes. - KubernetesSoftwareConfig kubernetes_software_config = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The software configuration for this Dataproc cluster running on Kubernetes. -message KubernetesSoftwareConfig { - // The components that should be installed in this Dataproc cluster. The key - // must be a string from the KubernetesComponent enumeration. The value is - // the version of the software to be installed. - // At least one entry must be specified. - map component_version = 1; - - // The properties to set on daemon config files. - // - // Property keys are specified in `prefix:property` format, for example - // `spark:spark.kubernetes.container.image`. The following are supported - // prefixes and their mappings: - // - // * spark: `spark-defaults.conf` - // - // For more information, see [Cluster - // properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - map properties = 2; -} - -// GKE NodePools that Dataproc workloads run on. -message GkeNodePoolTarget { - // `Role` specifies whose tasks will run on the NodePool. The roles can be - // specific to workloads. Exactly one GkeNodePoolTarget within the - // VirtualCluster must have 'default' role, which is used to run all workloads - // that are not associated with a NodePool. - enum Role { - // Role is unspecified. - ROLE_UNSPECIFIED = 0; - - // Any roles that are not directly assigned to a NodePool run on the - // `default` role's NodePool. - DEFAULT = 1; - - // Run controllers and webhooks. - CONTROLLER = 2; - - // Run spark driver. - SPARK_DRIVER = 3; - - // Run spark executors. - SPARK_EXECUTOR = 4; - } - - // Required. The target GKE NodePool. - // Format: - // 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}' - string node_pool = 1 [ - (google.api.field_behavior) = REQUIRED - ]; - - // Required. The types of role for a GKE NodePool - repeated Role roles = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The configuration for the GKE NodePool. - // - // If specified, Dataproc attempts to create a NodePool with the - // specified shape. If one with the same name already exists, it is - // verified against all specified fields. If a field differs, the - // virtual cluster creation will fail. - // - // If omitted, any NodePool with the specified name is used. If a - // NodePool with the specified name does not exist, Dataproc create a NodePool - // with default values. - GkeNodePoolConfig node_pool_config = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration of a GKE NodePool used by a [Dataproc-on-GKE -// cluster](https://cloud.google.com/dataproc/docs/concepts/jobs/dataproc-gke#create-a-dataproc-on-gke-cluster). -message GkeNodePoolConfig { - // Parameters that describe cluster nodes. - message GkeNodeConfig { - // Optional. The name of a Compute Engine [machine - // type](https://cloud.google.com/compute/docs/machine-types). - string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether the nodes are created as [preemptible VM - // instances](https://cloud.google.com/compute/docs/instances/preemptible). - bool preemptible = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of local SSD disks to attach to the node, which is limited by - // the maximum number of disks allowable per zone (see [Adding Local - // SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)). - int32 local_ssd_count = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of [hardware - // accelerators](https://cloud.google.com/compute/docs/gpus) to attach to - // each node. - repeated GkeNodePoolAcceleratorConfig accelerators = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. [Minimum CPU - // platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform) - // to be used by this instance. The instance may be scheduled on the - // specified or a newer CPU platform. Specify the friendly names of CPU - // platforms, such as "Intel Haswell"` or Intel Sandy Bridge". - string min_cpu_platform = 13 [(google.api.field_behavior) = OPTIONAL]; - } - - // A GkeNodeConfigAcceleratorConfig represents a Hardware Accelerator request - // for a NodePool. - message GkeNodePoolAcceleratorConfig { - // The number of accelerator cards exposed to an instance. - int64 accelerator_count = 1; - - // The accelerator type resource namename (see GPUs on Compute Engine). - string accelerator_type = 2; - } - - // GkeNodePoolAutoscaling contains information the cluster autoscaler needs to - // adjust the size of the node pool to the current cluster usage. - message GkeNodePoolAutoscalingConfig { - // The minimum number of nodes in the NodePool. Must be >= 0 and <= - // max_node_count. - int32 min_node_count = 2; - - // The maximum number of nodes in the NodePool. Must be >= min_node_count. - // **Note:** Quota must be sufficient to scale up the cluster. - int32 max_node_count = 3; - } - - // Optional. The node pool configuration. - GkeNodeConfig config = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) where - // NodePool's nodes will be located. - // - // **Note:** Currently, only one zone may be specified. - // - // If a location is not specified during NodePool creation, Dataproc will - // choose a location. - repeated string locations = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The autoscaler configuration for this NodePool. The autoscaler is enabled - // only when a valid configuration is present. - GkeNodePoolAutoscalingConfig autoscaling = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Cluster components that can be activated. -enum Component { - // Unspecified component. Specifying this will cause Cluster creation to fail. - COMPONENT_UNSPECIFIED = 0; - - // The Anaconda python distribution. The Anaconda component is not supported - // in the Dataproc - // 2.0 - // image. The 2.0 image is pre-installed with Miniconda. - ANACONDA = 5; - - // Docker - DOCKER = 13; - - // The Druid query engine. (alpha) - DRUID = 9; - - // Flink - FLINK = 14; - - // HBase. (beta) - HBASE = 11; - - // The Hive Web HCatalog (the REST service for accessing HCatalog). - HIVE_WEBHCAT = 3; - - // The Jupyter Notebook. - JUPYTER = 1; - - // The Presto query engine. - PRESTO = 6; - - // The Ranger service. - RANGER = 12; - - // The Solr service. - SOLR = 10; - - // The Zeppelin notebook. - ZEPPELIN = 4; - - // The Zookeeper service. - ZOOKEEPER = 8; -} - -// Actions in response to failure of a resource associated with a cluster. -enum FailureAction { - // When FailureAction is unspecified, failure action defaults to NO_ACTION. - FAILURE_ACTION_UNSPECIFIED = 0; - - // Take no action on failure to create a cluster resource. NO_ACTION is the - // default. - NO_ACTION = 1; - - // Delete the failed cluster resource. - DELETE = 2; -} diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/workflow_templates.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/workflow_templates.proto deleted file mode 100644 index 416ba26d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/workflow_templates.proto +++ /dev/null @@ -1,807 +0,0 @@ -// 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.dataproc.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/dataproc/v1/clusters.proto"; -import "google/cloud/dataproc/v1/jobs.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "WorkflowTemplatesProto"; -option java_package = "com.google.cloud.dataproc.v1"; - -// The API interface for managing Workflow Templates in the -// Dataproc API. -service WorkflowTemplateService { - option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates new workflow template. - rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/workflowTemplates" - body: "template" - additional_bindings { - post: "/v1/{parent=projects/*/regions/*}/workflowTemplates" - body: "template" - } - }; - option (google.api.method_signature) = "parent,template"; - } - - // Retrieves the latest workflow template. - // - // Can retrieve previously instantiated template by specifying optional - // version parameter. - rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) returns (WorkflowTemplate) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" - additional_bindings { - get: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Instantiates a template and begins execution. - // - // The returned Operation can be used to track execution of - // workflow by polling - // [operations.get][google.longrunning.Operations.GetOperation]. - // The Operation will complete when entire workflow is finished. - // - // The running workflow can be aborted via - // [operations.cancel][google.longrunning.Operations.CancelOperation]. - // This will cause any inflight jobs to be cancelled and workflow-owned - // clusters to be deleted. - // - // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - // Also see [Using - // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - // - // On successful completion, - // [Operation.response][google.longrunning.Operation.response] will be - // [Empty][google.protobuf.Empty]. - rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/workflowTemplates/*}:instantiate" - body: "*" - additional_bindings { - post: "/v1/{name=projects/*/regions/*/workflowTemplates/*}:instantiate" - body: "*" - } - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,parameters"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "WorkflowMetadata" - }; - } - - // Instantiates a template and begins execution. - // - // This method is equivalent to executing the sequence - // [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], - // [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. - // - // The returned Operation can be used to track execution of - // workflow by polling - // [operations.get][google.longrunning.Operations.GetOperation]. - // The Operation will complete when entire workflow is finished. - // - // The running workflow can be aborted via - // [operations.cancel][google.longrunning.Operations.CancelOperation]. - // This will cause any inflight jobs to be cancelled and workflow-owned - // clusters to be deleted. - // - // The [Operation.metadata][google.longrunning.Operation.metadata] will be - // [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). - // Also see [Using - // WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). - // - // On successful completion, - // [Operation.response][google.longrunning.Operation.response] will be - // [Empty][google.protobuf.Empty]. - rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" - body: "template" - additional_bindings { - post: "/v1/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline" - body: "template" - } - }; - option (google.api.method_signature) = "parent,template"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "WorkflowMetadata" - }; - } - - // Updates (replaces) workflow template. The updated template - // must contain version that matches the current server version. - rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) returns (WorkflowTemplate) { - option (google.api.http) = { - put: "/v1/{template.name=projects/*/locations/*/workflowTemplates/*}" - body: "template" - additional_bindings { - put: "/v1/{template.name=projects/*/regions/*/workflowTemplates/*}" - body: "template" - } - }; - option (google.api.method_signature) = "template"; - } - - // Lists workflows that match the specified filter in the request. - rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/workflowTemplates" - additional_bindings { - get: "/v1/{parent=projects/*/regions/*}/workflowTemplates" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a workflow template. It does not cancel in-progress workflows. - rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/workflowTemplates/*}" - additional_bindings { - delete: "/v1/{name=projects/*/regions/*/workflowTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } -} - -// A Dataproc workflow template resource. -message WorkflowTemplate { - option (google.api.resource) = { - type: "dataproc.googleapis.com/WorkflowTemplate" - pattern: "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}" - pattern: "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}" - history: ORIGINALLY_SINGLE_PATTERN - }; - - string id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The resource name of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates`, the resource name of the - // template has the following format: - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - // - // * For `projects.locations.workflowTemplates`, the resource name of the - // template has the following format: - // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Used to perform a consistent read-modify-write. - // - // This field should be left blank for a `CreateWorkflowTemplate` request. It - // is required for an `UpdateWorkflowTemplate` request, and must match the - // current server version. A typical update template flow would fetch the - // current template with a `GetWorkflowTemplate` request, which will return - // the current template with the `version` field filled in with the - // current server version. The user updates other fields in the template, - // then returns it as part of the `UpdateWorkflowTemplate` request. - int32 version = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time template was created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time template was last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The labels to associate with this template. These labels - // will be propagated to all jobs and clusters created by the workflow - // instance. - // - // Label **keys** must contain 1 to 63 characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // - // Label **values** may be empty, but, if present, must contain 1 to 63 - // characters, and must conform to - // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - // - // No more than 32 labels can be associated with a template. - map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Required. WorkflowTemplate scheduling information. - WorkflowTemplatePlacement placement = 7 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Directed Acyclic Graph of Jobs to submit. - repeated OrderedJob jobs = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Template parameters whose values are substituted into the - // template. Values for parameters must be provided when the template is - // instantiated. - repeated TemplateParameter parameters = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Timeout duration for the DAG of jobs, expressed in seconds (see - // [JSON representation of - // duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - // The timeout duration must be from 10 minutes ("600s") to 24 hours - // ("86400s"). The timer begins when the first job is submitted. If the - // workflow is running at the end of the timeout period, any remaining jobs - // are cancelled, the workflow is ended, and if the workflow was running on a - // [managed - // cluster](/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster), - // the cluster is deleted. - google.protobuf.Duration dag_timeout = 10 [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies workflow execution target. -// -// Either `managed_cluster` or `cluster_selector` is required. -message WorkflowTemplatePlacement { - // Required. Specifies where workflow executes; either on a managed - // cluster or an existing cluster chosen by labels. - oneof placement { - // A cluster that is managed by the workflow. - ManagedCluster managed_cluster = 1; - - // Optional. A selector that chooses target cluster for jobs based - // on metadata. - // - // The selector is evaluated at the time each job is submitted. - ClusterSelector cluster_selector = 2; - } -} - -// Cluster that is managed by the workflow. -message ManagedCluster { - // Required. The cluster name prefix. A unique cluster name will be formed by - // appending a random suffix. - // - // The name must contain only lower-case letters (a-z), numbers (0-9), - // and hyphens (-). Must begin with a letter. Cannot begin or end with - // hyphen. Must consist of between 2 and 35 characters. - string cluster_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The cluster configuration. - ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The labels to associate with this cluster. - // - // Label keys must be between 1 and 63 characters long, and must conform to - // the following PCRE regular expression: - // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - // - // Label values must be between 1 and 63 characters long, and must conform to - // the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - // - // No more than 32 labels can be associated with a given cluster. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// A selector that chooses target cluster for jobs based on metadata. -message ClusterSelector { - // Optional. The zone where workflow process executes. This parameter does not - // affect the selection of the cluster. - // - // If unspecified, the zone of the first cluster matching the selector - // is used. - string zone = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The cluster labels. Cluster must have all labels - // to match. - map cluster_labels = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A job executed by the workflow. -message OrderedJob { - // Required. The step id. The id must be unique among all jobs - // within the template. - // - // The step id is used as prefix for job id, as job - // `goog-dataproc-workflow-step-id` label, and in - // [prerequisiteStepIds][google.cloud.dataproc.v1.OrderedJob.prerequisite_step_ids] field from other - // steps. - // - // The id must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). Cannot begin or end with underscore - // or hyphen. Must consist of between 3 and 50 characters. - string step_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The job definition. - oneof job_type { - // Optional. Job is a Hadoop job. - HadoopJob hadoop_job = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Spark job. - SparkJob spark_job = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a PySpark job. - PySparkJob pyspark_job = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Hive job. - HiveJob hive_job = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Pig job. - PigJob pig_job = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a SparkR job. - SparkRJob spark_r_job = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a SparkSql job. - SparkSqlJob spark_sql_job = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job is a Presto job. - PrestoJob presto_job = 12 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The labels to associate with this job. - // - // Label keys must be between 1 and 63 characters long, and must conform to - // the following regular expression: - // [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - // - // Label values must be between 1 and 63 characters long, and must conform to - // the following regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - // - // No more than 32 labels can be associated with a given job. - map labels = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Job scheduling configuration. - JobScheduling scheduling = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The optional list of prerequisite job step_ids. - // If not specified, the job will start at the beginning of workflow. - repeated string prerequisite_step_ids = 10 [(google.api.field_behavior) = OPTIONAL]; -} - -// A configurable parameter that replaces one or more fields in the template. -// Parameterizable fields: -// - Labels -// - File uris -// - Job properties -// - Job arguments -// - Script variables -// - Main class (in HadoopJob and SparkJob) -// - Zone (in ClusterSelector) -message TemplateParameter { - // Required. Parameter name. - // The parameter name is used as the key, and paired with the - // parameter value, which are passed to the template when the template - // is instantiated. - // The name must contain only capital letters (A-Z), numbers (0-9), and - // underscores (_), and must not start with a number. The maximum length is - // 40 characters. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Paths to all fields that the parameter replaces. - // A field is allowed to appear in at most one parameter's list of field - // paths. - // - // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - // For example, a field path that references the zone field of a workflow - // template's cluster selector would be specified as - // `placement.clusterSelector.zone`. - // - // Also, field paths can reference fields using the following syntax: - // - // * Values in maps can be referenced by key: - // * labels['key'] - // * placement.clusterSelector.clusterLabels['key'] - // * placement.managedCluster.labels['key'] - // * placement.clusterSelector.clusterLabels['key'] - // * jobs['step-id'].labels['key'] - // - // * Jobs in the jobs list can be referenced by step-id: - // * jobs['step-id'].hadoopJob.mainJarFileUri - // * jobs['step-id'].hiveJob.queryFileUri - // * jobs['step-id'].pySparkJob.mainPythonFileUri - // * jobs['step-id'].hadoopJob.jarFileUris[0] - // * jobs['step-id'].hadoopJob.archiveUris[0] - // * jobs['step-id'].hadoopJob.fileUris[0] - // * jobs['step-id'].pySparkJob.pythonFileUris[0] - // - // * Items in repeated fields can be referenced by a zero-based index: - // * jobs['step-id'].sparkJob.args[0] - // - // * Other examples: - // * jobs['step-id'].hadoopJob.properties['key'] - // * jobs['step-id'].hadoopJob.args[0] - // * jobs['step-id'].hiveJob.scriptVariables['key'] - // * jobs['step-id'].hadoopJob.mainJarFileUri - // * placement.clusterSelector.zone - // - // It may not be possible to parameterize maps and repeated fields in their - // entirety since only individual map values and individual items in repeated - // fields can be referenced. For example, the following field paths are - // invalid: - // - // - placement.clusterSelector.clusterLabels - // - jobs['step-id'].sparkJob.args - repeated string fields = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Brief description of the parameter. - // Must not exceed 1024 characters. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Validation rules to be applied to this parameter's value. - ParameterValidation validation = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for parameter validation. -message ParameterValidation { - // Required. The type of validation to be performed. - oneof validation_type { - // Validation based on regular expressions. - RegexValidation regex = 1; - - // Validation based on a list of allowed values. - ValueValidation values = 2; - } -} - -// Validation based on regular expressions. -message RegexValidation { - // Required. RE2 regular expressions used to validate the parameter's value. - // The value must match the regex in its entirety (substring - // matches are not sufficient). - repeated string regexes = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Validation based on a list of allowed values. -message ValueValidation { - // Required. List of allowed values for the parameter. - repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// A Dataproc workflow template resource. -message WorkflowMetadata { - // The operation state. - enum State { - // Unused. - UNKNOWN = 0; - - // The operation has been created. - PENDING = 1; - - // The operation is running. - RUNNING = 2; - - // The operation is done; either cancelled or completed. - DONE = 3; - } - - // Output only. The resource name of the workflow template as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates`, the resource name of the - // template has the following format: - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - // - // * For `projects.locations.workflowTemplates`, the resource name of the - // template has the following format: - // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - string template = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The version of template at the time of - // workflow instantiation. - int32 version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The create cluster operation metadata. - ClusterOperation create_cluster = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The workflow graph. - WorkflowGraph graph = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The delete cluster operation metadata. - ClusterOperation delete_cluster = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The workflow state. - State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The name of the target cluster. - string cluster_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Map from parameter names to values that were used for those parameters. - map parameters = 8; - - // Output only. Workflow start time. - google.protobuf.Timestamp start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Workflow end time. - google.protobuf.Timestamp end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The UUID of target cluster. - string cluster_uuid = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timeout duration for the DAG of jobs, expressed in seconds (see - // [JSON representation of - // duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). - google.protobuf.Duration dag_timeout = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. DAG start time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG - // begins. - google.protobuf.Timestamp dag_start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. DAG end time, only set for workflows with [dag_timeout][google.cloud.dataproc.v1.WorkflowMetadata.dag_timeout] when DAG ends. - google.protobuf.Timestamp dag_end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The cluster operation triggered by a workflow. -message ClusterOperation { - // Output only. The id of the cluster operation. - string operation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Error, if operation failed. - string error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Indicates the operation is done. - bool done = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The workflow graph. -message WorkflowGraph { - // Output only. The workflow nodes. - repeated WorkflowNode nodes = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// The workflow node. -message WorkflowNode { - // The workflow node state. - enum NodeState { - // State is unspecified. - NODE_STATE_UNSPECIFIED = 0; - - // The node is awaiting prerequisite node to finish. - BLOCKED = 1; - - // The node is runnable but not running. - RUNNABLE = 2; - - // The node is running. - RUNNING = 3; - - // The node completed successfully. - COMPLETED = 4; - - // The node failed. A node can be marked FAILED because - // its ancestor or peer failed. - FAILED = 5; - } - - // Output only. The name of the node. - string step_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Node's prerequisite nodes. - repeated string prerequisite_step_ids = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The job id; populated after the node enters RUNNING state. - string job_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The node state. - NodeState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The error detail. - string error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to create a workflow template. -message CreateWorkflowTemplateRequest { - // Required. The resource name of the region or location, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates.create`, the resource name of the - // region has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.workflowTemplates.create`, the resource name of - // the location has the following format: - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Required. The Dataproc workflow template to create. - WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to fetch a workflow template. -message GetWorkflowTemplateRequest { - // Required. The resource name of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates.get`, the resource name of the - // template has the following format: - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - // - // * For `projects.locations.workflowTemplates.get`, the resource name of the - // template has the following format: - // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Optional. The version of workflow template to retrieve. Only previously - // instantiated versions can be retrieved. - // - // If unspecified, retrieves the current version. - int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to instantiate a workflow template. -message InstantiateWorkflowTemplateRequest { - // Required. The resource name of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates.instantiate`, the resource name - // of the template has the following format: - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - // - // * For `projects.locations.workflowTemplates.instantiate`, the resource name - // of the template has the following format: - // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Optional. The version of workflow template to instantiate. If specified, - // the workflow will be instantiated only if the current version of - // the workflow template has the supplied version. - // - // This option cannot be used to instantiate a previous version of - // workflow template. - int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A tag that prevents multiple concurrent workflow - // instances with the same tag from running. This mitigates risk of - // concurrent instances started due to retries. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The tag must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Map from parameter names to values that should be used for those - // parameters. Values may not exceed 1000 characters. - map parameters = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to instantiate an inline workflow template. -message InstantiateInlineWorkflowTemplateRequest { - // Required. The resource name of the region or location, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates,instantiateinline`, the resource - // name of the region has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.workflowTemplates.instantiateinline`, the - // resource name of the location has the following format: - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Required. The workflow template to instantiate. - WorkflowTemplate template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A tag that prevents multiple concurrent workflow - // instances with the same tag from running. This mitigates risk of - // concurrent instances started due to retries. - // - // It is recommended to always set this value to a - // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier). - // - // The tag must contain only letters (a-z, A-Z), numbers (0-9), - // underscores (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to update a workflow template. -message UpdateWorkflowTemplateRequest { - // Required. The updated workflow template. - // - // The `template.version` field must match the current version. - WorkflowTemplate template = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to list workflow templates in a project. -message ListWorkflowTemplatesRequest { - // Required. The resource name of the region or location, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates,list`, the resource - // name of the region has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.workflowTemplates.list`, the - // resource name of the location has the following format: - // `projects/{project_id}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Optional. The maximum number of results to return in each response. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page token, returned by a previous call, to request the - // next page of results. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// A response to a request to list workflow templates in a project. -message ListWorkflowTemplatesResponse { - // Output only. WorkflowTemplates list. - repeated WorkflowTemplate templates = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. This token is included in the response if there are more - // results to fetch. To fetch additional results, provide this value as the - // page_token in a subsequent ListWorkflowTemplatesRequest. - string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A request to delete a workflow template. -// -// Currently started workflows will remain running. -message DeleteWorkflowTemplateRequest { - // Required. The resource name of the workflow template, as described - // in https://cloud.google.com/apis/design/resource_names. - // - // * For `projects.regions.workflowTemplates.delete`, the resource name - // of the template has the following format: - // `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` - // - // * For `projects.locations.workflowTemplates.instantiate`, the resource name - // of the template has the following format: - // `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/WorkflowTemplate" - } - ]; - - // Optional. The version of workflow template to delete. If specified, - // will only delete the template if the current server version matches - // specified version. - int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f9ea56e3..00000000 --- a/renovate.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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-dataproc", - "^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", - "^com.google.cloud:google-cloud-conformance-tests" - ], - "semanticCommitType": "test", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^com.google.cloud:google-cloud-" - ], - "ignoreUnstable": false - }, - { - "packagePatterns": [ - "^com.fasterxml.jackson.core" - ], - "groupName": "jackson dependencies" - } - ], - "semanticCommits": true, - "dependencyDashboard": true -} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml deleted file mode 100644 index c7e71c98..00000000 --- a/samples/install-without-bom/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - com.google.cloud - dataproc-install-without-bom - jar - Google Dataproc Install Without Bom - https://github.com/googleapis/java-dataproc - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - com.google.cloud - google-cloud-dataproc - 2.3.2 - - - - com.google.cloud - google-cloud-storage - 2.4.4 - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.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 deleted file mode 100644 index f5ac6870..00000000 --- a/samples/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc-samples - 0.0.1-SNAPSHOT - pom - Google Dataproc Samples Parent - https://github.com/googleapis/java-dataproc - - Java idiomatic client for Google Cloud Platform services. - - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 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.11 - - true - - - - - diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml deleted file mode 100644 index 1bad76f5..00000000 --- a/samples/snapshot/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - com.google.cloud - dataproc-snapshot - jar - Google Dataproc Snapshot Samples - https://github.com/googleapis/java-dataproc - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-dataproc - 2.3.3-SNAPSHOT - - - - com.google.cloud - google-cloud-storage - 2.4.4 - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.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 deleted file mode 100644 index eda69488..00000000 --- a/samples/snippets/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - 4.0.0 - com.google.cloud - dataproc-snippets - jar - Google Dataproc Snippets - https://github.com/googleapis/java-dataproc - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - - com.google.cloud - libraries-bom - 24.3.0 - pom - import - - - - - - - com.google.cloud - google-cloud-dataproc - - - - com.google.cloud - google-cloud-storage - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - diff --git a/samples/snippets/src/main/java/CreateCluster.java b/samples/snippets/src/main/java/CreateCluster.java deleted file mode 100644 index 0623c8cc..00000000 --- a/samples/snippets/src/main/java/CreateCluster.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// [START dataproc_create_cluster] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterConfig; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.InstanceGroupConfig; -import java.io.IOException; -import java.util.concurrent.ExecutionException; - -public class CreateCluster { - - public static void createCluster() throws IOException, InterruptedException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String region = "your-project-region"; - String clusterName = "your-cluster-name"; - createCluster(projectId, region, clusterName); - } - - public static void createCluster(String projectId, String region, String clusterName) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the cluster controller client. - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create a cluster controller client with the configured settings. The client only needs to be - // created once and can be reused for multiple requests. Using a try-with-resources - // closes the client, but this can also be done manually with the .close() method. - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - // Configure the settings for our cluster. - InstanceGroupConfig masterConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(2) - .build(); - ClusterConfig clusterConfig = - ClusterConfig.newBuilder() - .setMasterConfig(masterConfig) - .setWorkerConfig(workerConfig) - .build(); - // Create the cluster object with the desired cluster config. - Cluster cluster = - Cluster.newBuilder().setClusterName(clusterName).setConfig(clusterConfig).build(); - - // Create the Cloud Dataproc cluster. - OperationFuture createClusterAsyncRequest = - clusterControllerClient.createClusterAsync(projectId, region, cluster); - Cluster response = createClusterAsyncRequest.get(); - - // Print out a success message. - System.out.printf("Cluster created successfully: %s", response.getClusterName()); - - } catch (ExecutionException e) { - System.err.println(String.format("Error executing createCluster: %s ", e.getMessage())); - } - } -} -// [END dataproc_create_cluster] diff --git a/samples/snippets/src/main/java/CreateClusterWithAutoscaling.java b/samples/snippets/src/main/java/CreateClusterWithAutoscaling.java deleted file mode 100644 index 981721a4..00000000 --- a/samples/snippets/src/main/java/CreateClusterWithAutoscaling.java +++ /dev/null @@ -1,174 +0,0 @@ -/* -* Copyright 2020 Google LLC -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -* This sample creates a Dataproc cluster with an autoscaling policy enabled. -* The policy we will be creating mirrors the following YAML representation: -* - workerConfig: - minInstances: 2 - maxInstances: 100 - weight: 1 - secondaryWorkerConfig: - minInstances: 0 - maxInstances: 100 - weight: 1 - basicAlgorithm: - cooldownPeriod: 4m - yarnConfig: - scaleUpFactor: 0.05 - scaleDownFactor: 1.0 - scaleUpMinWorkerFraction: 0.0 - scaleDownMinWorkerFraction: 0.0 - gracefulDecommissionTimeout: 1h -*/ - -// [START dataproc_create_autoscaling_cluster] - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.AutoscalingConfig; -import com.google.cloud.dataproc.v1.AutoscalingPolicy; -import com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient; -import com.google.cloud.dataproc.v1.AutoscalingPolicyServiceSettings; -import com.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm; -import com.google.cloud.dataproc.v1.BasicYarnAutoscalingConfig; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterConfig; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig; -import com.google.cloud.dataproc.v1.InstanceGroupConfig; -import com.google.cloud.dataproc.v1.RegionName; -import com.google.protobuf.Duration; -import java.io.IOException; -import java.util.concurrent.ExecutionException; - -public class CreateClusterWithAutoscaling { - - public static void createClusterwithAutoscaling() throws IOException, InterruptedException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String region = "your-project-region"; - String clusterName = "your-cluster-name"; - String autoscalingPolicyName = "your-autoscaling-policy"; - createClusterwithAutoscaling(projectId, region, clusterName, autoscalingPolicyName); - } - - public static void createClusterwithAutoscaling( - String projectId, String region, String clusterName, String autoscalingPolicyName) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the cluster controller client. - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Configure the settings for the autoscaling policy service client. - AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = - AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create a cluster controller client and an autoscaling controller client with the configured - // settings. The clients only need to be created once and can be reused for multiple requests. - // Using a - // try-with-resources closes the client, but this can also be done manually with the .close() - // method. - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings); - AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings)) { - - // Create the Autoscaling policy. - InstanceGroupAutoscalingPolicyConfig workerInstanceGroupAutoscalingPolicyConfig = - InstanceGroupAutoscalingPolicyConfig.newBuilder() - .setMinInstances(2) - .setMaxInstances(100) - .setWeight(1) - .build(); - InstanceGroupAutoscalingPolicyConfig secondaryWorkerInstanceGroupAutoscalingPolicyConfig = - InstanceGroupAutoscalingPolicyConfig.newBuilder() - .setMinInstances(0) - .setMaxInstances(100) - .setWeight(1) - .build(); - BasicYarnAutoscalingConfig basicYarnApplicationConfig = - BasicYarnAutoscalingConfig.newBuilder() - .setScaleUpFactor(0.05) - .setScaleDownFactor(1.0) - .setScaleUpMinWorkerFraction(0.0) - .setScaleUpMinWorkerFraction(0.0) - .setGracefulDecommissionTimeout(Duration.newBuilder().setSeconds(3600).build()) - .build(); - BasicAutoscalingAlgorithm basicAutoscalingAlgorithm = - BasicAutoscalingAlgorithm.newBuilder() - .setCooldownPeriod(Duration.newBuilder().setSeconds(240).build()) - .setYarnConfig(basicYarnApplicationConfig) - .build(); - AutoscalingPolicy autoscalingPolicy = - AutoscalingPolicy.newBuilder() - .setId(autoscalingPolicyName) - .setWorkerConfig(workerInstanceGroupAutoscalingPolicyConfig) - .setSecondaryWorkerConfig(secondaryWorkerInstanceGroupAutoscalingPolicyConfig) - .setBasicAlgorithm(basicAutoscalingAlgorithm) - .build(); - RegionName parent = RegionName.of(projectId, region); - - // Policy is uploaded here. - autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, autoscalingPolicy); - - // Now the policy can be referenced when creating a cluster. - String autoscalingPolicyUri = - String.format( - "projects/%s/locations/%s/autoscalingPolicies/%s", - projectId, region, autoscalingPolicyName); - AutoscalingConfig autoscalingConfig = - AutoscalingConfig.newBuilder().setPolicyUri(autoscalingPolicyUri).build(); - - // Configure the settings for our cluster. - InstanceGroupConfig masterConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(2) - .build(); - ClusterConfig clusterConfig = - ClusterConfig.newBuilder() - .setMasterConfig(masterConfig) - .setWorkerConfig(workerConfig) - .setAutoscalingConfig(autoscalingConfig) - .build(); - - // Create the cluster object with the desired cluster config. - Cluster cluster = - Cluster.newBuilder().setClusterName(clusterName).setConfig(clusterConfig).build(); - - // Create the Dataproc cluster. - OperationFuture createClusterAsyncRequest = - clusterControllerClient.createClusterAsync(projectId, region, cluster); - Cluster response = createClusterAsyncRequest.get(); - - // Print out a success message. - System.out.printf("Cluster created successfully: %s", response.getClusterName()); - - } catch (ExecutionException e) { - // If cluster creation does not complete successfully, print the error message. - System.err.println(String.format("createClusterWithAutoscaling: %s ", e.getMessage())); - } - } -} -// [END dataproc_create_autoscaling_cluster] diff --git a/samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java b/samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java deleted file mode 100644 index 4f3e7379..00000000 --- a/samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// [START dataproc_instantiate_inline_workflow_template] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.ClusterConfig; -import com.google.cloud.dataproc.v1.GceClusterConfig; -import com.google.cloud.dataproc.v1.HadoopJob; -import com.google.cloud.dataproc.v1.ManagedCluster; -import com.google.cloud.dataproc.v1.OrderedJob; -import com.google.cloud.dataproc.v1.RegionName; -import com.google.cloud.dataproc.v1.WorkflowMetadata; -import com.google.cloud.dataproc.v1.WorkflowTemplate; -import com.google.cloud.dataproc.v1.WorkflowTemplatePlacement; -import com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient; -import com.google.cloud.dataproc.v1.WorkflowTemplateServiceSettings; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.concurrent.ExecutionException; - -public class InstantiateInlineWorkflowTemplate { - - public static void instantiateInlineWorkflowTemplate() throws IOException, InterruptedException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String region = "your-project-region"; - instantiateInlineWorkflowTemplate(projectId, region); - } - - public static void instantiateInlineWorkflowTemplate(String projectId, String region) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the workflow template service client. - WorkflowTemplateServiceSettings workflowTemplateServiceSettings = - WorkflowTemplateServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create a workflow template service client with the configured settings. The client only - // needs to be created once and can be reused for multiple requests. Using a try-with-resources - // closes the client, but this can also be done manually with the .close() method. - try (WorkflowTemplateServiceClient workflowTemplateServiceClient = - WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings)) { - - // Configure the jobs within the workflow. - HadoopJob teragenHadoopJob = - HadoopJob.newBuilder() - .setMainJarFileUri("file:///usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar") - .addArgs("teragen") - .addArgs("1000") - .addArgs("hdfs:///gen/") - .build(); - OrderedJob teragen = - OrderedJob.newBuilder().setHadoopJob(teragenHadoopJob).setStepId("teragen").build(); - - HadoopJob terasortHadoopJob = - HadoopJob.newBuilder() - .setMainJarFileUri("file:///usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar") - .addArgs("terasort") - .addArgs("hdfs:///gen/") - .addArgs("hdfs:///sort/") - .build(); - OrderedJob terasort = - OrderedJob.newBuilder() - .setHadoopJob(terasortHadoopJob) - .addPrerequisiteStepIds("teragen") - .setStepId("terasort") - .build(); - - // Configure the cluster placement for the workflow. - // Leave "ZoneUri" empty for "Auto Zone Placement". - // GceClusterConfig gceClusterConfig = - // GceClusterConfig.newBuilder().setZoneUri("").build(); - GceClusterConfig gceClusterConfig = - GceClusterConfig.newBuilder().setZoneUri("us-central1-a").build(); - ClusterConfig clusterConfig = - ClusterConfig.newBuilder().setGceClusterConfig(gceClusterConfig).build(); - ManagedCluster managedCluster = - ManagedCluster.newBuilder() - .setClusterName("my-managed-cluster") - .setConfig(clusterConfig) - .build(); - WorkflowTemplatePlacement workflowTemplatePlacement = - WorkflowTemplatePlacement.newBuilder().setManagedCluster(managedCluster).build(); - - // Create the inline workflow template. - WorkflowTemplate workflowTemplate = - WorkflowTemplate.newBuilder() - .addJobs(teragen) - .addJobs(terasort) - .setPlacement(workflowTemplatePlacement) - .build(); - - // Submit the instantiated inline workflow template request. - String parent = RegionName.format(projectId, region); - OperationFuture instantiateInlineWorkflowTemplateAsync = - workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync( - parent, workflowTemplate); - instantiateInlineWorkflowTemplateAsync.get(); - - // Print out a success message. - System.out.printf("Workflow ran successfully."); - - } catch (ExecutionException e) { - System.err.println(String.format("Error running workflow: %s ", e.getMessage())); - } - } -} -// [END dataproc_instantiate_inline_workflow_template] diff --git a/samples/snippets/src/main/java/Quickstart.java b/samples/snippets/src/main/java/Quickstart.java deleted file mode 100644 index f7911313..00000000 --- a/samples/snippets/src/main/java/Quickstart.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// [START dataproc_quickstart] -/* This quickstart sample walks a user through creating a Cloud Dataproc - * cluster, submitting a PySpark job from Google Cloud Storage to the - * cluster, reading the output of the job and deleting the cluster, all - * using the Java client library. - * - * Usage: - * mvn clean package -DskipTests - * - * mvn exec:java -Dexec.args=" " - * - * You can also set these arguments in the main function instead of providing them via the CLI. - */ - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterConfig; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1.InstanceGroupConfig; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobControllerClient; -import com.google.cloud.dataproc.v1.JobControllerSettings; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.JobPlacement; -import com.google.cloud.dataproc.v1.PySparkJob; -import com.google.cloud.storage.Blob; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class Quickstart { - - public static void quickstart( - String projectId, String region, String clusterName, String jobFilePath) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the cluster controller client. - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Configure the settings for the job controller client. - JobControllerSettings jobControllerSettings = - JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create both a cluster controller client and job controller client with the - // configured settings. The client only needs to be created once and can be reused for - // multiple requests. Using a try-with-resources closes the client, but this can also be done - // manually with the .close() method. - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings); - JobControllerClient jobControllerClient = - JobControllerClient.create(jobControllerSettings)) { - // Configure the settings for our cluster. - InstanceGroupConfig masterConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-2") - .setNumInstances(2) - .build(); - ClusterConfig clusterConfig = - ClusterConfig.newBuilder() - .setMasterConfig(masterConfig) - .setWorkerConfig(workerConfig) - .build(); - // Create the cluster object with the desired cluster config. - Cluster cluster = - Cluster.newBuilder().setClusterName(clusterName).setConfig(clusterConfig).build(); - - // Create the Cloud Dataproc cluster. - OperationFuture createClusterAsyncRequest = - clusterControllerClient.createClusterAsync(projectId, region, cluster); - Cluster clusterResponse = createClusterAsyncRequest.get(); - System.out.println( - String.format("Cluster created successfully: %s", clusterResponse.getClusterName())); - - // Configure the settings for our job. - JobPlacement jobPlacement = JobPlacement.newBuilder().setClusterName(clusterName).build(); - PySparkJob pySparkJob = PySparkJob.newBuilder().setMainPythonFileUri(jobFilePath).build(); - Job job = Job.newBuilder().setPlacement(jobPlacement).setPysparkJob(pySparkJob).build(); - - // Submit an asynchronous request to execute the job. - OperationFuture submitJobAsOperationAsyncRequest = - jobControllerClient.submitJobAsOperationAsync(projectId, region, job); - Job jobResponse = submitJobAsOperationAsyncRequest.get(); - - // Print output from Google Cloud Storage. - Matcher matches = - Pattern.compile("gs://(.*?)/(.*)").matcher(jobResponse.getDriverOutputResourceUri()); - matches.matches(); - - Storage storage = StorageOptions.getDefaultInstance().getService(); - Blob blob = storage.get(matches.group(1), String.format("%s.000000000", matches.group(2))); - - System.out.println( - String.format("Job finished successfully: %s", new String(blob.getContent()))); - - // Delete the cluster. - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(projectId, region, clusterName); - deleteClusterAsyncRequest.get(); - System.out.println(String.format("Cluster \"%s\" successfully deleted.", clusterName)); - - } catch (ExecutionException e) { - System.err.println(String.format("quickstart: %s ", e.getMessage())); - } - } - - public static void main(String... args) throws IOException, InterruptedException { - if (args.length != 4) { - System.err.println( - "Insufficient number of parameters provided. Please make sure a " - + "PROJECT_ID, REGION, CLUSTER_NAME and JOB_FILE_PATH are provided, in this order."); - return; - } - - String projectId = args[0]; // project-id of project to create the cluster in - String region = args[1]; // region to create the cluster - String clusterName = args[2]; // name of the cluster - String jobFilePath = args[3]; // location in GCS of the PySpark job - - quickstart(projectId, region, clusterName, jobFilePath); - } -} -// [END dataproc_quickstart] diff --git a/samples/snippets/src/main/java/SubmitHadoopFsJob.java b/samples/snippets/src/main/java/SubmitHadoopFsJob.java deleted file mode 100644 index 0c26416c..00000000 --- a/samples/snippets/src/main/java/SubmitHadoopFsJob.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// [START dataproc_submit_hadoop_fs_job] - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.HadoopJob; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobControllerClient; -import com.google.cloud.dataproc.v1.JobControllerSettings; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.JobPlacement; -import com.google.cloud.storage.Blob; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.concurrent.ExecutionException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class SubmitHadoopFsJob { - - public static ArrayList stringToList(String s) { - return new ArrayList<>(Arrays.asList(s.split(" "))); - } - - public static void submitHadoopFsJob() throws IOException, InterruptedException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String region = "your-project-region"; - String clusterName = "your-cluster-name"; - String hadoopFsQuery = "your-hadoop-fs-query"; - submitHadoopFsJob(projectId, region, clusterName, hadoopFsQuery); - } - - public static void submitHadoopFsJob( - String projectId, String region, String clusterName, String hadoopFsQuery) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the job controller client. - JobControllerSettings jobControllerSettings = - JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create a job controller client with the configured settings. Using a try-with-resources - // closes the client, - // but this can also be done manually with the .close() method. - try (JobControllerClient jobControllerClient = - JobControllerClient.create(jobControllerSettings)) { - - // Configure cluster placement for the job. - JobPlacement jobPlacement = JobPlacement.newBuilder().setClusterName(clusterName).build(); - - // Configure Hadoop job settings. The HadoopFS query is set here. - HadoopJob hadoopJob = - HadoopJob.newBuilder() - .setMainClass("org.apache.hadoop.fs.FsShell") - .addAllArgs(stringToList(hadoopFsQuery)) - .build(); - - Job job = Job.newBuilder().setPlacement(jobPlacement).setHadoopJob(hadoopJob).build(); - - // Submit an asynchronous request to execute the job. - OperationFuture submitJobAsOperationAsyncRequest = - jobControllerClient.submitJobAsOperationAsync(projectId, region, job); - - Job response = submitJobAsOperationAsyncRequest.get(); - - // Print output from Google Cloud Storage. - Matcher matches = - Pattern.compile("gs://(.*?)/(.*)").matcher(response.getDriverOutputResourceUri()); - matches.matches(); - - Storage storage = StorageOptions.getDefaultInstance().getService(); - Blob blob = storage.get(matches.group(1), String.format("%s.000000000", matches.group(2))); - - System.out.println( - String.format("Job finished successfully: %s", new String(blob.getContent()))); - - } catch (ExecutionException e) { - // If the job does not complete successfully, print the error message. - System.err.println(String.format("submitHadoopFSJob: %s ", e.getMessage())); - } - } -} -// [END dataproc_submit_hadoop_fs_job] diff --git a/samples/snippets/src/main/java/SubmitJob.java b/samples/snippets/src/main/java/SubmitJob.java deleted file mode 100644 index 93193a7a..00000000 --- a/samples/snippets/src/main/java/SubmitJob.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// [START dataproc_submit_job] - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Job; -import com.google.cloud.dataproc.v1.JobControllerClient; -import com.google.cloud.dataproc.v1.JobControllerSettings; -import com.google.cloud.dataproc.v1.JobMetadata; -import com.google.cloud.dataproc.v1.JobPlacement; -import com.google.cloud.dataproc.v1.SparkJob; -import com.google.cloud.storage.Blob; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; -import java.io.IOException; -import java.util.concurrent.ExecutionException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class SubmitJob { - - public static void submitJob() throws IOException, InterruptedException { - // TODO(developer): Replace these variables before running the sample. - String projectId = "your-project-id"; - String region = "your-project-region"; - String clusterName = "your-cluster-name"; - submitJob(projectId, region, clusterName); - } - - public static void submitJob(String projectId, String region, String clusterName) - throws IOException, InterruptedException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", region); - - // Configure the settings for the job controller client. - JobControllerSettings jobControllerSettings = - JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - // Create a job controller client with the configured settings. Using a try-with-resources - // closes the client, - // but this can also be done manually with the .close() method. - try (JobControllerClient jobControllerClient = - JobControllerClient.create(jobControllerSettings)) { - - // Configure cluster placement for the job. - JobPlacement jobPlacement = JobPlacement.newBuilder().setClusterName(clusterName).build(); - - // Configure Spark job settings. - SparkJob sparkJob = - SparkJob.newBuilder() - .setMainClass("org.apache.spark.examples.SparkPi") - .addJarFileUris("file:///usr/lib/spark/examples/jars/spark-examples.jar") - .addArgs("1000") - .build(); - - Job job = Job.newBuilder().setPlacement(jobPlacement).setSparkJob(sparkJob).build(); - - // Submit an asynchronous request to execute the job. - OperationFuture submitJobAsOperationAsyncRequest = - jobControllerClient.submitJobAsOperationAsync(projectId, region, job); - - Job response = submitJobAsOperationAsyncRequest.get(); - - // Print output from Google Cloud Storage. - Matcher matches = - Pattern.compile("gs://(.*?)/(.*)").matcher(response.getDriverOutputResourceUri()); - matches.matches(); - - Storage storage = StorageOptions.getDefaultInstance().getService(); - Blob blob = storage.get(matches.group(1), String.format("%s.000000000", matches.group(2))); - - System.out.println( - String.format("Job finished successfully: %s", new String(blob.getContent()))); - - } catch (ExecutionException e) { - // If the job does not complete successfully, print the error message. - System.err.println(String.format("submitJob: %s ", e.getMessage())); - } - } -} -// [END dataproc_submit_job] diff --git a/samples/snippets/src/test/java/CreateClusterTest.java b/samples/snippets/src/test/java/CreateClusterTest.java deleted file mode 100644 index 506881ad..00000000 --- a/samples/snippets/src/test/java/CreateClusterTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.protobuf.Empty; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class CreateClusterTest { - - private static final String CLUSTER_NAME = - String.format("java-cc-test-%s", UUID.randomUUID().toString()); - private static final String REGION = "us-central1"; - // private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String PROJECT_ID = "gcloud-devel"; - private ByteArrayOutputStream bout; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - /* - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - }*/ - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @Test - public void createClusterTest() throws IOException, InterruptedException { - CreateCluster.createCluster(PROJECT_ID, REGION, CLUSTER_NAME); - String output = bout.toString(); - - assertThat(output, CoreMatchers.containsString(CLUSTER_NAME)); - } - - @After - public void tearDown() throws IOException, InterruptedException, ExecutionException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", REGION); - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(PROJECT_ID, REGION, CLUSTER_NAME); - deleteClusterAsyncRequest.get(); - } - } -} diff --git a/samples/snippets/src/test/java/CreateClusterWithAutoscalingTest.java b/samples/snippets/src/test/java/CreateClusterWithAutoscalingTest.java deleted file mode 100644 index 1b8f1505..00000000 --- a/samples/snippets/src/test/java/CreateClusterWithAutoscalingTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.AutoscalingPolicyName; -import com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient; -import com.google.cloud.dataproc.v1.AutoscalingPolicyServiceSettings; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.protobuf.Empty; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class CreateClusterWithAutoscalingTest { - - private static final String CLUSTER_NAME = - String.format("java-as-test-%s", UUID.randomUUID().toString()); - private static final String REGION = "us-central1"; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String AUTOSCALING_POLICY_NAME = - String.format("java-as-test-%s", UUID.randomUUID().toString()); - - private ByteArrayOutputStream bout; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @After - public void tearDown() throws IOException, InterruptedException, ExecutionException { - String myEndpoint = String.format("%s-dataproc.googleapis.com:443", REGION); - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build(); - - AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = - AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings); - AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = - AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings)) { - - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(PROJECT_ID, REGION, CLUSTER_NAME); - deleteClusterAsyncRequest.get(); - - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - PROJECT_ID, REGION, AUTOSCALING_POLICY_NAME); - autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name); - } - } - - @Test - public void createClusterWithAutoscalingTest() throws IOException, InterruptedException { - CreateClusterWithAutoscaling.createClusterwithAutoscaling( - PROJECT_ID, REGION, CLUSTER_NAME, AUTOSCALING_POLICY_NAME); - String output = bout.toString(); - - assertThat(output, CoreMatchers.containsString(CLUSTER_NAME)); - } -} diff --git a/samples/snippets/src/test/java/InstantiateInlineWorkflowTemplateTest.java b/samples/snippets/src/test/java/InstantiateInlineWorkflowTemplateTest.java deleted file mode 100644 index 0216ff36..00000000 --- a/samples/snippets/src/test/java/InstantiateInlineWorkflowTemplateTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import org.hamcrest.CoreMatchers; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class InstantiateInlineWorkflowTemplateTest { - - private static final String REGION = "us-central1"; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - - private ByteArrayOutputStream bout; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @Test - public void instanstiateInlineWorkflowTest() throws IOException, InterruptedException { - InstantiateInlineWorkflowTemplate.instantiateInlineWorkflowTemplate(PROJECT_ID, REGION); - String output = bout.toString(); - - assertThat(output, CoreMatchers.containsString("successfully")); - } -} diff --git a/samples/snippets/src/test/java/QuickstartTest.java b/samples/snippets/src/test/java/QuickstartTest.java deleted file mode 100644 index eff7ed05..00000000 --- a/samples/snippets/src/test/java/QuickstartTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static java.nio.charset.StandardCharsets.UTF_8; -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.cloud.storage.Blob; -import com.google.cloud.storage.Bucket; -import com.google.cloud.storage.BucketInfo; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; -import com.google.cloud.testing.junit4.StdOutCaptureRule; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class QuickstartTest { - - private static final String MY_UUID = UUID.randomUUID().toString(); - private static final String REGION = "us-central1"; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String ENDPOINT = String.format("%s-dataproc.googleapis.com:443", REGION); - private static final String CLUSTER_NAME = String.format("java-qs-test-%s", MY_UUID); - private static final String BUCKET_NAME = String.format("java-dataproc-qs-test-%s", MY_UUID); - private static final String JOB_FILE_NAME = "sum.py"; - private static final String JOB_FILE_PATH = - String.format("gs://%s/%s", BUCKET_NAME, JOB_FILE_NAME); - private static final String SORT_CODE = - "import pyspark\n" - + "sc = pyspark.SparkContext()\n" - + "rdd = sc.parallelize((1,2,3,4,5))\n" - + "sum = rdd.reduce(lambda x, y: x + y)\n"; - - @Rule public StdOutCaptureRule stdOutCapture = new StdOutCaptureRule(); - private Bucket bucket; - private Blob blob; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() { - Storage storage = StorageOptions.getDefaultInstance().getService(); - bucket = storage.create(BucketInfo.of(BUCKET_NAME)); - blob = bucket.create(JOB_FILE_NAME, SORT_CODE.getBytes(UTF_8), "text/plain"); - } - - @Test - public void quickstartTest() throws IOException, InterruptedException { - Quickstart.main(PROJECT_ID, REGION, CLUSTER_NAME, JOB_FILE_PATH); - String output = stdOutCapture.getCapturedOutputAsUtf8String(); - - assertThat(output, CoreMatchers.containsString("Cluster created successfully")); - assertThat(output, CoreMatchers.containsString("Job finished successfully:")); - assertThat(output, CoreMatchers.containsString("successfully deleted")); - } - - @After - public void teardown() throws IOException, InterruptedException, ExecutionException { - blob.delete(); - bucket.delete(); - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - for (Cluster element : - clusterControllerClient.listClusters(PROJECT_ID, REGION).iterateAll()) { - if (element.getClusterName() == CLUSTER_NAME) { - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(PROJECT_ID, REGION, CLUSTER_NAME); - deleteClusterAsyncRequest.get(); - break; - } - } - } - } -} diff --git a/samples/snippets/src/test/java/SubmitHadoopFsJobTest.java b/samples/snippets/src/test/java/SubmitHadoopFsJobTest.java deleted file mode 100644 index 973efa77..00000000 --- a/samples/snippets/src/test/java/SubmitHadoopFsJobTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.protobuf.Empty; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SubmitHadoopFsJobTest { - - private static final String CLUSTER_NAME = - String.format("java-fs-test--%s", UUID.randomUUID().toString()); - private static final String REGION = "us-central1"; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String ENDPOINT = String.format("%s-dataproc.googleapis.com:443", REGION); - private static final String HADOOP_FS_QUERY = "-ls /"; - - private ByteArrayOutputStream bout; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() throws IOException, ExecutionException, InterruptedException { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - // Create the Dataproc cluster. - Cluster cluster = Cluster.newBuilder().setClusterName(CLUSTER_NAME).build(); - OperationFuture createClusterAsyncRequest = - clusterControllerClient.createClusterAsync(PROJECT_ID, REGION, cluster); - createClusterAsyncRequest.get(); - } - } - - @Test - public void submitHadoopFsJobTest() throws IOException, InterruptedException { - SubmitHadoopFsJob.submitHadoopFsJob(PROJECT_ID, REGION, CLUSTER_NAME, HADOOP_FS_QUERY); - String output = bout.toString(); - - assertThat(output, CoreMatchers.containsString("/tmp")); - } - - @After - public void tearDown() throws IOException, InterruptedException, ExecutionException { - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(PROJECT_ID, REGION, CLUSTER_NAME); - deleteClusterAsyncRequest.get(); - } - } -} diff --git a/samples/snippets/src/test/java/SubmitJobTest.java b/samples/snippets/src/test/java/SubmitJobTest.java deleted file mode 100644 index b532f8ca..00000000 --- a/samples/snippets/src/test/java/SubmitJobTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import static junit.framework.TestCase.assertNotNull; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.dataproc.v1.Cluster; -import com.google.cloud.dataproc.v1.ClusterControllerClient; -import com.google.cloud.dataproc.v1.ClusterControllerSettings; -import com.google.cloud.dataproc.v1.ClusterOperationMetadata; -import com.google.protobuf.Empty; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.hamcrest.CoreMatchers; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SubmitJobTest { - - private static final String CLUSTER_NAME = - String.format("java-sj-test--%s", UUID.randomUUID().toString()); - private static final String REGION = "us-central1"; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String ENDPOINT = String.format("%s-dataproc.googleapis.com:443", REGION); - - private ByteArrayOutputStream bout; - - private static void requireEnv(String varName) { - assertNotNull( - String.format("Environment variable '%s' is required to perform these tests.", varName), - System.getenv(varName)); - } - - @BeforeClass - public static void checkRequirements() { - requireEnv("GOOGLE_APPLICATION_CREDENTIALS"); - requireEnv("GOOGLE_CLOUD_PROJECT"); - } - - @Before - public void setUp() throws IOException, ExecutionException, InterruptedException { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - // Create the Dataproc cluster. - Cluster cluster = Cluster.newBuilder().setClusterName(CLUSTER_NAME).build(); - OperationFuture createClusterAsyncRequest = - clusterControllerClient.createClusterAsync(PROJECT_ID, REGION, cluster); - createClusterAsyncRequest.get(); - } - } - - @Test - public void submitJobTest() throws IOException, InterruptedException { - SubmitJob.submitJob(PROJECT_ID, REGION, CLUSTER_NAME); - String output = bout.toString(); - - assertThat(output, CoreMatchers.containsString("Job finished successfully")); - } - - @After - public void tearDown() throws IOException, InterruptedException, ExecutionException { - - ClusterControllerSettings clusterControllerSettings = - ClusterControllerSettings.newBuilder().setEndpoint(ENDPOINT).build(); - - try (ClusterControllerClient clusterControllerClient = - ClusterControllerClient.create(clusterControllerSettings)) { - OperationFuture deleteClusterAsyncRequest = - clusterControllerClient.deleteClusterAsync(PROJECT_ID, REGION, CLUSTER_NAME); - deleteClusterAsyncRequest.get(); - } - } -} diff --git a/synth.metadata b/synth.metadata deleted file mode 100644 index 5b262cd3..00000000 --- a/synth.metadata +++ /dev/null @@ -1,599 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/java-dataproc.git", - "sha": "8953b74c3fc211e3a3be478ffedb8abb1287caeb" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "08c4eeb531c01ad031134dca94b18e3f7dd35902", - "internalRef": "378718217" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "08c4eeb531c01ad031134dca94b18e3f7dd35902", - "internalRef": "378718217" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8eae0234a16b26c2ff616d305dbd9786c8b10a47" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "dataproc", - "apiVersion": "v1", - "language": "java", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "dataproc", - "apiVersion": "v1beta2", - "language": "java", - "generator": "bazel" - } - } - ], - "generatedFiles": [ - ".github/CODEOWNERS", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/blunderbuss.yml", - ".github/generated-files-bot.yml", - ".github/readme/synth.py", - ".github/release-please.yml", - ".github/snippet-bot.yml", - ".github/sync-repo-settings.yaml", - ".github/trusted-contribution.yml", - ".github/workflows/approve-readme.yaml", - ".github/workflows/auto-release.yaml", - ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", - ".kokoro/build.bat", - ".kokoro/build.sh", - ".kokoro/coerce_logs.sh", - ".kokoro/common.cfg", - ".kokoro/common.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/java8.cfg", - ".kokoro/continuous/readme.cfg", - ".kokoro/dependencies.sh", - ".kokoro/nightly/common.cfg", - ".kokoro/nightly/integration.cfg", - ".kokoro/nightly/java11.cfg", - ".kokoro/nightly/java7.cfg", - ".kokoro/nightly/java8-osx.cfg", - ".kokoro/nightly/java8-win.cfg", - ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/clirr.cfg", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/dependencies.cfg", - ".kokoro/presubmit/integration.cfg", - ".kokoro/presubmit/java11.cfg", - ".kokoro/presubmit/java7.cfg", - ".kokoro/presubmit/java8-osx.cfg", - ".kokoro/presubmit/java8-win.cfg", - ".kokoro/presubmit/java8.cfg", - ".kokoro/presubmit/linkage-monitor.cfg", - ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", - ".kokoro/readme.sh", - ".kokoro/release/bump_snapshot.cfg", - ".kokoro/release/common.cfg", - ".kokoro/release/common.sh", - ".kokoro/release/drop.cfg", - ".kokoro/release/drop.sh", - ".kokoro/release/promote.cfg", - ".kokoro/release/promote.sh", - ".kokoro/release/publish_javadoc.cfg", - ".kokoro/release/publish_javadoc.sh", - ".kokoro/release/publish_javadoc11.cfg", - ".kokoro/release/publish_javadoc11.sh", - ".kokoro/release/snapshot.cfg", - ".kokoro/release/snapshot.sh", - ".kokoro/release/stage.cfg", - ".kokoro/release/stage.sh", - ".kokoro/trampoline.sh", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "codecov.yaml", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/gapic_metadata.json", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/gapic_metadata.json", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/package-info.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceCallableFactory.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStub.java", - "google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyService.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyServiceImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterController.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterControllerImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobController.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobControllerImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateService.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateServiceImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/JobControllerClientTest.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyService.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyServiceImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterController.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterControllerImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobController.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobControllerImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateService.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateServiceImpl.java", - "google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java", - "grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceGrpc.java", - "grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java", - "grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobControllerGrpc.java", - "grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceGrpc.java", - "grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceGrpc.java", - "grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerGrpc.java", - "grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerGrpc.java", - "grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java", - "java.header", - "license-checks.xml", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AcceleratorConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicy.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithm.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicAutoscalingAlgorithmOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/BasicYarnAutoscalingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetrics.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterMetricsOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperation.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadata.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatus.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOperationStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelector.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterSelectorOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatus.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Component.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResults.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiagnoseClusterResultsOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EncryptionConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/EndpointConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GkeClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/IdentityConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupAutoscalingPolicyConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateInlineWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstantiateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Job.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadata.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReference.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobReferenceOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatus.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/KerberosConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponse.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListAutoscalingPoliciesResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponse.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponse.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListJobsResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponse.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListWorkflowTemplatesResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LoggingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedCluster.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedClusterOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ManagedGroupConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/MetastoreConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinity.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeGroupAffinityOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationAction.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationActionOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OrderedJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidation.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ParameterValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryList.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/QueryListOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidation.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegexValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegionName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinity.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ReservationAffinityOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ServiceName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SharedProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ShieldedInstanceConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfig.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SoftwareConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJobOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StartClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/StopClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameter.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/TemplateParameterOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidation.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ValueValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraph.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowGraphOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadata.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNode.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowNodeOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplate.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacement.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatePlacementOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatesProto.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplication.java", - "proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplicationOrBuilder.java", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/shared.proto", - "proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/workflow_templates.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicy.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyName.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithm.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithmOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Cluster.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetrics.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetricsOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterName.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperation.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadata.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatus.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelector.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelectorOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatus.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClustersProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Component.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResults.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResultsOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Job.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadata.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacement.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacementOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReference.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReferenceOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobScheduling.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobSchedulingOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatus.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatusOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobsProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponse.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponse.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponse.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponse.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponseOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedCluster.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedClusterOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationAction.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationActionOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OperationsProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidation.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryList.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryListOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidation.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegionName.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinity.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinityOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SharedProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfig.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfigOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJob.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJobOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequest.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequestOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidation.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidationOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraph.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraphOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadata.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadataOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNode.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNodeOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplate.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacement.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacementOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplication.java", - "proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplicationOrBuilder.java", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/clusters.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/jobs.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/operations.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/shared.proto", - "proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto", - "renovate.json", - "samples/install-without-bom/pom.xml", - "samples/pom.xml", - "samples/snapshot/pom.xml", - "samples/snippets/pom.xml" - ] -} \ No newline at end of file diff --git a/versions.txt b/versions.txt deleted file mode 100644 index d3ced50e..00000000 --- a/versions.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Format: -# module:released-version:current-version - -google-cloud-dataproc:2.3.2:2.3.3-SNAPSHOT -grpc-google-cloud-dataproc-v1:2.3.2:2.3.3-SNAPSHOT -proto-google-cloud-dataproc-v1:2.3.2:2.3.3-SNAPSHOT